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 |
|---|---|---|---|---|---|---|
Loads data for the specified city and filters by month and day if applicable. | def load_data(city, month, day):
df = pd.read_csv(CITY_DATA[city])
df['Start Time'] = pd.to_datetime(df['Start Time'])
df['month'] = df['Start Time'].dt.month
df['day_of_week'] = df['Start Time'].dt.day_name()
df['hour'] = df['Start Time'].dt.hour
if month != 'all':
months = ['january', ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_data(city, month, day):\n df = pd.read_csv(CITY_DATA [city])\n \n # convert the Start Time column to datetime\n df['Start Time'] = pd.to_datetime(df['Start Time'])\n \n # extract month and day of week from Start Time to create new columns\n df['month'] = df['Start Time'].dt.month\n ... | [
"0.81320685",
"0.8108889",
"0.8045821",
"0.8042514",
"0.80090284",
"0.80071104",
"0.79991937",
"0.7998333",
"0.7988789",
"0.797905",
"0.79737365",
"0.79610896",
"0.7956163",
"0.7947432",
"0.79463065",
"0.7908287",
"0.7908229",
"0.7904569",
"0.7900715",
"0.78930074",
"0.788921... | 0.7794194 | 33 |
Displays statistics on the most frequent times of travel. | def time_stats(df):
print('\nCalculating The Most Frequent Times of Travel...\n')
start_time = time.time()
# display the most common month
common_month = df['month'].mode()
print("The most common month is: {}".format(common_month))
# display the most common day of week
common_day = df['da... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def time_stats(df):\n\n print('\\nDisplaying the statistics on the most frequent times of '\n 'travel...\\n')\n start_time = time.time()\n\n # display the most common month\n most_common_month = df['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' +\... | [
"0.80247396",
"0.80233026",
"0.7915788",
"0.78266186",
"0.7822246",
"0.78143597",
"0.77659196",
"0.7740343",
"0.773628",
"0.77344066",
"0.76867086",
"0.7668633",
"0.7651731",
"0.7644636",
"0.76399267",
"0.76367253",
"0.7625196",
"0.7623158",
"0.7612803",
"0.76002145",
"0.7583... | 0.7567961 | 23 |
Displays statistics on the most popular stations and trip. | def station_stats(df):
print('\nCalculating The Most Popular Stations and Trip...\n')
start_time = time.time()
# display most commonly used start station
common_start = df["Start Station"].mode()
print("The most common start station is: {}".format(common_start))
# display most commonly used e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m... | [
"0.7816376",
"0.7662779",
"0.7554007",
"0.749191",
"0.7475349",
"0.7446666",
"0.7431475",
"0.7424602",
"0.74180853",
"0.74006534",
"0.7387897",
"0.73860437",
"0.73657554",
"0.7359602",
"0.73570734",
"0.7355466",
"0.7352646",
"0.7351677",
"0.7350823",
"0.73425794",
"0.7341161"... | 0.7275208 | 33 |
Displays statistics on the total and average trip duration. | def trip_duration_stats(df):
print('\nCalculating Trip Duration...\n')
start_time = time.time()
# display total travel time
travel_time = df["Trip Duration"].sum()
print("Total travel time: {}".format(travel_time))
# display mean travel time
traveltime_mean = df["Trip Duration"].mean()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri... | [
"0.814274",
"0.8025143",
"0.80041367",
"0.79496753",
"0.7937415",
"0.79312176",
"0.7926815",
"0.7915187",
"0.79142886",
"0.7908032",
"0.79055744",
"0.7900715",
"0.7891682",
"0.78894734",
"0.7886722",
"0.78851086",
"0.7884266",
"0.7882474",
"0.78738385",
"0.78686154",
"0.78664... | 0.777826 | 52 |
Return the start and end datetime of a given date. Given a date, it will return the ``datetime.datetime`` for both the first second of the current day, and the last second of the current day. | def start_and_end_of(date):
y, m, d = date.year, date.month, date.day
if getattr(date, 'tzinfo', None) is None:
return (
datetime.datetime(y, m, d, 00, 00, 00),
datetime.datetime(y, m, d, 23, 59, 59)
)
else:
return (
datetime.datetime(y, m, d, 00... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_start_and_end_dates(new_start_date=None):\n curr_date = datetime.utcnow()\n curr_date = pd.to_datetime(date(curr_date.year, curr_date.month, curr_date.day))\n if not(new_start_date):\n end_date = curr_date\n start_date = get_start_date(end_date, ANALYSIS_PERIOD)\n else:\n s... | [
"0.62385046",
"0.6229384",
"0.62082016",
"0.5857823",
"0.5832716",
"0.5729825",
"0.5474182",
"0.54666805",
"0.5462898",
"0.53871167",
"0.5362674",
"0.5328321",
"0.52713096",
"0.5226617",
"0.52265334",
"0.52011776",
"0.5190721",
"0.5172147",
"0.5160664",
"0.51529944",
"0.51273... | 0.76415455 | 0 |
Convert a (unix) timestamp to a timezoneaware datetime. | def datetime_from_timestamp(timestamp, tzinfo=pytz.utc):
if isinstance(timestamp, six.string_types):
timestamp = float(timestamp)
dt = datetime.datetime.utcfromtimestamp(timestamp)
if tzinfo:
return dt.replace(tzinfo=pytz.utc).astimezone(tzinfo)
else:
return dt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_python_datetime(unix_timestamp):\n return datetime.datetime.fromtimestamp(int(unix_timestamp),\n pytz.timezone(settings.TIME_ZONE))",
"def from_timestamp(timestamp: float, tz_info: tzinfo = UTC) -> datetime:\n utc_dt = datetime.fromtimestamp(timestamp, tz=UT... | [
"0.7864748",
"0.73954093",
"0.71080124",
"0.6963974",
"0.6886137",
"0.6885085",
"0.6854918",
"0.6839952",
"0.68349373",
"0.6710528",
"0.66938007",
"0.6668219",
"0.6482279",
"0.6465223",
"0.6443685",
"0.6430307",
"0.63878673",
"0.63620156",
"0.6331047",
"0.6321999",
"0.6311469... | 0.7166657 | 2 |
Convert a datetime to a unix timestamp. | def timestamp_from_datetime(date):
if getattr(date, 'tzinfo', None) is None:
return (date - datetime.datetime(1970, 1, 1)).total_seconds()
else:
return (date - datetime.datetime(
1970, 1, 1, tzinfo=pytz.utc)).total_seconds() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_unix(cls, timestamp):\n if not isinstance(timestamp, datetime.datetime):\n raise TypeError(\"Time.milliseconds expects a datetime object\")\n return timestamp.timestamp()",
"def datetimeToUnix(date):\n return int(time.mktime(date.timetuple())*1000)",
"def datetime2UnixTime(dt... | [
"0.78340864",
"0.7833539",
"0.78151834",
"0.7688026",
"0.7667404",
"0.75306165",
"0.739395",
"0.7322114",
"0.7293473",
"0.72749853",
"0.72417897",
"0.72039944",
"0.71687716",
"0.7120914",
"0.7100612",
"0.70995635",
"0.7003279",
"0.6969903",
"0.6943282",
"0.6914141",
"0.690853... | 0.62671983 | 54 |
return a list of words with all punctuation removed, and all in lowercase. | def text_to_words(the_text):
my_substitutions = the_text.maketrans(
# If you find any of these
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&()*+,-./:;<=>?@[]^_`{|}~'\\",
# Replace them by these
"abcdefghijklmnopqrstuvwxyz ")
# Translate the text ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def process_text(text):\n words = word_tokenize(text)\n return [word.lower() for word in words if word not in string.punctuation]",
"def _remove_punctuation(words):\n new_words = []\n for word in words:\n new_word = re.sub(r'[^\\w\\s]', '', word)\n if new_word != '':\n ... | [
"0.79566467",
"0.788198",
"0.78481823",
"0.782669",
"0.78156054",
"0.78156054",
"0.78156054",
"0.78156054",
"0.78156054",
"0.78156054",
"0.78145444",
"0.7809541",
"0.7798083",
"0.7658195",
"0.76542634",
"0.7528401",
"0.747151",
"0.7462522",
"0.74306303",
"0.73916703",
"0.7382... | 0.0 | -1 |
Tests whether ``ApplicationCommandPermissionOverwrite`` sort as intended. | def test__ApplicationCommandPermissionOverwrite__sort():
entity_0 = ApplicationCommandPermissionOverwrite(
allow = True,
target = (ApplicationCommandPermissionOverwriteTargetType.role, 202302210014),
)
entity_1 = ApplicationCommandPermissionOverwrite(
allow = True,
target = (... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test__ApplicationCommandPermissionOverwrite__eq():\n allow = True\n target_id = 202302210005\n target_type = ApplicationCommandPermissionOverwriteTargetType.role\n \n keyword_parameters = {\n 'allow': allow,\n 'target': (target_type, target_id),\n }\n \n application_comman... | [
"0.6251414",
"0.60616285",
"0.5662376",
"0.5626706",
"0.55322766",
"0.5492247",
"0.54206383",
"0.53666383",
"0.5363653",
"0.5355242",
"0.53523904",
"0.5283981",
"0.52755284",
"0.52685183",
"0.5154975",
"0.5125539",
"0.51094717",
"0.50927734",
"0.5092593",
"0.50895995",
"0.508... | 0.7394689 | 0 |
Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, slash, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. (I.e., does the same as slugify, but also converts slashes to dashes.) | def xslugify(value):
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
value = re.sub('[^\w\s/-]', '', value).strip().lower()
return mark_safe(re.sub('[-\s/]+', '-', value)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sanitize(str):\n res = str.lower()\n return res.replace(' ', '-')",
"def slugify(s):\n\treturn re.sub('[!@#$%^&*()\\\\\\\\/:.\"\"]+', '', s).replace(' ', '-').replace('--', '-').lower()",
"def _slugify(value):\n value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')\n value = re... | [
"0.78112316",
"0.770344",
"0.76045144",
"0.75906587",
"0.7524358",
"0.7511643",
"0.74939775",
"0.7489115",
"0.74592614",
"0.7446412",
"0.7428048",
"0.7413127",
"0.74090356",
"0.73759204",
"0.73473966",
"0.733847",
"0.7335182",
"0.7299528",
"0.7284692",
"0.7284692",
"0.7281650... | 0.67649174 | 48 |
wraps a string within single qoute. Mostly needed for insert into database | def wrap_with_in_single_quote(s):
return "'{}'".format(s) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qstring(self, s):\n\n if '\"' in s or ' ' in s or '\\\\' in s:\n return '\"' + s.replace('\\\\', '\\\\\\\\').replace('\"', '\\\\\"') + '\"'\n else:\n return s",
"def quote(s):\n if isinstance(s, str):\n if \" \" in s or len(s.split()) > 1:\n start, end... | [
"0.7357636",
"0.70734096",
"0.6990583",
"0.69030076",
"0.67781955",
"0.66734624",
"0.6578122",
"0.6562084",
"0.65618634",
"0.65006495",
"0.6492088",
"0.6490486",
"0.64646506",
"0.64400494",
"0.64112735",
"0.6396136",
"0.6389765",
"0.638212",
"0.6373073",
"0.6366212",
"0.63542... | 0.7279222 | 2 |
Test case for issue_add_subscription | def test_issue_add_subscription(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_issue_subscriptions(self):\n pass",
"def test_create_subscription(self):\n pass",
"def test_get_subscription(self):\n pass",
"def test_update_subscription(self):\n pass",
"def test_issue_delete_subscription(self):\n pass",
"def test_create_subscription_template... | [
"0.8323625",
"0.8267924",
"0.76104105",
"0.7411107",
"0.738817",
"0.7263651",
"0.7205398",
"0.7178266",
"0.70976007",
"0.69620264",
"0.69190884",
"0.685967",
"0.6855384",
"0.6823422",
"0.6717224",
"0.667599",
"0.66457415",
"0.6608325",
"0.65616167",
"0.6554939",
"0.653283",
... | 0.94687974 | 0 |
Test case for issue_delete_comment | def test_issue_delete_comment(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_issue_delete_comment_reaction(self):\n pass",
"def test_issue_delete_comment_deprecated(self):\n pass",
"def test_issue_delete_issue_reaction(self):\n pass",
"def test_deleting_comment(self):\n\n delete_comment(1)\n comment = Comment.query.get(1)\n\n self.as... | [
"0.9103096",
"0.8334209",
"0.80664146",
"0.7623346",
"0.75803876",
"0.7569957",
"0.7542638",
"0.7513665",
"0.744282",
"0.73950243",
"0.73687565",
"0.7358836",
"0.73122334",
"0.724381",
"0.72313017",
"0.7216403",
"0.72025186",
"0.7188275",
"0.7141231",
"0.7139552",
"0.71344936... | 0.9442686 | 0 |
Test case for issue_delete_label | def test_issue_delete_label(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_issue_remove_label(self):\n pass",
"def test_issue_clear_labels(self):\n pass",
"def test_issue_delete_issue_reaction(self):\n pass",
"def test_issue_create_label(self):\n pass",
"def delete_issue_label(repo, project, issue_number, delete_label_id):\n issue_path = '%... | [
"0.8568545",
"0.7596157",
"0.7553642",
"0.74576604",
"0.7456846",
"0.740878",
"0.74051124",
"0.7110937",
"0.70410156",
"0.69948876",
"0.6977259",
"0.6939945",
"0.68230456",
"0.67513186",
"0.6703233",
"0.6664366",
"0.66256374",
"0.6610895",
"0.66081494",
"0.65440834",
"0.65360... | 0.9532704 | 0 |
Test case for issue_get_comment_reactions | def test_issue_get_comment_reactions(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_issue_get_issue_reactions(self):\n pass",
"def test_issue_get_comments(self):\n pass",
"def test_issue_post_comment_reaction(self):\n pass",
"def test_issue_get_comment(self):\n pass",
"def test_issue_delete_comment_reaction(self):\n pass",
"def test_issue_get_... | [
"0.8119849",
"0.7597273",
"0.7596201",
"0.7528853",
"0.7112743",
"0.7107826",
"0.6895063",
"0.6702412",
"0.65639186",
"0.64999485",
"0.6463945",
"0.63697135",
"0.6297374",
"0.6268831",
"0.62229866",
"0.6178912",
"0.61708266",
"0.6166333",
"0.6116969",
"0.6084522",
"0.60602814... | 0.95005715 | 0 |
Test case for issue_get_milestones_list | def test_issue_get_milestones_list(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_issue_get_milestone(self):\n pass",
"def test_milestone_list_ok(self):\n test_name = sys._getframe().f_code.co_name\n rv, output = self._execute('milestone list')\n self.assertEqual(0, rv)\n self.assertEqual(self.expected_results[test_name], output)",
"def milestones... | [
"0.82759035",
"0.8045862",
"0.7439711",
"0.74145424",
"0.7367361",
"0.7013299",
"0.6998131",
"0.6907828",
"0.68084246",
"0.67718697",
"0.67384106",
"0.6537653",
"0.64835274",
"0.64159954",
"0.6410546",
"0.6266975",
"0.6250649",
"0.6242075",
"0.62361187",
"0.6185979",
"0.61831... | 0.96118665 | 0 |
Test case for issue_post_comment_reaction | def test_issue_post_comment_reaction(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_issue_post_issue_reaction(self):\n pass",
"def test_issue_get_comment_reactions(self):\n pass",
"def test_issue_delete_comment_reaction(self):\n pass",
"def test_issue_create_comment(self):\n pass",
"def test_issue_get_comment(self):\n pass",
"def test_issue_ed... | [
"0.8147087",
"0.8092488",
"0.7907774",
"0.75006354",
"0.7355832",
"0.73285085",
"0.70869476",
"0.69199926",
"0.68773806",
"0.67855275",
"0.6743673",
"0.6693335",
"0.66852117",
"0.65444446",
"0.6478303",
"0.6403444",
"0.6394652",
"0.63924855",
"0.6360697",
"0.63486075",
"0.627... | 0.9362616 | 0 |
Returns true if the current log handler does not coincide with the current time/date. | def _log_expired(self, date, hour):
if date != self._log_datetime.date() or hour != self._log_datetime.hour:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_logging(self):\n if datetime.datetime.utcnow().strftime('%Y%m%d') != self.logger_utc_date:\n # reset\n self.shut_down_logger()\n self.logger, self.logger_utc_date = self.set_up_logging(_name='archive', _mode='a')",
"def log_once(key):\r\n\r\n global _last_logg... | [
"0.6715278",
"0.60731375",
"0.60233736",
"0.59173465",
"0.5842716",
"0.5832268",
"0.57525134",
"0.5734141",
"0.5708419",
"0.56982267",
"0.56802094",
"0.5672047",
"0.56546557",
"0.5641708",
"0.5626663",
"0.5583267",
"0.55795825",
"0.55626845",
"0.5483196",
"0.5467621",
"0.5456... | 0.57444346 | 7 |
Check if the data type of a column in a Pandas DataFrame is a date or time data type. | def is_date_dtype(df, col_name):
dtype = df.dtypes[col_name]
return np.issubdtype(dtype, np.datetime64) or np.issubdtype(dtype, np.timedelta64) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_datetime_type(obj: _std_typing.Any) -> bool:\n return obj.dtype == sc.DType.datetime64",
"def is_datetime_type(val):\n return (\n pd.api.types.is_datetime64_any_dtype(val)\n or isinstance(val, pd.Timestamp)\n or isinstance(val, datetime)\n )",
"def test_df_all_types():\n ... | [
"0.7605145",
"0.7418092",
"0.7129347",
"0.7015684",
"0.67741495",
"0.67695576",
"0.6739164",
"0.6691134",
"0.66401803",
"0.6599765",
"0.65935814",
"0.65621954",
"0.6557692",
"0.65372384",
"0.648301",
"0.6475475",
"0.64670604",
"0.6452912",
"0.63305575",
"0.63210905",
"0.63080... | 0.8760239 | 0 |
Function to encode ordinal columns as provided by user in the form of a dictionary. Format for the parameter is specified at the top during initialization. | def __encode_ordinal(self):
for key, value in self.ord_dict.items():
if key in self.train_df.columns:
if self.test_df is not None:
self.test_df[key + str("Encoded")] = self.test_df[key].map(
value
)
s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def columndict_callback(c):\r\n\r\n def subQ(txt):\r\n return re.sub(r\"'([^']*)'\", r\"`\\1'\", (txt or '')).replace(r'|', r'\\|')\r\n\r\n return {\r\n 'name' : c.name,\r\n 'type' : c.type,\r\n 'nullable' : c.nullable,\r\n 'value' : subQ(c.value),\r\n ... | [
"0.5782949",
"0.5643726",
"0.5495942",
"0.5467233",
"0.5458945",
"0.5410271",
"0.52926546",
"0.5279254",
"0.5216108",
"0.5176246",
"0.51758426",
"0.5171578",
"0.517122",
"0.5160754",
"0.51388794",
"0.5131252",
"0.51265204",
"0.5120278",
"0.5061771",
"0.5059279",
"0.50548",
... | 0.683863 | 0 |
searches dir_ for file with a given pattern and returns the first or last file dependent on mode setting | def get_filename(pattern, dir_, mode='last'):
if isinstance(pattern, re.Pattern):
files_found = filter(pattern.search, os.listdir(dir_))
elif isinstance(pattern, str):
files_found = [fn for fn in os.listdir(dir_) if pattern in fn]
try:
if mode == 'first':
return min(files... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_last_file(base_dir, pattern):\n base_dir = Path(base_dir)\n\n return sorted(base_dir.glob(pattern),\n key=lambda x: x.stat().st_ctime, reverse=True)[0]",
"def get_first_file(cmds):\n for cmd in cmds:\n all_files = glob.glob(cmd)\n if all_files:\n for f i... | [
"0.6972268",
"0.66700506",
"0.65251267",
"0.6512798",
"0.64374083",
"0.64120126",
"0.634988",
"0.62929565",
"0.6216909",
"0.62115365",
"0.6186571",
"0.61439836",
"0.6138226",
"0.6069501",
"0.59976065",
"0.5980236",
"0.5947421",
"0.5937733",
"0.59222066",
"0.5916827",
"0.59110... | 0.7957775 | 0 |
Get the regular expression (RE) from a path | def get_regular_expression(path):
regular_expression = ""
for item in path:
if(item == path[-1]):
regular_expression += "("+item+"$|[*]$)"
else:
regular_expression += "("+item+"|[*])"
return regular_expression | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_regex(self):\n return r\".\"",
"def getCompiledRegExp(self):\r\n return self.compiled_re",
"def _build_regex(path):\n re_list = ['^']\n var_list = list()\n is_var = False\n for v in _RE_ROUTE.split(path):\n if is_var:\n var_name = v[1:... | [
"0.65693724",
"0.654951",
"0.65308774",
"0.6489387",
"0.6405847",
"0.6405847",
"0.6405847",
"0.6357381",
"0.6243812",
"0.6148599",
"0.6115036",
"0.6113817",
"0.60794526",
"0.60794526",
"0.6060355",
"0.6039972",
"0.5969342",
"0.5955269",
"0.59127253",
"0.59049654",
"0.58954954... | 0.72148234 | 0 |
Sets the bearing angle of the map (in degrees counterclockwise from North). | def bearing(self):
return self['bearing'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bearing(self, value: int):\n self._bearing = value",
"def set_bearing(self, bearing):\n self._set_sub_text('bearing', text=str(bearing))\n return self",
"def setbearing(self, bearing):\n diff = self.bearing - bearing\n self.b_change = diff\n self.bearing = bearing\... | [
"0.7079263",
"0.6839549",
"0.68046486",
"0.64873934",
"0.6486333",
"0.6460145",
"0.62864286",
"0.618584",
"0.61844575",
"0.6164993",
"0.61561126",
"0.61025614",
"0.6040607",
"0.6018344",
"0.5989327",
"0.59663177",
"0.5963473",
"0.59444946",
"0.591694",
"0.5880507",
"0.5869075... | 0.5892694 | 19 |
Sets the pitch angle of the map (in degrees, where 0 means perpendicular to the surface of the map). | def pitch(self):
return self['pitch'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setVoicePitch(self, pitch):\n\n try:\n assert (pitch >= 1.0 and pitch <= 4) or pitch == 0\n self.tts.setParameter(\"pitchShift\", pitch)\n\n except AssertionError:\n self.logger.warning(\"Incorrect pitch value, the pitch won't be modified\")",
"def pitch(self, p... | [
"0.6600937",
"0.6537519",
"0.6225034",
"0.62056226",
"0.61845267",
"0.58679694",
"0.5789177",
"0.57312334",
"0.5729508",
"0.5710365",
"0.56416935",
"0.5630072",
"0.55971164",
"0.55880654",
"0.55338687",
"0.55066204",
"0.5500942",
"0.5448166",
"0.5382392",
"0.5320512",
"0.5269... | 0.5688163 | 10 |
The set of arguments for constructing a InterRegionTrafficQosPolicy resource. | def __init__(__self__, *,
transit_router_attachment_id: pulumi.Input[str],
transit_router_id: pulumi.Input[str],
inter_region_traffic_qos_policy_description: Optional[pulumi.Input[str]] = None,
inter_region_traffic_qos_policy_name: Optional[pulumi.Inpu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__,\n resource_name: str,\n args: InterRegionTrafficQosPolicyArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...",
"def __init__(__self__,\n resource_name: str,\n opts: Optional[pulumi.ResourceOpti... | [
"0.7956183",
"0.66588044",
"0.633602",
"0.6327098",
"0.6024731",
"0.5972753",
"0.59473443",
"0.5901634",
"0.58797646",
"0.5826835",
"0.57630354",
"0.5641468",
"0.55806035",
"0.5491045",
"0.545544",
"0.5448153",
"0.54414237",
"0.54411805",
"0.54358315",
"0.5435722",
"0.5428643... | 0.51103127 | 67 |
The ID of the interregion connection. | def transit_router_attachment_id(self) -> pulumi.Input[str]:
return pulumi.get(self, "transit_router_attachment_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def connection_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"connection_id\")",
"def region_id(self) -> str:\n return self._region_id",
"def connection_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"connection_id\")",
"def region_id(self):\n return self._... | [
"0.7472814",
"0.73195004",
"0.7281821",
"0.722124",
"0.71302295",
"0.70303935",
"0.6931022",
"0.6890165",
"0.6859243",
"0.6834639",
"0.6806963",
"0.67952806",
"0.6791864",
"0.677339",
"0.67647105",
"0.6718078",
"0.6706305",
"0.66892856",
"0.667821",
"0.6670729",
"0.6652546",
... | 0.0 | -1 |
The name of the QoS policy. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (). It must start with a letter. | def inter_region_traffic_qos_policy_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "inter_region_traffic_qos_policy_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def policy_name(self):\n return self._policy_name",
"def policy_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"policy_name\")",
"def policy_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"policy_name\")",
"def policy_name(self) -> pulumi.Input[str]:\n re... | [
"0.7545212",
"0.749879",
"0.749879",
"0.749879",
"0.749879",
"0.749879",
"0.749879",
"0.749879",
"0.74712384",
"0.74712384",
"0.7256895",
"0.7233315",
"0.72274923",
"0.6948841",
"0.6620812",
"0.6454004",
"0.6274146",
"0.62682617",
"0.62626153",
"0.6258734",
"0.6258734",
"0.... | 0.67920095 | 14 |
The name of the QoS policy. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (). It must start with a letter. | def inter_region_traffic_qos_policy_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "inter_region_traffic_qos_policy_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def policy_name(self):\n return self._policy_name",
"def policy_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"policy_name\")",
"def policy_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"policy_name\")",
"def policy_name(self) -> pulumi.Input[str]:\n re... | [
"0.7541132",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7467162",
"0.7467162",
"0.725285",
"0.72292495",
"0.7224762",
"0.69471776",
"0.66204226",
"0.6450144",
"0.62707156",
"0.62664306",
"0.6260182",
"0.62552077",
"0.62552077... | 0.679133 | 15 |
The status of the Inter Region Traffic Qos Policy. | def status(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "status") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pr_status(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"pr_status\")",
"def status(self) -> str:\n return pulumi.get(self, \"status\")",
"def status(self) -> str:\n return pulumi.get(self, \"status\")",
"def status(self) -> str:\n return pulumi.get(self, \"status\")... | [
"0.6874344",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",... | 0.0 | -1 |
The ID of the interregion connection. | def transit_router_attachment_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "transit_router_attachment_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def connection_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"connection_id\")",
"def region_id(self) -> str:\n return self._region_id",
"def connection_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"connection_id\")",
"def region_id(self):\n return self._... | [
"0.7472814",
"0.73195004",
"0.7281821",
"0.722124",
"0.71302295",
"0.70303935",
"0.6931022",
"0.6890165",
"0.6859243",
"0.6834639",
"0.6806963",
"0.67952806",
"0.6791864",
"0.677339",
"0.67647105",
"0.6718078",
"0.6706305",
"0.66892856",
"0.667821",
"0.6670729",
"0.6652546",
... | 0.0 | -1 |
The name of the QoS policy. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (). It must start with a letter. | def inter_region_traffic_qos_policy_name(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "inter_region_traffic_qos_policy_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def policy_name(self):\n return self._policy_name",
"def policy_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"policy_name\")",
"def policy_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"policy_name\")",
"def policy_name(self) -> pulumi.Input[str]:\n re... | [
"0.7541132",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7494446",
"0.7467162",
"0.7467162",
"0.725285",
"0.72292495",
"0.7224762",
"0.69471776",
"0.679133",
"0.679133",
"0.6450144",
"0.62707156",
"0.62664306",
"0.6260182",
"0.62552077",
... | 0.66204226 | 16 |
The status of the Inter Region Traffic Qos Policy. | def status(self) -> pulumi.Output[str]:
return pulumi.get(self, "status") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pr_status(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"pr_status\")",
"def status(self) -> str:\n return pulumi.get(self, \"status\")",
"def status(self) -> str:\n return pulumi.get(self, \"status\")",
"def status(self) -> str:\n return pulumi.get(self, \"status\")... | [
"0.6874344",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",
"0.67270166",... | 0.6489743 | 34 |
The ID of the interregion connection. | def transit_router_attachment_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "transit_router_attachment_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def connection_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"connection_id\")",
"def region_id(self) -> str:\n return self._region_id",
"def connection_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"connection_id\")",
"def region_id(self):\n return self._... | [
"0.7472814",
"0.73195004",
"0.7281821",
"0.722124",
"0.71302295",
"0.70303935",
"0.6931022",
"0.6890165",
"0.6859243",
"0.6834639",
"0.6806963",
"0.67952806",
"0.6791864",
"0.677339",
"0.67647105",
"0.6718078",
"0.6706305",
"0.66892856",
"0.667821",
"0.6670729",
"0.6652546",
... | 0.0 | -1 |
Tests conversion of DOSDP JSON Schema. Note there is a separate importer for DOSDPs themselves | def test_convert_dosdp(self):
schema = self._convert('dosdp_schema', 'yaml',
name='dosdp',
root_class_name='Pattern',
data_files=['OMIM_disease_series_by_gene.yaml'],
target_class='')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_dumps(self):\n schema = self.UnitTestingSchema()\n serializer = JSONSchema()\n self.assertIsInstance(serializer.dumps(schema), str)",
"def testSchemaLoadingAsString(self):\n api = self.ApiFromDiscoveryDoc('latitude.v1.json')\n self.assertEquals(4, len(api._schemas))",
"def t... | [
"0.6136893",
"0.5996999",
"0.5902707",
"0.5819612",
"0.5786885",
"0.5767222",
"0.56741905",
"0.56292474",
"0.55735016",
"0.5572437",
"0.5493553",
"0.548791",
"0.5457688",
"0.54451466",
"0.5444446",
"0.5437736",
"0.54150856",
"0.5402213",
"0.5374414",
"0.53628546",
"0.5343252"... | 0.7209501 | 0 |
Sets the learning rate to the initial LR decayed by schedule | def adjust_learning_rate(optimizer, epoch, lr, schedule, gamma):
if epoch in schedule:
lr *= gamma
for param_group in optimizer.param_groups:
param_group['lr'] = lr
return lr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize_learning_rate(self):\n\n if (self.FLAGS.learning_rate_decay is \"exponential\"):\n self.learning_rate = tf.train.exponential_decay(\n self.FLAGS.learning_rate,\n self.global_step,\n self.... | [
"0.78539747",
"0.77027047",
"0.7676641",
"0.7567535",
"0.7561808",
"0.7544826",
"0.75352955",
"0.75214934",
"0.75208277",
"0.7495849",
"0.74856246",
"0.7485101",
"0.74838334",
"0.74818796",
"0.74781066",
"0.74781066",
"0.74567455",
"0.74482805",
"0.7425778",
"0.7423738",
"0.7... | 0.7538807 | 6 |
Initialize the weight vector corresponding to each label. The weights for all the features are initialized to 0. | def init_weights(self, num_features):
for each_label in self.valid_labels:
self.weights[each_label] = np.zeros(num_features) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize_weights(self):\n # compute lmda.\n self.lmda = float(self.c)/float(self.N)\n # bias term. This should not get a regularization penalty.\n self.bias = {}\n # weight vector\n self.w = {}\n # lastW[j] = k, indicates that feature j was last updated at tim... | [
"0.74092495",
"0.7341445",
"0.7315217",
"0.7315217",
"0.7315217",
"0.73088264",
"0.71942604",
"0.717944",
"0.717944",
"0.7087449",
"0.70044875",
"0.69420433",
"0.67548954",
"0.6710408",
"0.66174674",
"0.6606881",
"0.65538627",
"0.6538336",
"0.653792",
"0.6515773",
"0.65084785... | 0.81670105 | 0 |
MixerB/16 224x224. ImageNet1k pretrained weights. | def mixer_b16_224(pretrained=False, **kwargs):
model_args = dict(patch_size=16, num_blocks=12, embed_dim=768, **kwargs)
model = _create_mixer('mixer_b16_224', pretrained=pretrained, **model_args)
return model | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gmixer_24_224(pretrained=False, **kwargs):\n model_args = dict(\n patch_size=16, num_blocks=24, embed_dim=384, mlp_ratio=(1.0, 4.0),\n mlp_layer=GluMlp, act_layer=nn.SiLU, **kwargs)\n model = _create_mixer('gmixer_24_224', pretrained=pretrained, **model_args)\n return model",
"def mixe... | [
"0.6941042",
"0.69388247",
"0.693703",
"0.6822149",
"0.6783947",
"0.6646079",
"0.6638165",
"0.6508298",
"0.6156484",
"0.61306494",
"0.6065307",
"0.5953672",
"0.59452116",
"0.59256846",
"0.58865607",
"0.5882934",
"0.5872038",
"0.58385766",
"0.58385766",
"0.58385766",
"0.582472... | 0.7097543 | 0 |
MixerB/16 224x224. ImageNet21k pretrained weights. | def mixer_b16_224_in21k(pretrained=False, **kwargs):
model_args = dict(patch_size=16, num_blocks=12, embed_dim=768, **kwargs)
model = _create_mixer('mixer_b16_224_in21k', pretrained=pretrained, **model_args)
return model | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mixer_b16_224(pretrained=False, **kwargs):\n model_args = dict(patch_size=16, num_blocks=12, embed_dim=768, **kwargs)\n model = _create_mixer('mixer_b16_224', pretrained=pretrained, **model_args)\n return model",
"def gmixer_24_224(pretrained=False, **kwargs):\n model_args = dict(\n patch_... | [
"0.7155121",
"0.69344497",
"0.693189",
"0.68418616",
"0.6813669",
"0.6799404",
"0.679533",
"0.6616179",
"0.61031723",
"0.60699344",
"0.60615176",
"0.6023468",
"0.6010406",
"0.5973697",
"0.5965235",
"0.5929086",
"0.5880694",
"0.58507794",
"0.58393186",
"0.58382636",
"0.5833344... | 0.71706796 | 0 |
MixerL/16 224x224. ImageNet1k pretrained weights. | def mixer_l16_224(pretrained=False, **kwargs):
model_args = dict(patch_size=16, num_blocks=24, embed_dim=1024, **kwargs)
model = _create_mixer('mixer_l16_224', pretrained=pretrained, **model_args)
return model | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gmixer_24_224(pretrained=False, **kwargs):\n model_args = dict(\n patch_size=16, num_blocks=24, embed_dim=384, mlp_ratio=(1.0, 4.0),\n mlp_layer=GluMlp, act_layer=nn.SiLU, **kwargs)\n model = _create_mixer('gmixer_24_224', pretrained=pretrained, **model_args)\n return model",
"def mixe... | [
"0.70330495",
"0.6861825",
"0.68275404",
"0.6778443",
"0.676065",
"0.66829115",
"0.6555982",
"0.6339472",
"0.6106684",
"0.59370583",
"0.5911115",
"0.58963084",
"0.5793812",
"0.5793812",
"0.5793812",
"0.5784412",
"0.57784045",
"0.57709444",
"0.5766936",
"0.5763652",
"0.5760771... | 0.70493513 | 0 |
MixerL/16 224x224. ImageNet21k pretrained weights. | def mixer_l16_224_in21k(pretrained=False, **kwargs):
model_args = dict(patch_size=16, num_blocks=24, embed_dim=1024, **kwargs)
model = _create_mixer('mixer_l16_224_in21k', pretrained=pretrained, **model_args)
return model | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mixer_l16_224(pretrained=False, **kwargs):\n model_args = dict(patch_size=16, num_blocks=24, embed_dim=1024, **kwargs)\n model = _create_mixer('mixer_l16_224', pretrained=pretrained, **model_args)\n return model",
"def gmixer_24_224(pretrained=False, **kwargs):\n model_args = dict(\n patch... | [
"0.7086883",
"0.7032471",
"0.69096994",
"0.6801879",
"0.67866653",
"0.6760022",
"0.6744345",
"0.64660275",
"0.6030006",
"0.5954828",
"0.59469813",
"0.58868486",
"0.5871037",
"0.5837621",
"0.5809196",
"0.58058",
"0.5804826",
"0.57774633",
"0.5775373",
"0.57746714",
"0.5751897"... | 0.7094495 | 0 |
MixerB/16 224x224. ImageNet21k pretrained weights. | def mixer_b16_224_miil(pretrained=False, **kwargs):
model_args = dict(patch_size=16, num_blocks=12, embed_dim=768, **kwargs)
model = _create_mixer('mixer_b16_224_miil', pretrained=pretrained, **model_args)
return model | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mixer_b16_224_in21k(pretrained=False, **kwargs):\n model_args = dict(patch_size=16, num_blocks=12, embed_dim=768, **kwargs)\n model = _create_mixer('mixer_b16_224_in21k', pretrained=pretrained, **model_args)\n return model",
"def mixer_b16_224(pretrained=False, **kwargs):\n model_args = dict(patc... | [
"0.7167913",
"0.71527106",
"0.69335216",
"0.6839573",
"0.6811659",
"0.6797652",
"0.6794605",
"0.66194034",
"0.6105734",
"0.6073738",
"0.6063613",
"0.6027579",
"0.60142124",
"0.5977915",
"0.5969693",
"0.59338677",
"0.58851445",
"0.58542734",
"0.5842513",
"0.5840265",
"0.583591... | 0.6930119 | 3 |
MixerB/16 224x224. ImageNet1k pretrained weights. | def mixer_b16_224_miil_in21k(pretrained=False, **kwargs):
model_args = dict(patch_size=16, num_blocks=12, embed_dim=768, **kwargs)
model = _create_mixer('mixer_b16_224_miil_in21k', pretrained=pretrained, **model_args)
return model | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mixer_b16_224(pretrained=False, **kwargs):\n model_args = dict(patch_size=16, num_blocks=12, embed_dim=768, **kwargs)\n model = _create_mixer('mixer_b16_224', pretrained=pretrained, **model_args)\n return model",
"def gmixer_24_224(pretrained=False, **kwargs):\n model_args = dict(\n patch_... | [
"0.7100905",
"0.694308",
"0.69410485",
"0.69397134",
"0.68245476",
"0.6787312",
"0.6648299",
"0.6506347",
"0.61536926",
"0.61287344",
"0.606396",
"0.59523994",
"0.5943103",
"0.59243506",
"0.5884881",
"0.588095",
"0.5869811",
"0.58364373",
"0.58364373",
"0.58364373",
"0.582236... | 0.6639807 | 7 |
Instantiate a PredictiveService object from config files or environment variables. The client needs a manager_endpoint, query_endpoint and admin_key to be able to conect to a deployment. These can be specified directly, or they can be loaded from the environment variables or configuration files. The logic for determini... | def connect(
manager_endpoint=None,
admin_key=None,
query_endpoint=None,
verify_certificate=None,
query_timeout=None,
name=None,
config_file=None):
from .connect_fn import connect
return connect(
manager_endpoint=manager_endpoint,
admin_key... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n service_name: pulumi.Input[str],\n source_configuration: pulumi.Input['ServiceSourceConfigurationArgs'],\n auto_scaling_configuration_arn: Optional[pulumi.Input[str]] = None,\n encryption_configuration: Optional[pulumi.Inpu... | [
"0.6079522",
"0.58786666",
"0.5578403",
"0.5553017",
"0.5537334",
"0.5508578",
"0.5464361",
"0.5450842",
"0.54344654",
"0.53901523",
"0.537252",
"0.5353996",
"0.53362006",
"0.5301033",
"0.52986634",
"0.52642757",
"0.5260768",
"0.52505887",
"0.5250148",
"0.5241675",
"0.5208844... | 0.0 | -1 |
initialize an instance of player in the stock market | def __init__(self, stock, share, utility_function, strategy):
self.stock = stock
self.share = share
self.utility_function = utility_function
self.strategy = strategy
# still need to consider the net worth | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, player):\n\t\tself.player = player",
"def __init__(self, player):\n self.player = player",
"def __init__(self, player_name):\n self._player_name = player_name\n self._hand = Deck() \n self._coder = Deck()",
"def __init__(self):\n\n self.name = 'KuhnPoke... | [
"0.77122253",
"0.7649427",
"0.73683906",
"0.73277867",
"0.7254356",
"0.72510403",
"0.7193283",
"0.71823275",
"0.7178522",
"0.7147636",
"0.7119837",
"0.7039878",
"0.7025952",
"0.6894338",
"0.688593",
"0.68726754",
"0.6806976",
"0.6775196",
"0.6730207",
"0.67289525",
"0.6727931... | 0.0 | -1 |
Get the name of a job on AWS Batch. | def job_name(self, job_id):
response = self.batch_client.describe_jobs(jobs=[job_id])
return response["jobs"][0]["jobName"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def job_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"job_name\")",
"def job_name(self) -> str:\n return self._step_execution_context.job_name",
"def job_name(self):\n return self._stub.List(self._message).job_name",
"def job_name(self) -> str:\n return pulumi.get(s... | [
"0.8114185",
"0.8055793",
"0.80422455",
"0.8028408",
"0.78392076",
"0.7719243",
"0.7267526",
"0.700591",
"0.6963253",
"0.69578",
"0.69578",
"0.69572437",
"0.67759687",
"0.6755352",
"0.6706915",
"0.6670052",
"0.6604503",
"0.65117663",
"0.649357",
"0.6421657",
"0.6346961",
"0... | 0.7455025 | 6 |
Returns true if it is enough money | def is_sufficient(money_received, price):
if price <= money_received:
change = round(money_received - price, 2)
print(f"Here is your {option}.Enjoy!\nHere us £{change} in change")
global profit
profit += price
return True
else:
print(f"Sorry not enough money")
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_money(self) -> bool: \n \n return self.money > 0.0",
"def check_money(drink, amount):\n if (drink == \"espresso\" and amount < MENU[drink][\"cost\"]) or (drink == \"latte\" and amount < MENU[drink][\"cost\"])\\\n or (drink == \"cappuccino\" and amount < MENU[drink][\"cost\... | [
"0.8003155",
"0.72446036",
"0.7213682",
"0.7057178",
"0.6980443",
"0.6977288",
"0.69540036",
"0.6934286",
"0.69103247",
"0.68991673",
"0.6882304",
"0.6881853",
"0.68597865",
"0.68193215",
"0.6807697",
"0.6806805",
"0.68065697",
"0.680363",
"0.6765275",
"0.67376804",
"0.672979... | 0.7571834 | 1 |
Name of the Azure Resource Group where the Managed Service Identity is located. | def resource_group_name(self) -> pulumi.Input[str]:
return pulumi.get(self, "resource_group_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_g... | [
"0.8187305",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.80156595",
"0.79108405",
"0.77322316",
"0.75278425",
"0.75278425",
"0.75278425",
"0.75278425",
"0.75278425",... | 0.7525246 | 41 |
Name of the Managed Service Identity. | def name(self) -> pulumi.Input[str]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identity_provider_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def identity_provider_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def getId(self):\n return self.getUserName()",
"def getId(self)... | [
"0.73764616",
"0.71317685",
"0.7045818",
"0.7045818",
"0.7004961",
"0.7004961",
"0.6891881",
"0.67815787",
"0.6750118",
"0.6729429",
"0.6703796",
"0.6693818",
"0.6686813",
"0.6647059",
"0.6635959",
"0.6605865",
"0.6602101",
"0.6602101",
"0.65914017",
"0.65893745",
"0.656779",... | 0.0 | -1 |
Name of the Azure Resource Group where the Managed Service Identity is located. | def resource_group_name(self) -> pulumi.Input[str]:
return pulumi.get(self, "resource_group_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_g... | [
"0.81889343",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.80170083",
"0.7911959",
"0.7734025",
"0.7529624",
"0.7529624",
"0.7529624",
"0.7529624",
"0.7529624",
"0.... | 0.7527018 | 53 |
Name of the Azure Resource Group where the Managed Service Identity is located. | def resource_group_name(self) -> pulumi.Input[str]:
return pulumi.get(self, "resource_group_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_g... | [
"0.8187782",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.8015983",
"0.7910549",
"0.77325076",
"0.75280905",
"0.75280905",
"0.75280905",
"0.75280905",
"0.75280905",
"0.7528090... | 0.75254333 | 42 |
Name of the Managed Service Identity. | def name(self) -> pulumi.Input[str]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identity_provider_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def identity_provider_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def getId(self):\n return self.getUserName()",
"def getId(self)... | [
"0.73764616",
"0.71317685",
"0.7045818",
"0.7045818",
"0.7004961",
"0.7004961",
"0.6891881",
"0.67815787",
"0.6750118",
"0.6729429",
"0.6703796",
"0.6693818",
"0.6686813",
"0.6647059",
"0.6635959",
"0.6605865",
"0.6602101",
"0.6602101",
"0.65914017",
"0.65893745",
"0.656779",... | 0.0 | -1 |
Name of the Managed Service Identity. | def name(self) -> pulumi.Input[str]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identity_provider_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def identity_provider_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def getId(self):\n return self.getUserName()",
"def getId(self)... | [
"0.73764616",
"0.71317685",
"0.7045818",
"0.7045818",
"0.7004961",
"0.7004961",
"0.6891881",
"0.67815787",
"0.6750118",
"0.6729429",
"0.6703796",
"0.6693818",
"0.6686813",
"0.6647059",
"0.6635959",
"0.6605865",
"0.6602101",
"0.6602101",
"0.65914017",
"0.65893745",
"0.656779",... | 0.0 | -1 |
Name of the Managed Service Identity. | def name(self) -> pulumi.Input[str]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identity_provider_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def identity_provider_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"identity_provider_name\")",
"def getId(self):\n return self.getUserName()",
"def getId(self)... | [
"0.73764616",
"0.71317685",
"0.7045818",
"0.7045818",
"0.7004961",
"0.7004961",
"0.6891881",
"0.67815787",
"0.6750118",
"0.6729429",
"0.6703796",
"0.6693818",
"0.6686813",
"0.6647059",
"0.6635959",
"0.6605865",
"0.6602101",
"0.6602101",
"0.65914017",
"0.65893745",
"0.656779",... | 0.0 | -1 |
Optionally set upper and lower bounds on the resource usage of the cluster. | def resource_limits(self) -> Optional[pulumi.Input['OceanAutoscalerResourceLimitsArgs']]:
return pulumi.get(self, "resource_limits") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_replace_cluster_resource_quota(self):\n pass",
"def test_patch_cluster_resource_quota(self):\n pass",
"def test_create_cluster_resource_quota(self):\n pass",
"def _setBound(self, value):\n if self._colormap is not None:\n if self._index == 0:\n m... | [
"0.62340325",
"0.6046373",
"0.603073",
"0.5842389",
"0.5801381",
"0.57989925",
"0.5793674",
"0.57265204",
"0.57265204",
"0.5704211",
"0.56901336",
"0.56507427",
"0.5620421",
"0.5609302",
"0.55850416",
"0.5583323",
"0.55270547",
"0.54840106",
"0.5478326",
"0.545133",
"0.541604... | 0.0 | -1 |
Name of the Load Balancer. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_name(self) -> str:\n return pulumi.get(self, \"load_balancer_name\")",
"def get_balancer_name(self):\n return '{}-{}'.format(\n self.config['namespace'],\n self.get_current_env(),\n )",
"def get_name(self):\n \n return 'Loop-Back'",
"... | [
"0.880513",
"0.8332856",
"0.7153318",
"0.704345",
"0.704345",
"0.704345",
"0.68022037",
"0.65597665",
"0.65567404",
"0.6509944",
"0.6422915",
"0.6317403",
"0.6317403",
"0.6283038",
"0.6230238",
"0.62154275",
"0.607859",
"0.60769063",
"0.6076552",
"0.6035202",
"0.6025433",
"... | 0.0 | -1 |
Name of the Load Balancer. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_name(self) -> str:\n return pulumi.get(self, \"load_balancer_name\")",
"def get_balancer_name(self):\n return '{}-{}'.format(\n self.config['namespace'],\n self.get_current_env(),\n )",
"def get_name(self):\n \n return 'Loop-Back'",
"... | [
"0.880513",
"0.8332856",
"0.7153318",
"0.704345",
"0.704345",
"0.704345",
"0.68022037",
"0.65597665",
"0.65567404",
"0.6509944",
"0.6422915",
"0.6317403",
"0.6317403",
"0.6283038",
"0.6230238",
"0.62154275",
"0.607859",
"0.60769063",
"0.6076552",
"0.6035202",
"0.6025433",
"... | 0.0 | -1 |
The Resource Group name of the Load Balancer. | def resource_group_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "resource_group_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")",
"def subnet_group_name(self) -> str:\n return pulumi.get(self, \"subnet_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")",
"d... | [
"0.79572827",
"0.7830379",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7564893",
"0.7406735",
"0.73829013",
"0.7380149",
"0.7319584",
"0.730452",
"0.730452",
"... | 0.7161006 | 62 |
Name of the Load Balancer. | def name(self) -> pulumi.Input[str]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_name(self) -> str:\n return pulumi.get(self, \"load_balancer_name\")",
"def get_balancer_name(self):\n return '{}-{}'.format(\n self.config['namespace'],\n self.get_current_env(),\n )",
"def get_name(self):\n \n return 'Loop-Back'",
"... | [
"0.880513",
"0.8332856",
"0.7153318",
"0.704345",
"0.704345",
"0.704345",
"0.68022037",
"0.65597665",
"0.65567404",
"0.6509944",
"0.6422915",
"0.6317403",
"0.6317403",
"0.6283038",
"0.6230238",
"0.62154275",
"0.607859",
"0.60769063",
"0.6076552",
"0.6035202",
"0.6025433",
"... | 0.0 | -1 |
The Resource Group name of the Load Balancer. | def resource_group_name(self) -> pulumi.Input[str]:
return pulumi.get(self, "resource_group_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")",
"def subnet_group_name(self) -> str:\n return pulumi.get(self, \"subnet_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")",
"d... | [
"0.79572827",
"0.7830379",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7564893",
"0.7406735",
"0.73829013",
"0.7380149",
"0.7319584",
"0.72974193",
"0.7161006",
... | 0.730452 | 26 |
The Resource Group name of the Load Balancer. | def resource_group_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "resource_group_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")",
"def subnet_group_name(self) -> str:\n return pulumi.get(self, \"subnet_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")",
"d... | [
"0.79572827",
"0.7830379",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7564893",
"0.7406735",
"0.73829013",
"0.7380149",
"0.7319584",
"0.730452",
"0.730452",
"... | 0.7161006 | 66 |
Name of the Load Balancer. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_name(self) -> str:\n return pulumi.get(self, \"load_balancer_name\")",
"def get_balancer_name(self):\n return '{}-{}'.format(\n self.config['namespace'],\n self.get_current_env(),\n )",
"def get_name(self):\n \n return 'Loop-Back'",
"... | [
"0.880513",
"0.8332856",
"0.7153318",
"0.704345",
"0.704345",
"0.704345",
"0.68022037",
"0.65597665",
"0.65567404",
"0.6509944",
"0.6422915",
"0.6317403",
"0.6317403",
"0.6283038",
"0.6230238",
"0.62154275",
"0.607859",
"0.60769063",
"0.6076552",
"0.6035202",
"0.6025433",
"... | 0.0 | -1 |
Name of the Load Balancer. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_name(self) -> str:\n return pulumi.get(self, \"load_balancer_name\")",
"def get_balancer_name(self):\n return '{}-{}'.format(\n self.config['namespace'],\n self.get_current_env(),\n )",
"def get_name(self):\n \n return 'Loop-Back'",
"... | [
"0.880513",
"0.8332856",
"0.7153318",
"0.704345",
"0.704345",
"0.704345",
"0.68022037",
"0.65597665",
"0.65567404",
"0.6509944",
"0.6422915",
"0.6317403",
"0.6317403",
"0.6283038",
"0.6230238",
"0.62154275",
"0.607859",
"0.60769063",
"0.6076552",
"0.6035202",
"0.6025433",
"... | 0.0 | -1 |
The Resource Group name of the Load Balancer. | def resource_group_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "resource_group_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")",
"def subnet_group_name(self) -> str:\n return pulumi.get(self, \"subnet_group_name\")",
"def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")",
"d... | [
"0.79572827",
"0.7830379",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7579691",
"0.7564893",
"0.7406735",
"0.73829013",
"0.7380149",
"0.7319584",
"0.730452",
"0.730452",
"... | 0.7161006 | 68 |
Initializes a bin boundaries policy. | def __init__(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, nbins):\n self.nbins = nbins\n # Since the kernel used to compute the Parzen histogram covers more\n # than one bin, we need to add extra bins to both sides of the\n # histogram to account for the contributions of the minimum and maximum\n # intensities. Paddin... | [
"0.6449037",
"0.6387521",
"0.6285541",
"0.6280361",
"0.6251438",
"0.62489843",
"0.61538625",
"0.61265224",
"0.61212796",
"0.61115295",
"0.60164094",
"0.6015808",
"0.599367",
"0.5982478",
"0.59810793",
"0.5948291",
"0.59249234",
"0.587637",
"0.5865971",
"0.58612216",
"0.583067... | 0.0 | -1 |
Initializes an equal bins bin boundaries policy, which splits given segment in n_bins equal bins | def __init__(self):
super().__init__() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __call__(self, n_bins, segment, elements):\n\n # n_bins\n assert type(n_bins) is int\n assert n_bins > 0\n\n # segment\n assert type(segment) is list or type(segment) is tuple\n assert len(segment) == 2\n assert np.isscalar(segment[0]) and np.isscalar(segment[1]... | [
"0.7455997",
"0.6693395",
"0.6666436",
"0.64258194",
"0.64184237",
"0.6328352",
"0.6305216",
"0.62915814",
"0.6257119",
"0.62522864",
"0.6204449",
"0.6200123",
"0.61353725",
"0.613077",
"0.60721934",
"0.6063227",
"0.60627365",
"0.6016463",
"0.6000508",
"0.5992032",
"0.5970120... | 0.0 | -1 |
Returns the bin boundaries corresponding to equal bins division. | def __call__(self, n_bins, segment, elements):
# n_bins
assert type(n_bins) is int
assert n_bins > 0
# segment
assert type(segment) is list or type(segment) is tuple
assert len(segment) == 2
assert np.isscalar(segment[0]) and np.isscalar(segment[1])
asse... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setup_bins(self):\n width = int((self.max - self.min) / self.bin_size)\n bins = {\n i * width + self.min: (idx, idx + self.bin_size)\n for i, idx in enumerate(range(0, len(self.nums), self.bin_size))\n }\n return bins",
"def create_bin_boundaries(config, epoc... | [
"0.68180656",
"0.67753506",
"0.666874",
"0.666874",
"0.66537887",
"0.66528153",
"0.6595812",
"0.6593624",
"0.65906334",
"0.6551482",
"0.6527699",
"0.64851177",
"0.64576644",
"0.64479256",
"0.6439022",
"0.6421989",
"0.63956535",
"0.6395359",
"0.637523",
"0.635393",
"0.63432133... | 0.0 | -1 |
Initializes a bin boundaries policy. | def __init__(self):
super().__init__() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, nbins):\n self.nbins = nbins\n # Since the kernel used to compute the Parzen histogram covers more\n # than one bin, we need to add extra bins to both sides of the\n # histogram to account for the contributions of the minimum and maximum\n # intensities. Paddin... | [
"0.6449037",
"0.6387521",
"0.6285541",
"0.6280361",
"0.6251438",
"0.62489843",
"0.61538625",
"0.61265224",
"0.61212796",
"0.61115295",
"0.60164094",
"0.6015808",
"0.599367",
"0.5982478",
"0.59810793",
"0.5948291",
"0.59249234",
"0.587637",
"0.5865971",
"0.58612216",
"0.583067... | 0.0 | -1 |
Returns the bin boundaries corresponding to an adaptative binning policy (same amount of samples in each bin). | def __call__(self, n_bins, segment, elements):
# n_bins
assert type(n_bins) is int
assert n_bins > 0
# segment
assert type(segment) is list or type(segment) is tuple
assert len(segment) == 2
assert np.isscalar(segment[0]) and np.isscalar(segment[1])
asse... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_bin_boundaries(config, epoch_df, data_type, obs_per_bin, verbose=False):\n \n edges = create_edges_set(config, epoch_df, data_type)\n \n boundaries = []\n for edge in edges:\n start, end, freq = edge\n bin_size = freq * obs_per_bin\n boundaries.append(np.arange(start,... | [
"0.6906366",
"0.6537558",
"0.65347296",
"0.64463836",
"0.6413292",
"0.6292854",
"0.6258061",
"0.6250795",
"0.62365216",
"0.6213129",
"0.6194402",
"0.6193482",
"0.6157634",
"0.6154605",
"0.6154605",
"0.61399573",
"0.61302316",
"0.6119312",
"0.61107475",
"0.6108714",
"0.6093567... | 0.6247204 | 8 |
Find original array position corresponding to the minimum. | def _argmin(a, positions, shape, dtype):
result = numpy.empty((1,), dtype=dtype)
pos_nd = numpy.unravel_index(positions[numpy.argmin(a)], shape)
for i, pos_nd_i in enumerate(pos_nd):
result["pos"][0, i] = pos_nd_i
return result[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _getMinPos(self, arr):\r\n min = sys.maxint\r\n found = False\r\n for i in arr:\r\n if i > 0 and i < min:\r\n min = i\r\n found = True\r\n # the minimum positive was found\r\n if found: return min\r\n # array has no positive val... | [
"0.7854409",
"0.77507657",
"0.75525033",
"0.7396175",
"0.7232142",
"0.72296506",
"0.72296506",
"0.7200933",
"0.7145143",
"0.71009755",
"0.7060765",
"0.70585364",
"0.70428294",
"0.70280695",
"0.69764924",
"0.69689983",
"0.69655937",
"0.6958234",
"0.6948245",
"0.6929774",
"0.69... | 0.6620152 | 42 |
It contains both the array filling and the solver in the same function. Parabolic equation scheme that solves the acoustic wave propagation eq. (Helmholtz) in an homogeneous atmosphere i.e. no temperature, no wind gradients, using the splitstep Pade method order (1, 1). This module calculates the main matrices accordin... | def pe_scheme_pade_1_1(k, beta, dx, dy, p_ij, Nx, Ny):
# =========================================================================
# Calculation of the coefficients, see
# [blairon_phd2002, Eqs.(2.18)-(2.19), p.45]
# =========================================================================
aj = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def solve_prep(self):\n\n par = self.par\n sol = self.sol\n\n # a. retirement\n sol.m_ret = np.zeros((par.T,par.Nm_ret))\n sol.c_ret = np.zeros((par.T,par.Nm_ret))\n sol.a_ret = np.zeros((par.T,par.Nm_ret))\n sol.inv_v_ret = np.zeros((par.T,par.Nm_ret))\n sol... | [
"0.6391222",
"0.6123368",
"0.6066365",
"0.5963264",
"0.59197015",
"0.5862415",
"0.5846772",
"0.5814556",
"0.5813433",
"0.58060807",
"0.5768328",
"0.5761221",
"0.57552654",
"0.575304",
"0.5746495",
"0.5740397",
"0.57202405",
"0.57110834",
"0.5703092",
"0.5701615",
"0.5700722",... | 0.6094687 | 2 |
Constructor, takes a difficulty level (likely the of plies to look ahead), and a player ID that's either 1 or 2 that tells the player what its number is. | def __init__(self, player_id, difficulty_level):
self.player_id = player_id
self.difficulty_level = difficulty_level
global our_player
our_player = player_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, player, num):\n self._player = player\n if num in range(1, self.NUM_WORKERS + 1):\n self._num = num\n else:\n raise ValueError(\"Worker number out of range!\")",
"def __init__(self, players, piles=None):\n self.players = players\n self.p... | [
"0.64122605",
"0.5960539",
"0.5920421",
"0.58485276",
"0.5841079",
"0.5829524",
"0.57891023",
"0.5735675",
"0.57280624",
"0.5719524",
"0.5708276",
"0.56990975",
"0.56898016",
"0.5654245",
"0.5649152",
"0.5647672",
"0.564437",
"0.56249195",
"0.56003016",
"0.55813307",
"0.55691... | 0.6993457 | 0 |
Initialize a Selenium webdriver to use within parse() To be used when accessing the archive data requires interacting with dynamic web content. Don't forget driver.close() when you are done using it! | def initialize_webdriver(isHeadless=False):
chromeOptions = webdriver.ChromeOptions()
chromeOptions.headless = isHeadless # TODO: figure out why headless=True doesn't actually do anything
prefs = {'download': {'prompt_for_download': False,
'directory_upgrad... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def init_driver():\n driver = webdriver.Firefox()\n driver.wait = WebDriverWait(driver,5)\n return driver",
"def __init__(self):\n self.driver = webdriver.Chrome()",
"def init_driver(self):\n # Set UserAgent to prevent issues with blocking bot\n self.chrome_options.add_argument(\n... | [
"0.7078528",
"0.69033545",
"0.6866029",
"0.67955315",
"0.6793586",
"0.6775826",
"0.6765113",
"0.67202",
"0.6664305",
"0.66542494",
"0.6626755",
"0.65547615",
"0.6537009",
"0.6503734",
"0.64238346",
"0.6311065",
"0.6295154",
"0.62726927",
"0.62531304",
"0.616807",
"0.61580557"... | 0.0 | -1 |
Get the score of the player. | def check_score(self):
# If player reaches the exit before time expires
final_score = int((5 - self._maze.items_remaining())*(self._time)*(100))
score = (final_score, 5 - self._maze.items_remaining(), self._time)
return score | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_score(self, player):\n if player in self.player_scores:\n return self.player_scores[player]\n else:\n raise Exception(\"Player not in score list\")",
"def getScore(self):\n return self._score",
"def getScore(self):\r\n return self._score",
"def get_cu... | [
"0.81308824",
"0.7916102",
"0.79082775",
"0.78827554",
"0.77889997",
"0.77889997",
"0.77889997",
"0.7785998",
"0.7772829",
"0.7772829",
"0.7772829",
"0.77170146",
"0.769591",
"0.76317406",
"0.7630988",
"0.758873",
"0.74535245",
"0.7418512",
"0.7399355",
"0.7334427",
"0.729653... | 0.0 | -1 |
Get the lines related to a deal. | def get_deal_to_lines_items(self, deal_id: str):
return self.get(object_id=deal_id, definition=Definitions.DEAL_TO_LINE_ITEM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_lines( self ):\n return self._line_info",
"def get_lines( self ):\n return self._line_info",
"def _get_lines(self, cr, uid, ids, context=None):\n List=[]\n if ids:\n line = self.pool.get('payment.enrich.lines').browse(cr, uid, ids[0], context=context)\n ... | [
"0.63553923",
"0.63553923",
"0.6183722",
"0.6180788",
"0.607534",
"0.5976401",
"0.5942503",
"0.5816974",
"0.5811173",
"0.57658505",
"0.56860894",
"0.5664385",
"0.56574476",
"0.56254745",
"0.5605287",
"0.5579725",
"0.5553092",
"0.5531513",
"0.552721",
"0.5446115",
"0.5433941",... | 0.7014289 | 0 |
construct dictionary of only empty squares and their potential values | def construct(board):
forward_checker = {}
# forward_checker.clear() # empty dictionary
for key in board:
if board[key] == 0:
forward_checker[key] = [1, 2, 3, 4, 5, 6, 7, 8, 9]
# else:
# forward_checker[key] = [board[key]]
return forward_checker | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_vals_no_total():\n return {key: val\n for key, val in create_values().items()\n if key != 'total'}",
"def generate_empty_slots():\n return {\n 'colors': ['', '', '', '', ''],\n 'pets': ['', '', '', '', ''],\n 'beverages': ['', '', '', '', ''],\n ... | [
"0.6243885",
"0.61896855",
"0.6083613",
"0.6079338",
"0.60047615",
"0.5907446",
"0.5821542",
"0.58209443",
"0.5812785",
"0.5810104",
"0.5778345",
"0.5749072",
"0.56873",
"0.56591564",
"0.5651439",
"0.5647132",
"0.5586422",
"0.5584934",
"0.5581962",
"0.55812806",
"0.5570528",
... | 0.0 | -1 |
checks for matching values in box, column, and row | def num_present(key, value, board):
row, col = find_box(key) # checks for box
for x in rows[row]:
for y in cols[col]:
if str(x + str(y)) != key and board[x + str(y)] == value:
return True
# checks for column
for x in ROW:
if str(x + str(key[1])) != key and bo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check(self,a,x,y):\r\n return not self.exitsinrow(self.rows,x,a) and not self.existsincol(self.rows,y,a) and \\\r\n not self.exitsinblock(self.rows, x - x % 3, y - y % 3,a)",
"def filter_box(col, row):\n # remember rows count from 0 at the top!\n correct_vertical = top <= r... | [
"0.71334743",
"0.68710464",
"0.67608577",
"0.67049557",
"0.65275186",
"0.6514084",
"0.6503803",
"0.6455853",
"0.6435733",
"0.6414909",
"0.64127135",
"0.64057654",
"0.6386308",
"0.6371007",
"0.6361754",
"0.6343299",
"0.63135606",
"0.63087994",
"0.6306642",
"0.6294338",
"0.6290... | 0.6289873 | 21 |
Stacks DenseNet `Blocks` and controls output feature density. First, this function creates scopes for the DenseNet in the form of 'block_name/unit_1', 'block_name/unit_2', etc. Second, this function allows the user to explicitly control the DenseNet output_stride, which is the ratio of the input to output spatial resol... | def stack_blocks_dense(net, blocks, output_stride=None,
outputs_collections=None):
# The current_stride variable keeps track of the effective stride of the
# activations. This allows us to invoke atrous convolution whenever applying
# the next residual unit would result in the activat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _make_layer(self, block, outputs, blocks, stride=1):\n downsample = None\n \n downsample = nn.Sequential(\n nn.Conv2d(self.inputs, outputs * 4,\n kernel_size=1, stride=stride, bias=False,\n dilation=self.dilation),\n n... | [
"0.67095476",
"0.6628262",
"0.6597186",
"0.6571228",
"0.6566734",
"0.65272266",
"0.6518464",
"0.6516603",
"0.65141594",
"0.647345",
"0.647345",
"0.6471791",
"0.6462785",
"0.64589566",
"0.6447416",
"0.6437835",
"0.64119303",
"0.6405013",
"0.63995725",
"0.6390525",
"0.6374955",... | 0.76367503 | 0 |
Defines the default DenseNet arg scope. | def densenet_arg_scope(weight_decay=0.0001,
batch_norm_decay=0.997,
batch_norm_epsilon=1e-5,
batch_norm_scale=True,
activation_fn=tf.nn.relu,
use_batch_norm=True):
batch_norm_params = {
'decay'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, units, activation=tf.nn.softmax):\n\n super(MyDense, self).__init__()\n\n self.units = units\n self.activation = activation",
"def voxel_env_override_defaults(env, parser):\n parser.set_defaults(\n encoder_type='conv',\n encoder_subtype='convnet_simple',\n hidd... | [
"0.61021656",
"0.5961416",
"0.5932741",
"0.5920117",
"0.58047855",
"0.5779062",
"0.57748246",
"0.5739009",
"0.5731394",
"0.5729082",
"0.56751686",
"0.56106573",
"0.5585652",
"0.5580625",
"0.55596423",
"0.5536981",
"0.55227524",
"0.5515084",
"0.5508407",
"0.5508143",
"0.546712... | 0.5746512 | 7 |
Returns the physical key of this PackageEntry. | def get(self):
return str(self.physical_key) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_key(self):\n return self._determine_key()",
"def get_key(self):\n\n return self._key",
"def getKey(self):\n return self.__key",
"def get_key(self):\n return self.key",
"def get_key(self):\n return self.key",
"def key(self):\n return key_for_name(self.name... | [
"0.7478392",
"0.7350143",
"0.72974485",
"0.72841096",
"0.72841096",
"0.7267298",
"0.72542363",
"0.72427773",
"0.722271",
"0.722271",
"0.722271",
"0.722271",
"0.7215273",
"0.7215016",
"0.7215016",
"0.7215016",
"0.7215016",
"0.7215016",
"0.7215016",
"0.7215016",
"0.7215016",
... | 0.76099217 | 0 |
Returns a JSON file as a `dict`. Assumes that the file is encoded using utf8. If 'use_cache_if_available'=True, will first try to retrieve the object from cache. | def get_as_json(self, use_cache_if_available=True):
obj_bytes = self.get_bytes(use_cache_if_available=use_cache_if_available)
return json.loads(obj_bytes.decode("utf-8")) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def json_from_cache(file_name: str) -> Optional[Dict]:\n\n json_path = os.path.join(CACHE_DIR, file_name)\n\n try:\n with open(json_path, \"r\") as cache_file:\n return json.load(cache_file)\n except IOError:\n log.notice(f\"Could not read JSON from {json_path}\")\n return ... | [
"0.7301624",
"0.7180902",
"0.69555193",
"0.689876",
"0.67896736",
"0.6725183",
"0.67142594",
"0.6673098",
"0.66405123",
"0.66195196",
"0.6493704",
"0.64933914",
"0.6479081",
"0.6476289",
"0.6471544",
"0.64292973",
"0.64235806",
"0.64172125",
"0.64164805",
"0.6403845",
"0.6386... | 0.6959318 | 2 |
Return the object as a string. Assumes that the file is encoded using utf8. If 'use_cache_if_available'=True, will first try to retrieve the object from cache. | def get_as_string(self, use_cache_if_available=True):
obj_bytes = self.get_bytes(use_cache_if_available=use_cache_if_available)
return obj_bytes.decode("utf-8") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_json_str(self):\n\n with open(self.path, mode='r', encoding='utf-8') as file:\n return file.read()",
"def get_as_json(self, use_cache_if_available=True):\n obj_bytes = self.get_bytes(use_cache_if_available=use_cache_if_available)\n return json.loads(obj_bytes.decode(\"utf-... | [
"0.6270117",
"0.5985529",
"0.59584963",
"0.58216685",
"0.5815428",
"0.5783566",
"0.57818735",
"0.5769794",
"0.57582355",
"0.5742483",
"0.5722511",
"0.56738025",
"0.5592557",
"0.55636966",
"0.5557308",
"0.5534637",
"0.55171984",
"0.5512726",
"0.5500119",
"0.5491391",
"0.548873... | 0.8086379 | 0 |
Converts a string logical key like 'a/b/c' into a list of ['a', 'b', 'c']. Returns the original key if it's already a list or a tuple. | def _split_key(cls, logical_key):
if isinstance(logical_key, str):
path = logical_key.split('/')
elif isinstance(logical_key, (tuple, list)):
path = logical_key
else:
raise TypeError('Invalid logical_key: %r' % logical_key)
return path | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _force_key_as_list(self, key):\r\n return [key] if isinstance(key, (str, unicode)) else key",
"def convert_string_to_list(key, data, errors, context): # noqa\n value = data.get(key, None)\n\n if not value:\n return\n\n if not isinstance(value, basestring):\n return\n\n if not... | [
"0.73896444",
"0.6764685",
"0.6526719",
"0.64159375",
"0.6278686",
"0.62672275",
"0.6209984",
"0.6064602",
"0.60333306",
"0.5974406",
"0.5929689",
"0.58924097",
"0.5889773",
"0.57732236",
"0.5762269",
"0.5739299",
"0.5712845",
"0.5699357",
"0.566872",
"0.56338716",
"0.5625266... | 0.6846116 | 1 |
Provides a generator of the dicts that make up the serialized package. | def manifest(self):
yield self._meta
for dir_key, meta in self._walk_dir_meta():
yield {'logical_key': dir_key, 'meta': meta}
for logical_key, entry in self.walk():
yield {'logical_key': logical_key, **entry.as_dict()} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def package_dict_items():\n for idx, (key, py_subobj) in enumerate(py_obj.items()):\n # Obtain the raw string representation of this key\n key_base_type = key.__class__.__name__.encode(\"utf8\")\n if isinstance(key,str):\n if not _str_slashes.search(key):\n ... | [
"0.6863486",
"0.6348626",
"0.6281645",
"0.62148905",
"0.6148441",
"0.6082758",
"0.60301447",
"0.60301447",
"0.6029518",
"0.596429",
"0.5956002",
"0.59310085",
"0.58774257",
"0.586106",
"0.58506423",
"0.58385885",
"0.5824419",
"0.57973164",
"0.57896686",
"0.57339555",
"0.57111... | 0.6194139 | 4 |
List of object instances > List of dicts of primitive datatypes. | def to_representation(self, data):
# Dealing with nested relationships, data can be a Manager,
# so, first get a queryset from the Manager if needed
iterable = data.all() if isinstance(data, models.Manager) else data
if self.parent is None:
post = [
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def object_lists(self) -> Dict[str, List[Any]]:\n return {name: self.hyperparams[name][2] for name in self.names()\n if self.hyperparams[name][0] == 'object'}",
"def realized(self):\n result = {\"Object\": True}\n for key in self.__dict__:\n if isinstance(self.__dic... | [
"0.6586766",
"0.64861053",
"0.62794113",
"0.6198592",
"0.6173198",
"0.61402655",
"0.61016357",
"0.605232",
"0.6031452",
"0.59889257",
"0.5957664",
"0.59568137",
"0.5953441",
"0.5942399",
"0.5901588",
"0.58798546",
"0.58619666",
"0.5852426",
"0.5840335",
"0.584009",
"0.5831939... | 0.0 | -1 |
Concatenates the two given score vectors into a single vector, with tar scores first. Construct an (integer) label vector of the same length, with 1's for tar scores and 0's for non scores. Returns scores, labels | def tarnon_2_scoreslabels(tar,non):
scores = np.concatenate((tar,non))
labels = np.zeros_like(scores,dtype=int)
labels[:len(tar)] = 1.0
return scores, labels | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scoreslabels_2_tarnon(scores,labels):\n tt = labels==1\n tar = scores[tt]\n non = scores[np.logical_not(tt)]\n return tar, non",
"def flatten_binary_scores(self, scores, labels, ignore=None):\n scores = scores.view(-1)\n labels = labels.view(-1)\n if ignore is None:\n ... | [
"0.7191614",
"0.66741866",
"0.6647309",
"0.64384025",
"0.6430143",
"0.6423531",
"0.6153874",
"0.6145536",
"0.6033487",
"0.6026905",
"0.601151",
"0.5952355",
"0.58976436",
"0.5862081",
"0.5850415",
"0.57978815",
"0.5774183",
"0.5767237",
"0.5675952",
"0.56584734",
"0.56435555"... | 0.7557037 | 0 |
Splits the given scores vector according to the vector of binary labels. Labels for tar scores should equate to 1 (e.g. 1 or 1.0 or True) and everything else is considered non scores. Return tar, non | def scoreslabels_2_tarnon(scores,labels):
tt = labels==1
tar = scores[tt]
non = scores[np.logical_not(tt)]
return tar, non | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def flatten_binary_scores(self, scores, labels, ignore=None):\n scores = scores.view(-1)\n labels = labels.view(-1)\n if ignore is None:\n return scores, labels\n valid = (labels != ignore)\n vscores = scores[valid]\n vlabels = labels[valid]\n return vsco... | [
"0.6953841",
"0.68467474",
"0.6249644",
"0.6083094",
"0.60430837",
"0.59562415",
"0.5919993",
"0.574733",
"0.56822276",
"0.5665791",
"0.5654675",
"0.56373054",
"0.5595978",
"0.55164623",
"0.5494454",
"0.54738665",
"0.54479057",
"0.5428966",
"0.54197586",
"0.54145217",
"0.5411... | 0.73546857 | 0 |
numerically stable and complexstepfriendly version of sigmoid | def cs_sigmoid(x):
if not np.iscomplexobj(x): return expit(x)
rx = np.real(x)
p, q = expit(rx), expit(-rx)
return p + 1.0j*p*q*np.imag(x) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sigmoid(x):\r\n return 1 / (1 + np.exp(-x))",
"def sigmoid(t):\n return np.exp(t)/(1+np.exp(t))",
"def _tanh_to_sigmoid(x):\n return x * 0.5 + 0.5",
"def sigmoid(x):\n return 1 / (1 + exp(-x))",
"def sigmoid(x):\n return 1 / (1 + exp(-x))",
"def sigmoid(t):\n return 1 / (1 + np.exp(... | [
"0.82077837",
"0.8196669",
"0.81670696",
"0.8156257",
"0.8156257",
"0.8155445",
"0.8148361",
"0.8148361",
"0.8148361",
"0.8148361",
"0.8148361",
"0.8148361",
"0.81293887",
"0.81216013",
"0.8119035",
"0.8111779",
"0.8109272",
"0.809305",
"0.8090686",
"0.8090508",
"0.8072827",
... | 0.7739778 | 65 |
Initializer for MTCACrate object. | def __init__(self):
self.host = None
self.user = None
self.password = None
# Initialize dictionaries of FRUs
self.frus = {}
self.frus_inited = False
# Initialize dictionaries for MCH firmware
self.mch_fw_ver = {}
self.mch_fw_date = {}
#... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n _snap.TChATr_swiginit(self, _snap.new_TChATr(*args))",
"def __init__(self, learning_rate, momentum_coef):\n self.learning_rate = learning_rate\n self.momentum_coef = momentum_coef",
"def __init__(self):\n super(ASYMMETRIC, self).__init__(quant_type=Const... | [
"0.6115721",
"0.59686774",
"0.59036225",
"0.5780382",
"0.57504666",
"0.57154",
"0.5705899",
"0.5670899",
"0.56246865",
"0.5586428",
"0.55534035",
"0.55499995",
"0.5540084",
"0.55349433",
"0.55311316",
"0.54868597",
"0.5479804",
"0.54795897",
"0.547524",
"0.54740137",
"0.54654... | 0.0 | -1 |
Get MCH firmware version | def read_fw_version(self):
# This function expects the firmware version to be in a line
# prefixed with 'Product Extra'.
# At the moment, it takes the form:
# Product Extra : MCH FW V2.18.8 Final (r14042) (Mar 31 2017 - 11:29)
# The following two parts will be extracted:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def firmware_version(self):\n return self._get_system_status()[\"firmware\"]",
"def firmware_version(self):\n return self.data.get('fw_ver')",
"def firmware_version(self):\n return self._read(MX_FIRMWARE_VERSION)",
"def get_firmware_version():\r\n return utils.run('crossystem fwid').stdou... | [
"0.8036274",
"0.7992652",
"0.7971279",
"0.78587514",
"0.7786334",
"0.7703938",
"0.7685445",
"0.7592841",
"0.7500363",
"0.74949515",
"0.74270654",
"0.74054337",
"0.7399132",
"0.7390685",
"0.7295886",
"0.72895133",
"0.72604287",
"0.7145621",
"0.71143144",
"0.7112842",
"0.710717... | 0.7436829 | 10 |
Get MCH firmware version | def get_fw_ver(self, rec, report):
rec.VAL = self.crate.mch_fw_ver[self.slot] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def firmware_version(self):\n return self._get_system_status()[\"firmware\"]",
"def firmware_version(self):\n return self.data.get('fw_ver')",
"def firmware_version(self):\n return self._read(MX_FIRMWARE_VERSION)",
"def get_firmware_version():\r\n return utils.run('crossystem fwid').stdou... | [
"0.8036274",
"0.7992652",
"0.7971279",
"0.78587514",
"0.7786334",
"0.7703938",
"0.7685445",
"0.7592841",
"0.7500363",
"0.74949515",
"0.7436829",
"0.74270654",
"0.74054337",
"0.7399132",
"0.7390685",
"0.7295886",
"0.72895133",
"0.72604287",
"0.7145621",
"0.71143144",
"0.711284... | 0.6710377 | 32 |
Initializes the position of Camera | def initialize_camera(self, distance, yaw, pitch, x=0, y=0, z=0):
lookat = [x, y, z]
self._env.unwrapped._p.resetDebugVisualizerCamera(
distance, yaw, pitch, lookat) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setup_camera(self) -> None:\n self.world.camera.update(\n cam_base_pos=(0, -3, 0),\n cam_dist=1.2*self.world.env_dim,\n cam_yaw=0,\n cam_pitch=-60\n )",
"def setup_camera(self) -> None:\n self.world.camera.update(\n cam_base_pos=(3.,... | [
"0.7643212",
"0.7562648",
"0.74207866",
"0.70391667",
"0.6945583",
"0.6884315",
"0.6877308",
"0.68465936",
"0.68248117",
"0.6786595",
"0.6773166",
"0.67729867",
"0.676682",
"0.6739614",
"0.66899663",
"0.66832453",
"0.66652155",
"0.6641177",
"0.6636562",
"0.6593219",
"0.649200... | 0.6963185 | 4 |
Retun the most recent datetime of summary updates. | def latest_update():
try:
return ProjectSummary.objects.latest().updated_at
except ProjectSummary.DoesNotExist:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def last_updated(self):\n try:\n return max(self.station_usage, key=lambda x: x.last_update).dt_last_update\n except ValueError:\n return datetime.fromtimestamp(0)",
"def last_update(self): # TOFIX model the job and return an object instead of dictionary\n return self.... | [
"0.71398884",
"0.7111152",
"0.6768755",
"0.6666355",
"0.6631375",
"0.6624208",
"0.6593684",
"0.6551277",
"0.6493788",
"0.6467153",
"0.64292127",
"0.63852286",
"0.6342855",
"0.63410705",
"0.63262355",
"0.63262355",
"0.63120455",
"0.63120455",
"0.6307136",
"0.62765676",
"0.6270... | 0.75358295 | 0 |
Create train & test data providers. | def get_data_provider(self, net_spec):
dp = dict()
# Data spec path.
dspec_path = self.get('train','dspec_path')
# Create train data provider.
params = self._get_data_provider_params('train')
dp['train'] = VolumeDataProvider(dspec_path, net_spec, params)
# Create ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def data_creator(config):\n train_dataset, val_dataset = LinearDataset(2, 5), LinearDataset(2, 5)\n train_loader = DataLoader(train_dataset, batch_size=config[\"batch_size\"])\n val_loader = DataLoader(val_dataset, batch_size=config[\"batch_size\"])\n return train_loader, val_loader",
"def train_vali... | [
"0.71431345",
"0.6720431",
"0.6717653",
"0.665586",
"0.66392034",
"0.66274554",
"0.6615832",
"0.6613915",
"0.65914506",
"0.6508843",
"0.64815503",
"0.64604974",
"0.6442216",
"0.6427538",
"0.639571",
"0.63909596",
"0.6385171",
"0.6370525",
"0.6321145",
"0.6309517",
"0.6276667"... | 0.61826885 | 32 |
Calculates the area of a shape | def area(self):
raise Exception('Not implemented') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def area(self):\n if isinstance(self.crs, GeographicalCRS):\n major_axis = self.crs.ellipsoid.a\n minor_axis = self.crs.ellipsoid.b\n\n area = 0.0\n if major_axis == minor_axis: # Sphere\n for seg in self.segment_tuples:\n x1, ... | [
"0.7695551",
"0.7685032",
"0.7591975",
"0.7534793",
"0.7508775",
"0.75061005",
"0.7469105",
"0.7468092",
"0.7457919",
"0.7442044",
"0.7402884",
"0.73965585",
"0.7375077",
"0.7375077",
"0.73694754",
"0.7365209",
"0.7364413",
"0.73594385",
"0.7337847",
"0.7330464",
"0.7322413",... | 0.0 | -1 |
Calculates the area af a square | def area(self):
return 'Square area' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def square_area(side):\n return side**2",
"def findArea(self):\n\n a, b = self.sides\n area = a * b\n print(f\"Are of rectangle is: {area}\")",
"def area(x, y):\n return x*y/2",
"def area(width, height):\n return width * height",
"def calculatearea(self):\r\n return sel... | [
"0.82134044",
"0.78268933",
"0.7790995",
"0.7756516",
"0.7704699",
"0.7662538",
"0.754764",
"0.7539041",
"0.7533709",
"0.75257933",
"0.7511",
"0.7509741",
"0.7478278",
"0.7471898",
"0.74677366",
"0.74600554",
"0.7459774",
"0.7444188",
"0.74239254",
"0.74156636",
"0.7410346",
... | 0.0 | -1 |
Sets the categories of this BaseAdDataForSearch. | def categories(self, categories):
self._categories = categories | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def categories(self, categories):\n self._categories = categories",
"def categories(self, categories: List[str]):\n\n self._categories = categories",
"def set_categories(self, categories: NounCategories):\n \n self._categories = categories",
"def setCategories(self, categories):\n ... | [
"0.73884183",
"0.72034305",
"0.7153141",
"0.7019937",
"0.62000096",
"0.6057245",
"0.5995357",
"0.5966535",
"0.56916934",
"0.56397235",
"0.5596449",
"0.5588861",
"0.557996",
"0.557045",
"0.5489857",
"0.5469822",
"0.5405812",
"0.5377881",
"0.53474236",
"0.53264916",
"0.5296005"... | 0.734129 | 2 |
Sets the custom_fields of this BaseAdDataForSearch. | def custom_fields(self, custom_fields):
self._custom_fields = custom_fields | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def custom_profile_fields(self, custom_profile_fields):\n\n self._custom_profile_fields = custom_profile_fields",
"def custom_data(self, custom_data):\n\n self._custom_data = custom_data",
"def custom_attributes(self, custom_attributes):\n\n self._custom_attributes = custom_attributes",
... | [
"0.6411198",
"0.6078602",
"0.6072139",
"0.5756322",
"0.56686115",
"0.5605308",
"0.55792636",
"0.55156416",
"0.55126953",
"0.5376872",
"0.53645337",
"0.5320345",
"0.5287433",
"0.5276344",
"0.5252967",
"0.52468073",
"0.5186415",
"0.5184982",
"0.50983006",
"0.5074235",
"0.504424... | 0.7507983 | 2 |
Sets the fields_in_basic_search of this BaseAdDataForSearch. | def fields_in_basic_search(self, fields_in_basic_search):
self._fields_in_basic_search = fields_in_basic_search | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fields_in_advanced_search(self, fields_in_advanced_search):\n\n self._fields_in_advanced_search = fields_in_advanced_search",
"def basic_fields(self, basic_fields):\n\n self._basic_fields = basic_fields",
"def address_fields_in_search(self, address_fields_in_search):\n\n self._address_... | [
"0.71088934",
"0.6846181",
"0.6159923",
"0.58713955",
"0.56594247",
"0.4967594",
"0.4967594",
"0.49000058",
"0.48954058",
"0.4816377",
"0.4764036",
"0.46543875",
"0.46474066",
"0.4609227",
"0.45943502",
"0.45474544",
"0.45305035",
"0.45041907",
"0.45038703",
"0.44140503",
"0.... | 0.8956441 | 0 |
Sets the fields_in_list of this BaseAdDataForSearch. | def fields_in_list(self, fields_in_list):
self._fields_in_list = fields_in_list | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def address_fields_in_search(self, address_fields_in_search):\n\n self._address_fields_in_search = address_fields_in_search",
"def fields_in_advanced_search(self, fields_in_advanced_search):\n\n self._fields_in_advanced_search = fields_in_advanced_search",
"def available_field_list(self, availabl... | [
"0.6478048",
"0.63482517",
"0.6042597",
"0.5994173",
"0.56881785",
"0.5615749",
"0.5533129",
"0.54543924",
"0.5398735",
"0.5305031",
"0.51575154",
"0.51546115",
"0.51013255",
"0.50712276",
"0.4903695",
"0.48613474",
"0.4854559",
"0.48535833",
"0.48428518",
"0.4821731",
"0.481... | 0.8467736 | 1 |
Sets the address_fields_in_search of this BaseAdDataForSearch. | def address_fields_in_search(self, address_fields_in_search):
self._address_fields_in_search = address_fields_in_search | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fields_in_advanced_search(self, fields_in_advanced_search):\n\n self._fields_in_advanced_search = fields_in_advanced_search",
"def fields_in_basic_search(self, fields_in_basic_search):\n\n self._fields_in_basic_search = fields_in_basic_search",
"def _set_search_addresses(self):\n if se... | [
"0.65279025",
"0.6294278",
"0.59738123",
"0.58110046",
"0.5721036",
"0.56153923",
"0.5556672",
"0.5391849",
"0.537809",
"0.537809",
"0.53185976",
"0.528385",
"0.5115941",
"0.5115941",
"0.5067776",
"0.5047436",
"0.49988762",
"0.490435",
"0.48642406",
"0.48424363",
"0.48424363"... | 0.8917376 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.