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 |
|---|---|---|---|---|---|---|
Predict movement of game controler where is epsilon probability randomly move. | def predict_movement(self, data, epsilon):
q_actions = self.model.predict(data, batch_size = 1)
opt_policy = np.argmax(q_actions)
rand_val = np.random.random()
if rand_val < epsilon:
opt_policy = np.random.randint(0, NUM_ACTIONS)
return opt_policy, q_actions[0, opt_p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def predict_movement(self, data, epsilon):\r\n q_actions = self.model.predict(\r\n data.reshape(1, 84, 84, NUM_FRAMES), batch_size=1)\r\n opt_policy = np.argmax(q_actions)\r\n rand_val = np.random.random()\r\n if rand_val < epsilon:\r\n opt_policy = np.random.randi... | [
"0.69462216",
"0.6196142",
"0.6062116",
"0.60579133",
"0.6046149",
"0.59867793",
"0.5935718",
"0.5925391",
"0.5916562",
"0.58774805",
"0.58399194",
"0.5835668",
"0.58135206",
"0.58135206",
"0.5780464",
"0.5778295",
"0.5770455",
"0.57525134",
"0.57474387",
"0.57465005",
"0.574... | 0.7030055 | 0 |
Set up test data for the whole TestCase (only run once for the TestCase) | def setUpTestData(cls):
data_gen.run() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setUp(self):\n\n self.test_data_path = 'testing/test_data/'",
"def setUp(self):\n self.dataset = get_test_dataset()",
"def setUpTestData(cls):\n # volunteer user\n common.initialize_empty_volunteer()",
"def setUp(self):\n self.dataset = self.dataset_cls()",
"def setUp... | [
"0.8151247",
"0.81397104",
"0.8050004",
"0.775654",
"0.7749413",
"0.77358264",
"0.75723577",
"0.7563123",
"0.75573385",
"0.75541633",
"0.75483334",
"0.7507037",
"0.75037056",
"0.74770427",
"0.74658823",
"0.74603325",
"0.74401635",
"0.7431206",
"0.7431103",
"0.74309117",
"0.74... | 0.80488545 | 5 |
Asynchronous generator for iterating through raw stations from the API. The station list is a paged response, but this generator abstracts that away. | async def _fetch_raw_stations(session: ClientSession, headers: dict, query_builder: BuildQuery) -> dict:
# We don't know how many pages until our first call - so we assume one page to start with.
total_pages = 1
page_count = 0
while page_count < total_pages:
# Build up the request URL.
u... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def stations(self):\n for stat in sorted(self.station_records):\n yield self.station_records[stat]",
"async def stations():\n with open(\"/data/station_list.json\") as j:\n data = json.load(j)\n return data",
"def stations():\r\n for row in rows():\r\n yield tuple(row)"... | [
"0.67368126",
"0.6495092",
"0.62871516",
"0.6250763",
"0.6233968",
"0.617859",
"0.6159735",
"0.5937769",
"0.5905411",
"0.58789515",
"0.58734304",
"0.5849237",
"0.5838415",
"0.58252174",
"0.5797338",
"0.5739564",
"0.5685018",
"0.564997",
"0.5632827",
"0.5619016",
"0.56106275",... | 0.81258637 | 0 |
Transform from the json object returned by wf1, to our station object. | def _parse_station(station) -> WeatherStation:
with open(core_season_file_path) as file_handle:
core_seasons = json.load(file_handle)
ecodivisions = geopandas.read_file(ecodiv_shape_file_path)
station_coord = Point(
float(station['longitude']), float(station['latitude']))
# hacky fix fo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_json(\n json_data: str,\n dest_class: type[Station | AvailabilityInfo | AvailableVehicleCategory | Coord]\n | None = None,\n ) -> Station:\n dict_data = json.loads(json_data)\n\n return StationFactory.from_dict(dict_data, dest_class=dest_class)",
"def xmlTreeToStati... | [
"0.6231825",
"0.6018233",
"0.56866604",
"0.56725705",
"0.562914",
"0.54520166",
"0.5425616",
"0.5349745",
"0.5308549",
"0.52492243",
"0.52482665",
"0.52387005",
"0.5227275",
"0.5201967",
"0.5194102",
"0.51921135",
"0.51889974",
"0.51880383",
"0.51843244",
"0.5161492",
"0.5149... | 0.5829514 | 2 |
Get a list of stations by code, from local json files. | def _get_stations_by_codes_local(station_codes: List[int]) -> List[WeatherStation]:
LOGGER.info('Using pre-generated json to retrieve station by code')
with open(weather_stations_file_path) as file_pointer:
stations = json.load(file_pointer)
results = []
for station in stations['weather_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_stations_local() -> List[dict]:\n LOGGER.info('Using pre-generated json to retrieve station list')\n with open(weather_stations_file_path) as weather_stations_file:\n json_data = json.load(weather_stations_file)\n return json_data['weather_stations']",
"async def stations():\n wit... | [
"0.74574673",
"0.7159132",
"0.68774474",
"0.6798813",
"0.64631224",
"0.6418322",
"0.6371534",
"0.62950915",
"0.62937933",
"0.6224961",
"0.6178127",
"0.61669594",
"0.6069703",
"0.6005044",
"0.59697324",
"0.5929631",
"0.5880136",
"0.58779263",
"0.58657503",
"0.5856827",
"0.5791... | 0.8389391 | 0 |
Get a list of stations by code, from WFWX Fireweather API. | async def _get_stations_by_codes_remote(station_codes: List[int]) -> List[WeatherStation]:
LOGGER.info('Using WFWX to retrieve stations by code')
async with ClientSession() as session:
# Get the authentication header
header = await _get_auth_header(session)
stations = []
# Iterat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_stations_by_codes(station_codes: List[int]) -> List[WeatherStation]:\n use_wfwx = config.get('USE_WFWX') == 'True'\n if use_wfwx:\n return await _get_stations_by_codes_remote(station_codes)\n return _get_stations_by_codes_local(station_codes)",
"def _get_stations_by_codes_local(stat... | [
"0.7805629",
"0.757525",
"0.68486214",
"0.66801566",
"0.6492312",
"0.6452452",
"0.6391615",
"0.6378871",
"0.6350558",
"0.6347543",
"0.6075032",
"0.60301447",
"0.6019879",
"0.5972413",
"0.59601486",
"0.59277767",
"0.5922856",
"0.59155476",
"0.5905507",
"0.58728063",
"0.5841201... | 0.7607099 | 1 |
Get a list of stations by code, from WFWX Fireweather API. | async def get_stations_by_codes(station_codes: List[int]) -> List[WeatherStation]:
use_wfwx = config.get('USE_WFWX') == 'True'
if use_wfwx:
return await _get_stations_by_codes_remote(station_codes)
return _get_stations_by_codes_local(station_codes) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def _get_stations_by_codes_remote(station_codes: List[int]) -> List[WeatherStation]:\n LOGGER.info('Using WFWX to retrieve stations by code')\n async with ClientSession() as session:\n # Get the authentication header\n header = await _get_auth_header(session)\n stations = []\n ... | [
"0.7606622",
"0.75749195",
"0.684837",
"0.6680998",
"0.6492543",
"0.64532334",
"0.63920206",
"0.6379954",
"0.63513964",
"0.63477105",
"0.6074862",
"0.6029056",
"0.6020498",
"0.5974272",
"0.59604603",
"0.5929188",
"0.5922481",
"0.5917066",
"0.59061295",
"0.58735603",
"0.584226... | 0.7804556 | 0 |
Get list of stations from local json files. | def _get_stations_local() -> List[dict]:
LOGGER.info('Using pre-generated json to retrieve station list')
with open(weather_stations_file_path) as weather_stations_file:
json_data = json.load(weather_stations_file)
return json_data['weather_stations'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def stations():\n with open(\"/data/station_list.json\") as j:\n data = json.load(j)\n return data",
"async def stations_data():\n with open(\"/data/station_data.json\") as j:\n data = json.load(j)\n return data",
"def stations(self):\n try:\n stations_api = re... | [
"0.82146585",
"0.74564046",
"0.728124",
"0.7084637",
"0.7056293",
"0.70517755",
"0.69984025",
"0.69483215",
"0.67775536",
"0.6773161",
"0.67388767",
"0.672294",
"0.66115063",
"0.6608919",
"0.659881",
"0.6581752",
"0.65682846",
"0.6567644",
"0.6543293",
"0.6535716",
"0.6520563... | 0.8425784 | 0 |
Get list of stations from WFWX Fireweather API. | async def _get_stations_remote() -> List[WeatherStation]:
LOGGER.info('Using WFWX to retrieve station list')
async with ClientSession() as session:
# Get the authentication header
header = await _get_auth_header(session)
stations = []
# Iterate through "raw" station data.
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_stations() -> List[WeatherStation]:\n # Check if we're really using the api, or loading from pre-generated files.\n use_wfwx = config.get('USE_WFWX') == 'True'\n if use_wfwx:\n return await _get_stations_remote()\n return _get_stations_local()",
"def stations(self):\n try:... | [
"0.82809913",
"0.7771363",
"0.74885744",
"0.7413649",
"0.72549707",
"0.72350067",
"0.722443",
"0.7072283",
"0.6935434",
"0.68678176",
"0.6863236",
"0.68527937",
"0.67632633",
"0.67337245",
"0.67000765",
"0.6685334",
"0.66791695",
"0.6652216",
"0.6647041",
"0.6636076",
"0.6613... | 0.7845371 | 1 |
Get list of stations from WFWX Fireweather API. | async def get_stations() -> List[WeatherStation]:
# Check if we're really using the api, or loading from pre-generated files.
use_wfwx = config.get('USE_WFWX') == 'True'
if use_wfwx:
return await _get_stations_remote()
return _get_stations_local() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def _get_stations_remote() -> List[WeatherStation]:\n LOGGER.info('Using WFWX to retrieve station list')\n async with ClientSession() as session:\n # Get the authentication header\n header = await _get_auth_header(session)\n stations = []\n # Iterate through \"raw\" station ... | [
"0.7845434",
"0.7771876",
"0.748899",
"0.741431",
"0.7255944",
"0.7235346",
"0.7226004",
"0.70730346",
"0.6936569",
"0.68690205",
"0.68634385",
"0.685369",
"0.676402",
"0.67349577",
"0.6700988",
"0.66859597",
"0.66799074",
"0.66532445",
"0.6648646",
"0.6637085",
"0.6614241",
... | 0.8281624 | 0 |
any leading/trailing whitespaces within a column will be stripped before concatenation occurs | def test_leading_trailing_whitespaces_in_fields_are_stripped(self):
self.df["new_concat_field_ae"] = concat_fieldvalues(self.df, ['a', 'e'])
expected_result_ae = pd.DataFrame({'new_concat_field_ae': ['x y12', 'y', 'x']})
assert_series_equal(self.df["new_concat_field_ae"], expected_result_ae['ne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def shrink_whitespace(data: pd.Series) -> pd.Series:\n data = data.replace(r'\\s+', value=' ', regex=True)\n return data.str.strip()",
"def trim_space(df,col_name):\n return df.withColumn(col_name,trim(col_name))",
"def strip_space():\n pass",
"def strip_whitespace(df, column=None):\n\n if col... | [
"0.6823222",
"0.6604545",
"0.6570077",
"0.6364026",
"0.6335646",
"0.6329843",
"0.6198812",
"0.6126812",
"0.59653634",
"0.59643805",
"0.59622455",
"0.59478277",
"0.58384967",
"0.58330184",
"0.5814154",
"0.58054256",
"0.57901293",
"0.57901293",
"0.57778543",
"0.57745075",
"0.57... | 0.76979816 | 0 |
Creates temporary directory and stores its info into context | def secure_temp_dir(context):
tmpd = tempfile.TemporaryDirectory()
context.tempdir = tmpd | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_temp_dir(self, *args, **kwargs):\n temp_dir = tempfile.mkdtemp(*args, **kwargs)\n try:\n yield decode_path(temp_dir)\n finally:\n remove_directory(temp_dir)",
"def temp_dir(**kwargs):\n temp_dir = tempfile.mkdtemp(**kwargs)\n try:\n yield temp_di... | [
"0.8158818",
"0.78283817",
"0.77372694",
"0.76806664",
"0.766208",
"0.74761015",
"0.74744624",
"0.7450188",
"0.7448393",
"0.7428337",
"0.74026716",
"0.7401885",
"0.7380455",
"0.7366078",
"0.73458976",
"0.7343354",
"0.73274374",
"0.728105",
"0.7277625",
"0.7271985",
"0.7268763... | 0.7921614 | 1 |
Given the inputs, calculates the lr that should be applicable for this iteration | def get_triangular_lr(iteration, stepsize, base_lr, max_lr):
cycle = np.floor(1 + iteration / (2 * stepsize))
x = np.abs(iteration / stepsize - 2 * cycle + 1)
lr = base_lr + (max_lr - base_lr) * np.maximum(0, (1 - x))
return lr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lr(self):\n if self.T is None:\n return self.lr0\n else:\n return linear_decay(self.lr0, self.alpha, self.T, self.step)",
"def lr(self):\n return .1 / self.h ** 1.5",
"def lr(self):\n pass",
"def lr(self):\n return 0.1 / self.h",
"def get_lr(self):\n\t\t#print(\"last_ep... | [
"0.69248253",
"0.69122344",
"0.68865955",
"0.68415344",
"0.6538514",
"0.64989585",
"0.64885944",
"0.64875716",
"0.6415409",
"0.6414268",
"0.6408466",
"0.63696986",
"0.63568103",
"0.63403267",
"0.63403267",
"0.63403267",
"0.63403267",
"0.63346124",
"0.63101757",
"0.62867975",
... | 0.58042103 | 85 |
Test trying to convert a negative number to a timedelta. | def test_negative_timedelta(self):
@converters.wrap
def inner_test(param: datetime.timedelta):
"""This shouldn't be called, converting should fail."""
pass
self.assert_raises_request_error(
lambda: inner_test(param='-60'), 3117
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_int_to_timedelta(self):\n @converters.wrap\n def inner_test(param: datetime.timedelta):\n \"\"\"Make sure the parameter was converted correctly.\"\"\"\n self.assertEqual(param, datetime.timedelta(\n days=3, hours=2, minutes=5, seconds=43\n ))\n... | [
"0.65716064",
"0.65337306",
"0.6441766",
"0.63511604",
"0.6298965",
"0.6296533",
"0.6236258",
"0.6233488",
"0.61981744",
"0.6161433",
"0.61524355",
"0.61211026",
"0.6095981",
"0.60812104",
"0.6051476",
"0.60107493",
"0.59801453",
"0.5962548",
"0.5876969",
"0.58166033",
"0.581... | 0.7731451 | 0 |
Returns a list of keys sorted by their values. Keys with the highest values will appear first. >>> a = Counter() >>> a['first'] = 2 >>> a['second'] = 4 >>> a['third'] = 1 >>> a.sortedKeys() ['second', 'third', 'first'] | def sortedKeys(self):
sortedItems = list(self.items())
def compare(x, y): return sign(y[1] - x[1])
sortedItems.sort(cmp=compare)
return [x[0] for x in sortedItems] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sortedKeys(self):\n sortedItems = self.items()\n compare = lambda x, y: sign(y[1] - x[1])\n sortedItems.sort(cmp=compare)\n return [x[0] for x in sortedItems]",
"def sorted_keys(self):\n keys = self.data.keys()\n keys.sort(key=lambda x:-len(self[x]))\n return ... | [
"0.7506836",
"0.74013406",
"0.71745616",
"0.71342456",
"0.7078661",
"0.69158924",
"0.68068534",
"0.6682699",
"0.665078",
"0.65501934",
"0.6485903",
"0.644709",
"0.6423489",
"0.64204615",
"0.6376498",
"0.62022436",
"0.617368",
"0.6019248",
"0.60163647",
"0.59563434",
"0.591510... | 0.76476187 | 0 |
Returns the sum of counts for all keys. | def totalCount(self):
return sum(self.values()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def total_count(count):\n return sum(count.values())",
"def totalcounts(self):\n return self.datacounts + self.bkgdcounts",
"def get_count(name, key):\n total = 0\n query = CounterShard.all().filter('name = ', name).filter('reference_key = ', key)\n for counter in query:\n ... | [
"0.7183706",
"0.6880456",
"0.6808606",
"0.66978693",
"0.6642737",
"0.6632105",
"0.65920854",
"0.65344983",
"0.6528341",
"0.6483003",
"0.6459385",
"0.6419697",
"0.64181656",
"0.64181656",
"0.63738483",
"0.63677585",
"0.63391864",
"0.6333239",
"0.6333128",
"0.6324112",
"0.63241... | 0.73389053 | 1 |
Returns a HTTP Response containing JSON information needed to bulkreview organization applications. | def _bulkReview(self, request, params, from_status, to_status,
program_keyname):
# get the program entity from the keyname
program_entity = program_logic.logic.getFromKeyName(program_keyname)
# get all the organization applications for the
# given program and from_status
filter ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def export_applications(self):\n print('\\n=== Exporting all application data...')\n\n for application in self.client.applications:\n print('- Exporting application:', application.name)\n\n json = {\n 'id': self.get_id(application),\n 'href': applic... | [
"0.5873004",
"0.5849942",
"0.58458287",
"0.569721",
"0.55613834",
"0.538865",
"0.53674185",
"0.5317489",
"0.5289482",
"0.5252621",
"0.52431506",
"0.5240169",
"0.5195368",
"0.5152986",
"0.512302",
"0.51035005",
"0.5056591",
"0.5041342",
"0.50215906",
"0.502072",
"0.4987516",
... | 0.6416047 | 0 |
Get the redirect URL for the Members Only API. | def get_redirect_url(self, *args, **kwargs):
return get_login_url(self.request, self.request.GET.get('next')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def redirect_url(self) -> str:\n return pulumi.get(self, \"redirect_url\")",
"def getAuthRedirectUrl(self):\n url = ('https://foursquare.com/oauth2/authenticate' +\n '?client_id=' + self.cfg('client_id') +\n '&response_type=code' + \n '&redirect_uri=' + sel... | [
"0.6845919",
"0.6827106",
"0.6705729",
"0.65060234",
"0.64927363",
"0.64352816",
"0.63912815",
"0.6310423",
"0.6310423",
"0.6276686",
"0.6254143",
"0.6241895",
"0.6237751",
"0.6217135",
"0.6191014",
"0.6190021",
"0.6152806",
"0.6122085",
"0.6117526",
"0.61027724",
"0.60761946... | 0.5916349 | 35 |
Take file path as string; return text as string. Takes a string that is a file path, opens the file, and turns the file's contents as one string of text. | def open_and_read_file(file_path):
# your code goes here
file_name = (open(file_path)).read()
return file_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def open_and_read_file(file_path):\n\n # your code goes here\n text_file = open(file_path)\n text_string= text_file.read()\n text_file.close()\n return text_string",
"def open_and_read_file(file_path):\n\n text_file = open(file_path)\n full_text = text_file.read()\n\n return full_text",
... | [
"0.80683595",
"0.80469716",
"0.8013247",
"0.7991296",
"0.79203224",
"0.7864458",
"0.7798385",
"0.76779044",
"0.7659031",
"0.7613771",
"0.7607828",
"0.7569348",
"0.7539111",
"0.75285417",
"0.75040627",
"0.75028455",
"0.7498196",
"0.7412504",
"0.73701435",
"0.7361696",
"0.73289... | 0.6778055 | 52 |
remove last part of category url , add href that will direct to the next page of the url | def remove_last_part_of_url(category_url):
return "/".join(category_url.split("/")[:-1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _create_links_and_track(self, page_name, category_list):\n env = self.state.document.settings.env\n if not hasattr(env, \"categories\"):\n env.categories = {}\n\n link_rst = \"\"\n ncategs = 0\n for categ_name in category_list:\n #categ_name is the full ... | [
"0.6270066",
"0.6062233",
"0.60437214",
"0.5970639",
"0.59061384",
"0.57277995",
"0.5680402",
"0.5653126",
"0.56484985",
"0.5643055",
"0.5628076",
"0.55685556",
"0.5505274",
"0.54883796",
"0.5480277",
"0.54729766",
"0.54386294",
"0.5432747",
"0.5420022",
"0.5414893",
"0.54096... | 0.6256492 | 1 |
Gets or sets the Snapshot Resource Group Uri. | def resource_group_id(self) -> Optional[str]:
return pulumi.get(self, "resource_group_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_uri(self):\n if self._uri is None:\n self._uri = \"{0}{1}/{2}\".format(\n self.session.resource_prefix,\n self.base_uri,\n self.ip_or_ifname_or_group_name,\n )\n\n return self._uri",
"def getSourceGroupUri(self, sourceGroupN... | [
"0.6674154",
"0.65856355",
"0.655779",
"0.6219353",
"0.61872977",
"0.60821575",
"0.60545504",
"0.60187066",
"0.60187066",
"0.60187066",
"0.60187066",
"0.60187066",
"0.60187066",
"0.58601505",
"0.58484656",
"0.58042437",
"0.57776105",
"0.57442045",
"0.5656326",
"0.56444883",
"... | 0.0 | -1 |
Gets or sets the Backup Instance friendly name. | def friendly_name(self) -> Optional[str]:
return pulumi.get(self, "friendly_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getname(self):\n if self.instance is not None:\n return '%s_%s' % (self.name,self.instance)\n else:\n return self.name",
"def base_instance_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"base_instance_name\")",
"def recovery_basebackup_name(self) ->... | [
"0.6856098",
"0.6756638",
"0.66634184",
"0.66634184",
"0.6636592",
"0.6622414",
"0.6599539",
"0.6565111",
"0.64920545",
"0.6442701",
"0.6422962",
"0.6302145",
"0.6264109",
"0.62619346",
"0.6215663",
"0.62055",
"0.62055",
"0.6185765",
"0.6179922",
"0.6179922",
"0.6179922",
"... | 0.6263948 | 13 |
DatasourceType of the resource. | def datasource_type(self) -> Optional[str]:
return pulumi.get(self, "datasource_type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def datasource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"datasource_type\")",
"def datasource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"datasource_type\")",
"def datasource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.... | [
"0.8126562",
"0.8126562",
"0.8126562",
"0.8126562",
"0.6924982",
"0.6771135",
"0.6762105",
"0.6757145",
"0.6757145",
"0.6676432",
"0.6616782",
"0.65630734",
"0.6558074",
"0.6558074",
"0.6558074",
"0.6558074",
"0.6558074",
"0.65022177",
"0.6381401",
"0.63401395",
"0.63123864",... | 0.8332458 | 0 |
Resource Type of Datasource. | def resource_type(self) -> Optional[str]:
return pulumi.get(self, "resource_type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_type(cls):\n pass",
"def resource_type(self) -> str:\n return 'TABLE'",
"def datasource_type(self) -> Optional[str]:\n return pulumi.get(self, \"datasource_type\")",
"def datasource_type(self) -> Optional[str]:\n return pulumi.get(self, \"datasource_type\")",
"def d... | [
"0.7715713",
"0.7293414",
"0.7189991",
"0.7189991",
"0.7006099",
"0.7006099",
"0.7006099",
"0.7006099",
"0.6874316",
"0.6779358",
"0.67527145",
"0.67527145",
"0.67527145",
"0.67527145",
"0.67527145",
"0.663781",
"0.6331858",
"0.6200698",
"0.6200294",
"0.609024",
"0.609024",
... | 0.69505984 | 9 |
DatasourceType of the resource. | def datasource_type(self) -> Optional[str]:
return pulumi.get(self, "datasource_type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def datasource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"datasource_type\")",
"def datasource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"datasource_type\")",
"def datasource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.... | [
"0.8126562",
"0.8126562",
"0.8126562",
"0.8126562",
"0.6924982",
"0.6771135",
"0.6762105",
"0.6757145",
"0.6757145",
"0.6676432",
"0.6616782",
"0.65630734",
"0.6558074",
"0.6558074",
"0.6558074",
"0.6558074",
"0.6558074",
"0.65022177",
"0.6381401",
"0.63401395",
"0.63123864",... | 0.8332458 | 1 |
Resource Type of Datasource. | def resource_type(self) -> Optional[str]:
return pulumi.get(self, "resource_type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_type(cls):\n pass",
"def resource_type(self) -> str:\n return 'TABLE'",
"def datasource_type(self) -> Optional[str]:\n return pulumi.get(self, \"datasource_type\")",
"def datasource_type(self) -> Optional[str]:\n return pulumi.get(self, \"datasource_type\")",
"def d... | [
"0.7715713",
"0.7293414",
"0.7189991",
"0.7189991",
"0.7006099",
"0.7006099",
"0.7006099",
"0.7006099",
"0.6874316",
"0.6779358",
"0.67527145",
"0.67527145",
"0.67527145",
"0.67527145",
"0.67527145",
"0.663781",
"0.6331858",
"0.6200698",
"0.6200294",
"0.609024",
"0.609024",
... | 0.69505984 | 8 |
Whether Date is last date of month | def is_last(self) -> Optional[bool]:
return pulumi.get(self, "is_last") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_date_accept_last_month(self):\n spi_search = \"find date last month\"\n inv_search = \"year:\" + datetime.datetime.strftime(datetime.datetime.today()\\\n +dateutil.relativedelta.relativedelta(months=-1), '%Y-%m')\n ... | [
"0.77162737",
"0.7637003",
"0.7193566",
"0.70495266",
"0.7004585",
"0.7004585",
"0.6877646",
"0.6862508",
"0.682804",
"0.68218356",
"0.6819492",
"0.6755318",
"0.66948193",
"0.6609038",
"0.6583995",
"0.6571988",
"0.65471333",
"0.639158",
"0.62951434",
"0.6255444",
"0.6177465",... | 0.58730584 | 31 |
The identityType which can be either SystemAssigned or None | def type(self) -> Optional[str]:
return pulumi.get(self, "type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type(self) -> Optional[pulumi.Input[Union[str, 'ManagedIdentityType']]]:\n return pulumi.get(self, \"type\")",
"def identity_type(self) -> Optional[pulumi.Input[Union[str, 'CmkIdentityType']]]:\n return pulumi.get(self, \"identity_type\")",
"def type(self) -> Optional[pulumi.Input[Union[str, ... | [
"0.75816554",
"0.74341595",
"0.7400746",
"0.7229784",
"0.69520336",
"0.6785936",
"0.67084223",
"0.6648023",
"0.6622422",
"0.6600688",
"0.6586064",
"0.6586064",
"0.6508316",
"0.6442587",
"0.6383647",
"0.63552207",
"0.62491965",
"0.6175007",
"0.616516",
"0.616516",
"0.61416066"... | 0.59726226 | 37 |
Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore. | def excluded_namespaces(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "excluded_namespaces") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def excluded_namespaces(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"excluded_namespaces\")",
"def excluded_namespaces(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"excluded_namespaces\")",
"def network_exclu... | [
"0.6890328",
"0.6890328",
"0.62034494",
"0.57558805",
"0.5741745",
"0.5658997",
"0.56179035",
"0.5606069",
"0.5606069",
"0.54797864",
"0.5416885",
"0.5362916",
"0.53373516",
"0.5171743",
"0.5167118",
"0.5167118",
"0.5160216",
"0.5151273",
"0.51392263",
"0.5133184",
"0.5118264... | 0.72699755 | 0 |
Gets or sets the Backup Data Source Parameters | def backup_datasource_parameters_list(self) -> Optional[Sequence[Any]]:
return pulumi.get(self, "backup_datasource_parameters_list") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def backup_datasource_parameters_list(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union['BlobBackupDatasourceParametersArgs', 'KubernetesClusterBackupDatasourceParametersArgs']]]]]:\n return pulumi.get(self, \"backup_datasource_parameters_list\")",
"def alternate_data_source_parameters(self) -> O... | [
"0.65284705",
"0.6167608",
"0.60494995",
"0.57744884",
"0.5750568",
"0.56374073",
"0.5545736",
"0.55366623",
"0.55174905",
"0.5504011",
"0.54434407",
"0.5417025",
"0.5359193",
"0.53465897",
"0.52679724",
"0.5253878",
"0.5172687",
"0.51035506",
"0.50621635",
"0.5059192",
"0.50... | 0.65967256 | 0 |
Gets or sets the DataStore Parameters | def data_store_parameters_list(self) -> Optional[Sequence['outputs.AzureOperationalStoreParametersResponse']]:
return pulumi.get(self, "data_store_parameters_list") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_db_params(self):\n return self.get_section_config('db')",
"def data_store_parameters_list(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AzureOperationalStoreParametersArgs']]]]:\n return pulumi.get(self, \"data_store_parameters_list\")",
"def data_store_parameters_list(self) -> Op... | [
"0.6543305",
"0.6497708",
"0.6497708",
"0.6396027",
"0.60769933",
"0.60487574",
"0.59728533",
"0.5954893",
"0.5902878",
"0.5873714",
"0.5806075",
"0.5778994",
"0.5533632",
"0.55123836",
"0.53959596",
"0.53892213",
"0.53793097",
"0.5341296",
"0.5333229",
"0.5328833",
"0.532785... | 0.62810415 | 4 |
This is day of the month from 1 to 28 other wise last of month | def days_of_month(self) -> Optional[Sequence['outputs.DayResponse']]:
return pulumi.get(self, "days_of_month") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_end_month(month):\n return datetime(2020, month, 28)",
"def last_month_day():\r\n return (datetime.now().replace(day=1) + relativedelta(months=1) + timedelta(days=-1)).strftime(\r\n '%d-%m-%Y')",
"def end_month(d):\n return date(d.year, d.month, monthrange(d.year, d.month)[1])",
"def ... | [
"0.72630197",
"0.72102946",
"0.69404685",
"0.68378407",
"0.6751712",
"0.6708872",
"0.66512066",
"0.66361827",
"0.66361827",
"0.6594036",
"0.6382701",
"0.63677865",
"0.6337808",
"0.6312749",
"0.6309078",
"0.63083476",
"0.63046056",
"0.62925106",
"0.62711346",
"0.6258508",
"0.6... | 0.0 | -1 |
It should be January/February/....../December | def months_of_year(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "months_of_year") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_month_from_number(self):\r\n self.assertEqual(cds.month_from_number(1).lower(), \"january\")\r\n self.assertEqual(cds.month_from_number(2).lower(), \"february\")\r\n self.assertEqual(cds.month_from_number(3).lower(), \"march\")\r\n self.assertEqual(cds.month_from_number(4).lowe... | [
"0.68172014",
"0.66442615",
"0.6586663",
"0.6533554",
"0.6533554",
"0.6532018",
"0.64965624",
"0.6437708",
"0.64345396",
"0.64046437",
"0.63988155",
"0.637907",
"0.6368519",
"0.6345336",
"0.631004",
"0.6303499",
"0.62634605",
"0.6217942",
"0.62172925",
"0.6216173",
"0.6211108... | 0.0 | -1 |
Class representing a secret store resource. | def __init__(__self__, *,
secret_store_type: str,
uri: Optional[str] = None,
value: Optional[str] = None):
pulumi.set(__self__, "secret_store_type", secret_store_type)
if uri is not None:
pulumi.set(__self__, "uri", uri)
if value is ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def secretstore():\n pass",
"def secret_store(self) -> Optional['outputs.SecretStoreResponse']:\n return pulumi.get(self, \"secret_store\")",
"def secrets(self):\n return self._secrets_store",
"def __init__(__self__, *,\n secret_store_type: pulumi.Input[Union[str, 'SecretStor... | [
"0.6171773",
"0.60597205",
"0.5969506",
"0.5872231",
"0.5844875",
"0.5803025",
"0.57169145",
"0.57089055",
"0.5687889",
"0.56631774",
"0.5640458",
"0.5571856",
"0.5555573",
"0.5554669",
"0.5450947",
"0.5418171",
"0.5418171",
"0.54017866",
"0.5349379",
"0.53453124",
"0.5345021... | 0.58767223 | 3 |
Gets or sets the type of the datastore. | def datastore_type(self) -> Optional[str]:
return pulumi.get(self, "datastore_type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def datastore_type(self) -> Optional[pulumi.Input[Union[str, 'StorageSettingStoreTypes']]]:\n return pulumi.get(self, \"datastore_type\")",
"def data_store_type(self) -> str:\n return pulumi.get(self, \"data_store_type\")",
"def data_store_type(self) -> str:\n return pulumi.get(self, \"dat... | [
"0.7673924",
"0.7282083",
"0.7282083",
"0.7005503",
"0.7005503",
"0.7005503",
"0.68426",
"0.67546064",
"0.6690773",
"0.6659043",
"0.66421914",
"0.6623806",
"0.66209894",
"0.66209894",
"0.6607081",
"0.6566162",
"0.6566162",
"0.6554883",
"0.6511155",
"0.6494774",
"0.64919704",
... | 0.83830196 | 0 |
Gets or sets the type. | def type(self) -> Optional[str]:
return pulumi.get(self, "type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_type(self):\n return self.type",
"def get_type(self):\n return self.type",
"def get_type(self):\n return self._type",
"def get_type(self):\n return self._type",
"def type(self):\n return self._getValue('type')",
"def get_type(self):\n return self._TYPE",
... | [
"0.8533302",
"0.8533302",
"0.844054",
"0.844054",
"0.8312111",
"0.827963",
"0.8276462",
"0.82763165",
"0.81963736",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0... | 0.7964292 | 75 |
The type of identity that created the resource. | def created_by_type(self) -> Optional[str]:
return pulumi.get(self, "created_by_type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type(self) -> pulumi.Input['ResourceIdentityType']:\n return pulumi.get(self, \"type\")",
"def type(self) -> Optional[pulumi.Input['ResourceIdentityType']]:\n return pulumi.get(self, \"type\")",
"def created_by_type(self) -> Optional[pulumi.Input[Union[str, 'IdentityType']]]:\n return ... | [
"0.8255673",
"0.8014981",
"0.7372117",
"0.71985024",
"0.7168418",
"0.71437",
"0.7070173",
"0.70280266",
"0.69838005",
"0.68890923",
"0.686309",
"0.6844002",
"0.67700636",
"0.6763271",
"0.6724401",
"0.6703369",
"0.6695644",
"0.6664346",
"0.66642934",
"0.65966016",
"0.65327346"... | 0.6752386 | 18 |
This function returns the best plan using a depth first search and dynamical programming approach. The best plan is returned as a nested array with end nodes. self.get_plan() must be run first in order to generate the possible plans. | def best_plan(self, tree=None):
if tree is None:
tree = self.root
if not tree.children:
agent_plans = {}
agent_costs = {}
for agent in range(len(tree.starts)):
end_nodes, costs = tree.return_end_nodes(agent, only_lowest_costs=True)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plan(self):\n\t\topt_r, opt_h = self.optimizer.maximize(bounds=self.bounds) # 1-D\n\t\tplan_r, plan_h = opt_r, opt_h\n\t\t# Update optimal control in trajectories\n\t\tself.traj_r.u = plan_r # numpy robot plan\n\t\tself.traj_r.u_th = plan_r # Theano robot plan\n\t\tself.traj_h.u = plan_h # numpy human plan\n\t... | [
"0.63290715",
"0.61633146",
"0.61324847",
"0.5913704",
"0.5904177",
"0.5897106",
"0.57983273",
"0.57454693",
"0.5740356",
"0.57123893",
"0.57042956",
"0.56803894",
"0.56620985",
"0.56599206",
"0.56048006",
"0.55538565",
"0.5506032",
"0.54961",
"0.54578984",
"0.54424745",
"0.5... | 0.7373169 | 0 |
Returns an array of node neighbors for RRT algorithm | def find_neighbors(self, node, agent):
neighbors = []
n_nodes = len(self.all_nodes[agent])
for node_temp in self.all_nodes[agent]:
Vd = np.pi ** (self.dim / 2) / func.gamma(self.dim / 2 + 1)
radius = min((self.gamma / Vd * np.log(n_nodes) / n_nodes) ** (1 / self.dim), sel... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_neighbours(self):\n return []",
"def neighbor_nodes(self,node):\n\n neighbors = []\n if node > self.cols:\n neighbors.append(node-self.cols)\n if node <= self.cols*(self.rows-1):\n neighbors.append(node+self.cols)\n if node % self.cols != 1:\n ... | [
"0.75271124",
"0.72182524",
"0.72051466",
"0.7082839",
"0.7075646",
"0.6978073",
"0.6978073",
"0.6978073",
"0.6978073",
"0.6969236",
"0.6962597",
"0.6955171",
"0.6953783",
"0.6939764",
"0.69227314",
"0.6907347",
"0.6881672",
"0.6860275",
"0.6847775",
"0.6834551",
"0.67821044"... | 0.65151936 | 46 |
Returns True if there is an observation at a previous node in the path starting at self.starts[agent] | def observation_in_path(self, node, agent):
node_temp = node
while node_temp != self.starts[agent]:
if node_temp.observed:
return True, node_temp
node_temp = node_temp.parent
return False, None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_previous(self):\n if self.idx < len(self.nodes):\n return True\n else:\n return False",
"def prev(self):\n return bool(self._ll_tree.prev())",
"def started_path(self):\n if self.ros_node.get_data('/diff_drive/path_achieved') is None:\n return... | [
"0.7044784",
"0.6683463",
"0.6310851",
"0.6247671",
"0.6139303",
"0.608294",
"0.608294",
"0.58923775",
"0.58912426",
"0.5836648",
"0.57808614",
"0.57723486",
"0.57667726",
"0.57658356",
"0.57629865",
"0.5753989",
"0.5750322",
"0.5749349",
"0.57367253",
"0.57069296",
"0.566889... | 0.7417818 | 0 |
Flatten tree then find minimum diff. | def minDiffInBST2(self, root: TreeNode) -> int:
def flatten(node, all_nodes):
if node:
flatten(node.left, all_nodes)
all_nodes.append(node.val)
flatten(node.right, all_nodes)
nodes = []
flatten(root, nodes)
diff = n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deep_min(self):\r\n node = self\r\n while not node.is_leaf():\r\n node = node.children[0]\r\n return node.keys[0] if node.keys else None",
"def minDiffInBST(self, root: TreeNode) -> int:\n prev = [-float('inf')]\n curr_min = [float('inf')]\n def inorder_tr... | [
"0.6990756",
"0.69780207",
"0.66325384",
"0.6581171",
"0.64683384",
"0.6451252",
"0.64479935",
"0.64121723",
"0.6408993",
"0.63551664",
"0.6350404",
"0.62785256",
"0.6259194",
"0.62562466",
"0.6186828",
"0.6155408",
"0.61127436",
"0.61116177",
"0.60902023",
"0.6066853",
"0.60... | 0.74339217 | 0 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def plot_confusion_matrix(cm, classes,
normalize=False,
title='Confusion matrix',
cmap=plt.cm.Blues):
plt.figure()
plt.grid('off')
plt.imshow(cm, interpolation='nearest', cmap=cmap)
plt.title(title)
plt.colorbar()
tick... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plot_confusion_matrix(cm, classes=[0,1], normalize=False, title='Confusion matrix', print_matrix=False):\n\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n... | [
"0.81940335",
"0.8095006",
"0.80290395",
"0.8019189",
"0.7993875",
"0.7991161",
"0.79809004",
"0.7975263",
"0.7961412",
"0.7956938",
"0.7937461",
"0.7934524",
"0.7934342",
"0.7931134",
"0.7926225",
"0.79244965",
"0.792367",
"0.79231006",
"0.7922885",
"0.792215",
"0.7917699",
... | 0.0 | -1 |
Reads lines of a textfile | def read(filename):
with open(filename, 'r') as fRead:
samples = list(map(lambda line: line.strip(), fRead))
return samples | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_text_file(file_name):\n target_file = open(file_name)\n lines = target_file.readlines()\n\n target_file.close()\n return lines",
"def read_lines(filename):\n with open(filename, 'r') as f:\n lines = f.readlines()\n return lines",
"def kitti_readlines(filename):\n with open(... | [
"0.79203427",
"0.7834289",
"0.7631671",
"0.7612275",
"0.7600008",
"0.7580142",
"0.7558315",
"0.7512129",
"0.7485772",
"0.74588907",
"0.74447346",
"0.7402543",
"0.7372792",
"0.73097813",
"0.7274996",
"0.7274996",
"0.7274513",
"0.7255856",
"0.72452366",
"0.723928",
"0.7232468",... | 0.0 | -1 |
Returns the number of targets associated with this notification | def __len__(self):
return len(self.targets) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getNrTargets(self):\n return self.targetNames.size",
"def getCount(self):\n return _osgAnimation.Target_getCount(self)",
"def __len__(self) -> int:\n return len(self.targets)",
"def num_tasks(self) -> int:\n return len(self.targets)",
"def getNumMarkedTargets(self):\n ... | [
"0.8013681",
"0.7537437",
"0.7077463",
"0.7026263",
"0.68618834",
"0.68618834",
"0.6731428",
"0.620861",
"0.6166421",
"0.61608946",
"0.6135816",
"0.607903",
"0.6072924",
"0.60703075",
"0.59770447",
"0.5971191",
"0.59608084",
"0.59414583",
"0.5930164",
"0.59287286",
"0.5908361... | 0.70100915 | 4 |
Return the string representation of the receiver. | def serialize(self):
res = '<?xml version="1.0" encoding="UTF-8"?>'
self.grammar_elem.attr["xmlns"] = \
"http://relaxng.org/ns/structure/1.0"
self.grammar_elem.attr["datatypeLibrary"] = \
"http://www.w3.org/2001/XMLSchema-datatypes"
for ns in self.namespaces:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_string(self):\r\n return self.__str__()",
"def __str__(self):\n return str(self.serialize())",
"def toString(self) -> str:\n raise NotImplementedError",
"def as_string(self):\n return self.__repr__()",
"def serialize(self):\n\n\t\treturn str(self)",
"def __repr__(self):... | [
"0.8090345",
"0.78439534",
"0.7816119",
"0.7769524",
"0.76657593",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
"0.76590496",
... | 0.0 | -1 |
Strip local prefix of `stmt` from `qname` and return the result. | def strip_local_prefix(self, stmt, qname):
pref, colon, name = qname.partition(":")
if colon and pref == stmt.i_module.i_prefix:
return name
else:
return qname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def local_name(qname):\n try:\n if qname[0] != '{':\n return qname\n return qname[qname.rindex('}') + 1:]\n except IndexError:\n return ''\n except ValueError:\n raise XMLSchemaValueError(\"wrong format for a universal name! %r\" % qname)\n except TypeError:\n ... | [
"0.5997633",
"0.55071884",
"0.5432745",
"0.5203686",
"0.5073312",
"0.5041236",
"0.503547",
"0.49707627",
"0.49465835",
"0.49230158",
"0.4890649",
"0.4822519",
"0.47977415",
"0.4778462",
"0.47706494",
"0.47654748",
"0.47652268",
"0.47515586",
"0.4736044",
"0.47320405",
"0.4706... | 0.7942398 | 0 |
Handle ``enumeration`` and ``union`` types. | def choice_type(self, tchain, p_elem):
elem = SchemaNode.choice(p_elem, occur=2)
self.handle_substmts(tchain[0], elem) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_enumeration_style(ctx, stmt):\n elemtype = stmt.search_one(\"type\")\n if elemtype is None or elemtype.arg != \"enumeration\":\n return\n\n for enum in elemtype.search(\"enum\"):\n if re.match(r\"[a-z]\", enum.arg):\n err_add(ctx.errors, stmt.pos, \"OC_ENUM_CASE\",\n ... | [
"0.6616531",
"0.63141835",
"0.59927225",
"0.57852894",
"0.5703658",
"0.5546579",
"0.55186015",
"0.5408878",
"0.54028016",
"0.5355055",
"0.53370315",
"0.53370315",
"0.53370315",
"0.5330483",
"0.5330483",
"0.5330483",
"0.5314073",
"0.5313516",
"0.5313516",
"0.5313516",
"0.53135... | 0.48888418 | 59 |
Return list of `kw` ranges defined in `tchain`. | def get_ranges(self, tchain, kw):
(lo, hi) = ("min", "max")
ran = None
for t in tchain:
rstmt = t.search_one(kw)
if rstmt is None: continue
ran = [ i.split("..") for i in rstmt.arg.split("|") ]
if ran[0][0] != 'min': lo = ran[0][0]
if r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_rangesKxKy(args):\n\n # Get the kx-range\n if \"kxmin\" in args and \"kxmax\" in args: args[\"kx_range\"] = [args[\"kxmin\"],args[\"kxmax\"]]; del args[\"kxmin\"]; del args[\"kxmax\"]\n elif \"kxmin\" in args: args[\"kx_range\"] = [args[\"kxmin\"],99999]; del args[\"kxmin\"]\n elif \"kxmax\" in... | [
"0.5730874",
"0.5686587",
"0.56080914",
"0.5432732",
"0.52540684",
"0.524125",
"0.5223053",
"0.51997894",
"0.51913816",
"0.5182841",
"0.5101054",
"0.50757945",
"0.5036445",
"0.50330275",
"0.5012956",
"0.50011224",
"0.49688074",
"0.4956288",
"0.49299565",
"0.49273413",
"0.4869... | 0.7663811 | 0 |
Perform one hot encoding of the classes in the y. The classes array can be any dimensions. The classes to encode shouldn't have their dedicated dimension in the array but should lie in the last one. | def one_hot_encode(y, classes=None):
reshaped = y.reshape((reduce(mul, y.shape), 1))
encoder = OneHotEncoder(sparse=False)
if classes is None:
encoded = encoder.fit_transform(reshaped)
else:
classes = np.array(classes)
n_classes = classes.shape[0]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def one_hot_encode(Y, classes):\n if type(classes) is not int:\n return None\n if Y is None or type(Y) != np.ndarray:\n return None\n for c in Y:\n if c >= classes or c < 0:\n return None\n m = Y.shape[0]\n mtx = np.zeros((m, classes))\n\n for row, c_label in zip(m... | [
"0.8511151",
"0.8371769",
"0.78031063",
"0.77900034",
"0.7739061",
"0.7619709",
"0.7611406",
"0.7609067",
"0.757142",
"0.7567008",
"0.7567008",
"0.74731636",
"0.7460917",
"0.7460917",
"0.74448484",
"0.74308133",
"0.7419644",
"0.7408223",
"0.7408223",
"0.73686385",
"0.7334103"... | 0.8637992 | 0 |
Returns the learning model name Raises `ImproperlyConfigured` when not set | def get_name(cls):
# No `name` set
if not cls.name:
raise ImproperlyConfigured("%(cls)s is missing a name." % {
'cls': cls.__name__
})
# `name` is not a non empty string
if not isinstance(cls.name, str) or not cls.name.strip():
raise I... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_model_name(name, batch_size, learning_rate, epoch):\n path = \"model_{0}_bs{1}_lr{2}_epoch{3}\".format(name,\n batch_size,\n learning_rate,\n epoch)\n ... | [
"0.68168795",
"0.65929914",
"0.6503088",
"0.6428881",
"0.6412201",
"0.6362162",
"0.63206327",
"0.63194567",
"0.6315585",
"0.6270469",
"0.6255423",
"0.62469006",
"0.6246621",
"0.62344444",
"0.6181788",
"0.61369306",
"0.61352587",
"0.61227965",
"0.6072429",
"0.6033542",
"0.6011... | 0.0 | -1 |
Returns the model verbose name or the class name if not set | def get_verbose_name(self):
return self.verbose_name or self.__class__.__name__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__(self):\n model = self._meta.verbose_name.title()\n return f\"{model:s}: {self.name:s}\"",
"def __str__(self):\n model = self._meta.verbose_name.title()\n return f\"{model:s}: {self.name:s}\"",
"def model_label(cls):\n return '{0}.{1}'.format(cls._meta.app_label, c... | [
"0.7462652",
"0.7462652",
"0.74208504",
"0.7379812",
"0.72856224",
"0.72601146",
"0.7131421",
"0.7127411",
"0.7053817",
"0.70226717",
"0.7022179",
"0.6996813",
"0.69807076",
"0.6978967",
"0.697386",
"0.695609",
"0.69496256",
"0.6932535",
"0.6930846",
"0.69131535",
"0.6909634"... | 0.7878186 | 0 |
Returns the documents queryset Raises `ImproperlyConfigured` when not set | def get_queryset(self):
if self.queryset is None:
raise ImproperlyConfigured("%(cls)s is missing a QuerySet." % {
'cls': self.__class__.__name__
})
return self.queryset.all() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_labelled_documents_queryset(self):\n from ..models import LabelledDocument\n\n return LabelledDocument.objects\\\n .filter(model_name=self.get_name())",
"def get_queryset(self): # pylint: disable=arguments-differ\n qs = super(AbstractDocumentSummaryViewset, self).get_quer... | [
"0.6825285",
"0.6664703",
"0.6660116",
"0.6611386",
"0.66008663",
"0.6535525",
"0.6479121",
"0.6460258",
"0.6456809",
"0.64154553",
"0.6406898",
"0.6390462",
"0.6341103",
"0.6334941",
"0.63316184",
"0.6326081",
"0.630438",
"0.6302177",
"0.6298191",
"0.6284882",
"0.6242341",
... | 0.63086236 | 16 |
Returns LabelledDocument documents queryset | def get_labelled_documents_queryset(self):
from ..models import LabelledDocument
return LabelledDocument.objects\
.filter(model_name=self.get_name()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_unlabelled_documents_queryset(self):\n queryset = self.get_queryset()\n\n # Retrieve labelled IDs\n labelled_ids = self.get_labelled_documents_queryset()\\\n .values_list('document_id', flat=True)\n\n return queryset.exclude(pk__in=labelled_ids)",
"def get_queryset(... | [
"0.69302315",
"0.6894066",
"0.6073662",
"0.6025831",
"0.59668005",
"0.5933614",
"0.5851047",
"0.5767919",
"0.57657164",
"0.573844",
"0.5722664",
"0.5711922",
"0.5707711",
"0.57021725",
"0.56993157",
"0.56138337",
"0.5610424",
"0.56020176",
"0.5599968",
"0.5597199",
"0.556046"... | 0.83305764 | 0 |
Returns the unlabelled documents queryset | def get_unlabelled_documents_queryset(self):
queryset = self.get_queryset()
# Retrieve labelled IDs
labelled_ids = self.get_labelled_documents_queryset()\
.values_list('document_id', flat=True)
return queryset.exclude(pk__in=labelled_ids) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_labelled_documents_queryset(self):\n from ..models import LabelledDocument\n\n return LabelledDocument.objects\\\n .filter(model_name=self.get_name())",
"def get_uncrawled_docs(self):\n\n return self.client[self.db]['medical_corpus'].find({\n 'crawled': 'No'\n ... | [
"0.71246237",
"0.6796483",
"0.6390843",
"0.6160633",
"0.61437064",
"0.6064219",
"0.60010093",
"0.5791833",
"0.56921595",
"0.5690972",
"0.5675089",
"0.5675089",
"0.56574583",
"0.56574583",
"0.56574583",
"0.56574583",
"0.56574583",
"0.56574583",
"0.56574583",
"0.56574583",
"0.5... | 0.8461942 | 0 |
checks if maltracker has reports for the given hashes | def check_maltracker_reports(server=None, apikey=None, hashes=None):
reports = dict()
for h in hashes:
try:
rep = get_maltracker_report(server, apikey, h)
if not 'error' in rep:
log.debug("Maltracker report for %s completed" % h)
reports[h] = rep
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CheckHashes(self, hashes, unused_external=True):\n hash_map = {}\n for hsh in hashes:\n if hsh.HasField(\"sha1\"):\n digest = hsh.sha1\n hash_urn = self.PATH.Add(str(digest))\n logging.info(\"Checking URN %s\", str(hash_urn))\n hash_map[hash_urn] = digest\n\n for metad... | [
"0.6564867",
"0.6218934",
"0.6090424",
"0.580916",
"0.5799469",
"0.57606876",
"0.5678859",
"0.56708014",
"0.56524944",
"0.55655205",
"0.5505181",
"0.5504652",
"0.54768014",
"0.54754037",
"0.54031944",
"0.5385794",
"0.53699636",
"0.5298316",
"0.5295055",
"0.5291072",
"0.527872... | 0.78541714 | 0 |
Convert seconds to minutes, hours, and days in a list of integers. | def time_calculator(seconds):
seconds = int(seconds)
days = seconds // 86400
hours = seconds % 86400 // 3600
minutes = seconds % 86400 % 3600 // 60
seconds = seconds % 86400 % 3600 % 60
time_list = [days, hours, minutes, seconds] # Created a list that stores these variables in order
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_from_seconds(s):\n days = s // (24 * 3600) #Het aantal dagen\n time = s % (24 * 3600)\n hours = time // 3600\n time %= 3600\n minutes = time // 60\n time %= 60\n seconds = time\n return [days, hours, minutes, seconds]",
"def convert_to_day_hour_min_sec(seconds):\n minutes,... | [
"0.7644667",
"0.688035",
"0.68784434",
"0.67160577",
"0.66871136",
"0.6615439",
"0.6447604",
"0.6432434",
"0.63365656",
"0.630859",
"0.6289671",
"0.61825264",
"0.61436427",
"0.6118472",
"0.60809314",
"0.60459423",
"0.60291994",
"0.59845054",
"0.5978474",
"0.5930688",
"0.59200... | 0.7905375 | 0 |
Sets the view_list of this ViewResourceModel. | def view_list(self, view_list):
self._view_list = view_list | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def views(self, views):\n\n self._views = views",
"def set_view_steps(self, steps_list):\n self._data_dict[self.KEY_VIEW_STEPS] = steps_list",
"def list(self, list):\n if list is None:\n raise ValueError(\"Invalid value for `list`, must not be `None`\") # noqa: E501\n\n ... | [
"0.5840576",
"0.55937386",
"0.53025234",
"0.5241294",
"0.5240576",
"0.4936688",
"0.49179184",
"0.49031654",
"0.49024612",
"0.4886144",
"0.4883166",
"0.48418194",
"0.48321885",
"0.47605363",
"0.47489756",
"0.47255418",
"0.47153562",
"0.46860045",
"0.46849188",
"0.4633781",
"0.... | 0.7824339 | 0 |
Sets the view_id of this ViewResourceModel. | def view_id(self, view_id):
self._view_id = view_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def space_view_id(self, space_view_id):\n\n self._space_view_id = space_view_id",
"def view(self, view_id):\r\n return resources.View(self, view_id)",
"def view_url(self, view_url):\n\n self._view_url = view_url",
"def view_name(self, view_name):\n\n self._view_name = view_name",
... | [
"0.6310345",
"0.60262775",
"0.57210386",
"0.5660168",
"0.5422694",
"0.53238976",
"0.5295751",
"0.5264674",
"0.5247825",
"0.51599884",
"0.5118258",
"0.5075774",
"0.5068436",
"0.5059748",
"0.5055416",
"0.5048538",
"0.49653623",
"0.49501443",
"0.49379167",
"0.49001542",
"0.48516... | 0.79226696 | 0 |
Sets the view_name of this ViewResourceModel. | def view_name(self, view_name):
self._view_name = view_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def view_name(self):\n return self._view_name",
"def view_id(self, view_id):\n\n self._view_id = view_id",
"def set_name(self, _name):\n self.name = _name",
"def view_url(self, view_url):\n\n self._view_url = view_url",
"def setViewFieldnames(self, fieldnames):\n self._vi... | [
"0.60846865",
"0.58238786",
"0.57834435",
"0.5749881",
"0.57106483",
"0.56860495",
"0.56705356",
"0.5666391",
"0.56627756",
"0.56627756",
"0.56358546",
"0.5630409",
"0.5597082",
"0.5597082",
"0.5584095",
"0.5580923",
"0.5580923",
"0.5580923",
"0.5580923",
"0.5580923",
"0.5557... | 0.7877595 | 0 |
Sets the available_field_list of this ViewResourceModel. | def available_field_list(self, available_field_list):
self._available_field_list = available_field_list | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def selected_field_list(self, selected_field_list):\n\n self._selected_field_list = selected_field_list",
"def fields_in_list(self, fields_in_list):\n\n self._fields_in_list = fields_in_list",
"def fields_in_list(self, fields_in_list):\n\n self._fields_in_list = fields_in_list",
"def _up... | [
"0.61273354",
"0.60992044",
"0.60992044",
"0.564537",
"0.5394741",
"0.52516496",
"0.52481925",
"0.52196485",
"0.50473416",
"0.50118285",
"0.50118285",
"0.50090116",
"0.4997094",
"0.4988327",
"0.49773186",
"0.4946575",
"0.48974147",
"0.48779872",
"0.4860509",
"0.48301265",
"0.... | 0.8479794 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, ViewResourceModel):
return False
return self.to_dict() == other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
if not isinstance(other, ViewResourceModel):
return True
return self.to_dict() != other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
return the xid with only the row that is closest to self.ra, dec | def _resolve_multiple_sources(self, xid):
print("[hscObj] multiple primary objects found, choose the closest one")
c = ac.SkyCoord(self.ra, self.dec, frame='icrs', unit='deg')
crows = [ac.SkyCoord(row['ra'], row['dec'], frame='icrs', unit='deg') for row in xid]
a = np.array([c.separation(crow).value for crow... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _xid_pick_only_closest(self, xid):\n\t\tif len(xid) == 1:\n\t\t\tself._xid_sanity_check(xid)\n\n\t\telif len(xid) > 1: \n\t\t\tprint(\"[hscObj] multiple objects found, picking the closest\")\n\t\t\txid = self._resolve_multiple_sources(xid)\n\t\t\tself._xid_sanity_check(xid)\n\n\t\telif len(xid) < 1:\n\t\t\tpri... | [
"0.6046088",
"0.5874432",
"0.56241477",
"0.55693793",
"0.553488",
"0.55335134",
"0.5521013",
"0.5399741",
"0.5399387",
"0.5379303",
"0.5349823",
"0.5304873",
"0.5296013",
"0.5262588",
"0.5262319",
"0.52542853",
"0.5217914",
"0.5198409",
"0.51926744",
"0.515892",
"0.5145211",
... | 0.5065191 | 26 |
Returns the average daily number of searches that return zero results. | def average_zero_rate(df):
Searches_PerDay = searched_per_day(df)
zero_results = df.groupby([pd.TimeGrouper('D')]).apply(lambda row:
len(row[row['n_results'] == 0]))
perecent_zeros = zero_results / Searches_PerDay
return perecent_zeros.m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def average_zero_rate_by_group(df):\n Searches_PerDay_By_Group = searched_per_day_by_group(df)\n \n zero_results = df.groupby([pd.TimeGrouper('D')]).apply(lambda row: \n len(row[row['n_results'] == 0]))\n \n perecent_zeros = zero_results / Searches_P... | [
"0.73215085",
"0.65778637",
"0.6322246",
"0.6195696",
"0.6005912",
"0.59973216",
"0.594631",
"0.593096",
"0.5928422",
"0.5891982",
"0.587515",
"0.5871526",
"0.58512473",
"0.58512473",
"0.58512473",
"0.5760377",
"0.574967",
"0.5742943",
"0.5739999",
"0.5730613",
"0.5718235",
... | 0.81951666 | 0 |
Returns the average daily number of searches that have zero results by group. | def average_zero_rate_by_group(df):
Searches_PerDay_By_Group = searched_per_day_by_group(df)
zero_results = df.groupby([pd.TimeGrouper('D')]).apply(lambda row:
len(row[row['n_results'] == 0]))
perecent_zeros = zero_results / Searches_PerDay_By_Gr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def average_zero_rate(df):\n Searches_PerDay = searched_per_day(df)\n \n zero_results = df.groupby([pd.TimeGrouper('D')]).apply(lambda row: \n len(row[row['n_results'] == 0]))\n \n perecent_zeros = zero_results / Searches_PerDay\n \n return per... | [
"0.78885406",
"0.63365245",
"0.5978021",
"0.58454555",
"0.5834144",
"0.57766557",
"0.571127",
"0.5600884",
"0.5585095",
"0.5582745",
"0.55681866",
"0.55594814",
"0.5549762",
"0.5532702",
"0.5516105",
"0.5515341",
"0.54913044",
"0.5483488",
"0.5465868",
"0.54628116",
"0.545990... | 0.83156896 | 0 |
return the archive path if the archive has been correctly generated | def do_pack():
date = datetime.datetime.now()
archive = 'versions/web_static_{}{}{}{}{}{}.tgz'.format(date.year,
date.month,
date.day,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def archive_path(self):\n return os.path.join(self.destination_directory, self.__archive_name__)",
"def get_archive_file_path(self,results):\n path = os.path.join(self.archive_path,results.version)\n if not os.path.exists(path):\n os.makedirs(path)\n return os.path.join(pat... | [
"0.7802927",
"0.74924743",
"0.70728195",
"0.6804129",
"0.6511789",
"0.6490116",
"0.6354247",
"0.63525575",
"0.63286996",
"0.6153605",
"0.61379194",
"0.61006725",
"0.60853046",
"0.6080678",
"0.6063823",
"0.6034604",
"0.59555966",
"0.591776",
"0.5907436",
"0.59069127",
"0.58957... | 0.54957426 | 61 |
Recursively parameterize all strings contained in an object. Parameterizes all values of a Mapping, all items of a Sequence, an unicode string, or pass other objects through unmodified. Byte strings will be interpreted as UTF8. | def _parameterize_obj(obj):
if isinstance(obj, Mapping):
return dict((key, _parameterize_obj(value))
for key, value in obj.items())
elif isinstance(obj, bytes):
return _parameterize_string(obj.decode('utf8'))
elif isinstance(obj, str):
return _parameterize_string... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def recursive_unicode(obj):\r\n if isinstance(obj, dict):\r\n return dict((recursive_unicode(k), recursive_unicode(v)) for (k, v) in obj.items())\r\n elif isinstance(obj, list):\r\n return list(recursive_unicode(i) for i in obj)\r\n elif isinstance(obj, tuple):\r\n return tuple(recurs... | [
"0.6391636",
"0.63298553",
"0.61700183",
"0.59444875",
"0.5620654",
"0.5472676",
"0.5390708",
"0.5333234",
"0.5314831",
"0.529008",
"0.51635796",
"0.51515967",
"0.50929046",
"0.50890005",
"0.50630486",
"0.5057737",
"0.50435394",
"0.50361943",
"0.50150037",
"0.50066966",
"0.49... | 0.67839694 | 0 |
Renders the home page. | def home():
return render_template(
'index.html',
title='Home Page',
year=datetime.now().year,
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def render_home():\r\n\treturn render_template(\"index.html\")",
"def home():\n\n return render_template('home_page.html')",
"def home():\n\n return render_template(\"home.html\")",
"def home():\n return render_template('home.html')",
"def home():\n return render_template('home.html')",
"def ... | [
"0.85574406",
"0.853399",
"0.8351404",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.827363",
"... | 0.8061255 | 40 |
Renders the about page. | def about():
return render_template(
'about.html',
title='About',
year=datetime.now().year,
message='Your application description page.'
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def about():\n return render_template('about.html', title='About')",
"def about():\n\n return render_template('about_page.html', title='About')",
"def about():\n\n\treturn render_template(\"about.html\")",
"def on_about(self):\n render_about_window()",
"def about():\n return render_temp... | [
"0.85650355",
"0.85034525",
"0.84489655",
"0.84044397",
"0.8394454",
"0.82935613",
"0.82680845",
"0.8243358",
"0.8239194",
"0.8224137",
"0.82079816",
"0.8204868",
"0.8173699",
"0.8172736",
"0.80967313",
"0.80501616",
"0.80501616",
"0.80501616",
"0.80501616",
"0.80501616",
"0.... | 0.82709616 | 12 |
Calculate a rotation matrix for the given angle. | def rotation_matrix(phi):
return np.asmatrix([
[np.cos(phi), -np.sin(phi), 0],
[np.sin(phi), np.cos(phi), 0],
[0, 0, 1]
]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def angle_to_rotation_matrix(angle: torch.Tensor) -> torch.Tensor:\n ang_rad = deg2rad(angle)\n cos_a: torch.Tensor = torch.cos(ang_rad)\n sin_a: torch.Tensor = torch.sin(ang_rad)\n return torch.stack([cos_a, sin_a, -sin_a, cos_a], dim=-1).view(*angle.shape, 2, 2)",
"def rotation_matrix(angle) -> np.... | [
"0.8200142",
"0.81458515",
"0.80441713",
"0.79353994",
"0.7904268",
"0.7719027",
"0.7682493",
"0.75756633",
"0.75573456",
"0.75307375",
"0.7461041",
"0.74018425",
"0.7387808",
"0.7358776",
"0.73508453",
"0.73496133",
"0.7347889",
"0.7306764",
"0.7301186",
"0.72717464",
"0.724... | 0.7194626 | 31 |
Return list of indexes which were set | def whichSet(self):
result = []
# go through all members and if any isSet -- return True
for index,v in self._items.iteritems():
if v.isSet:
result.append(index)
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_indexes(self):\n return set(k.index for k in self if k.has_index)",
"def get_idxvals(self):\n input_rows = list()\n input_cols = list()\n for key in self.index:\n input_rows.append(key[0])\n input_cols.append(key[1])\n\n return list(OrderedSet(inpu... | [
"0.842449",
"0.77748895",
"0.7333276",
"0.7247322",
"0.7236759",
"0.71381116",
"0.7115153",
"0.7113918",
"0.70559156",
"0.7044112",
"0.69898766",
"0.6966941",
"0.68756",
"0.68663436",
"0.6861796",
"0.684902",
"0.6809005",
"0.6739134",
"0.6732558",
"0.6722666",
"0.67112815",
... | 0.6872002 | 13 |
String definition of the object of ClassWithCollections object | def __repr__(self, prefixes=None, fullname=False):
if prefixes is None:
prefixes = []
prefixes = prefixes[:] # copy list
id_str = ""
module_str = ""
if __debug__:
if 'MODULE_IN_REPR' in debug.active:
fullname = True
if ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__(self):\n return type(self).__name__ + str(vars(self))",
"def __str__(self):\n return '{}({})'.format(type(self).__name__, self.__name)",
"def __repr__(cls):\n return cls.__name__",
"def __repr__(self) -> str:\n yaml_map = yamlmapper.yaml_map(self)\n yaml_map... | [
"0.6513021",
"0.64517546",
"0.6439465",
"0.6417655",
"0.64044213",
"0.6397004",
"0.6395613",
"0.63702136",
"0.63547134",
"0.633789",
"0.63126135",
"0.6282115",
"0.6269582",
"0.6246458",
"0.62438476",
"0.62392867",
"0.62362015",
"0.622253",
"0.6217405",
"0.6187709",
"0.6187690... | 0.0 | -1 |
Returns Retrieves the last event timestamp | def last_time(self) -> datetime:
return self.activities[-1].timestamp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def last_event_time(self) -> str:\n return pulumi.get(self, \"last_event_time\")",
"def lastEventTime(self):\n return self._lastEventTime",
"def last_timestamp(self):\n return self._last_timestamp",
"def last_timestamp(self):\n LOGGER.debug('Getting last_timestamp as: %s', self._l... | [
"0.83376825",
"0.82172495",
"0.8095696",
"0.8044194",
"0.7909703",
"0.7772843",
"0.77328336",
"0.7648163",
"0.7558408",
"0.739905",
"0.7371306",
"0.7259861",
"0.72343963",
"0.7165988",
"0.7103382",
"0.704164",
"0.7026896",
"0.7022095",
"0.7016782",
"0.70094234",
"0.7004626",
... | 0.7483805 | 9 |
Convert a luminosity into flux density in Jy (or in 'mJy') for a given distance in Mpc and wavelength in [micron] | def lum2fnu(lum, dist, wlen, log_fnu=False, log_dist=False, log_lum=True,
fnu_unit='Jy', log_wlen=False):
if log_wlen == False:
wlen = np.log10(wlen)
freq = np.log10(2.99792e8) - wlen + 6
if log_dist == False:
dist = np.log10(dist)
if log_lum == False:
lum = np.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calculate_luminosity(\n spec_fname, distance, wavelength_column=0,\n wavelength_unit=u.angstrom, flux_column=1,\n flux_unit=u.Unit('erg / (Angstrom cm2 s)')):\n #BAD STYLE change to parse quantity\n distance = u.Unit(distance)\n\n wavelength, flux = np.loadtxt(spec_fname, usecols=... | [
"0.65098506",
"0.6422973",
"0.618267",
"0.60822135",
"0.60728395",
"0.60050327",
"0.5974596",
"0.5832187",
"0.5801674",
"0.57632214",
"0.5756511",
"0.57102656",
"0.5708604",
"0.56721187",
"0.566212",
"0.5533299",
"0.55140376",
"0.5513792",
"0.5511863",
"0.5488949",
"0.5473674... | 0.51146 | 62 |
Convert a flux density in Jy (or in 'mJy') into luminosity for a given distance in Mpc and wavelength in [micron] | def fnu2lum(fnu, dist, wlen, log_fnu=False, log_dist=False, log_lum=True,
fnu_unit='Jy', log_wlen=False):
if log_wlen == False:
wlen = np.log10(wlen)
freq = np.log10(2.99792e8) - wlen + 6
if log_fnu == False:
fnu = np.log10(fnu)
if fnu_unit == 'mJy':
fnu = fnu - ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calculate_luminosity(\n spec_fname, distance, wavelength_column=0,\n wavelength_unit=u.angstrom, flux_column=1,\n flux_unit=u.Unit('erg / (Angstrom cm2 s)')):\n #BAD STYLE change to parse quantity\n distance = u.Unit(distance)\n\n wavelength, flux = np.loadtxt(spec_fname, usecols=... | [
"0.6812176",
"0.6619846",
"0.62178636",
"0.6107638",
"0.6079786",
"0.59802467",
"0.5883287",
"0.58794874",
"0.584442",
"0.5808301",
"0.5796913",
"0.57776636",
"0.5775571",
"0.57507926",
"0.574004",
"0.5695164",
"0.5660567",
"0.5652479",
"0.56087625",
"0.55899453",
"0.54918617... | 0.5593648 | 19 |
AAD Profile specifies attributes for Azure Active Directory integration. | def __init__(__self__, *,
admin_group_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
client_app_id: Optional[pulumi.Input[str]] = None,
enable_azure_rbac: Optional[pulumi.Input[bool]] = None,
managed: Optional[pulumi.Input[bool... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aad_profile(self) -> Optional[pulumi.Input['AADProfileArgs']]:\n return pulumi.get(self, \"aad_profile\")",
"def describe_account_attributes():\n pass",
"def cli_enable_profile():\n parser = argparse.ArgumentParser(description=cli_enable_profile.__doc__)\n type_select = parser.add_mutually_... | [
"0.72680557",
"0.5649395",
"0.56132436",
"0.55643153",
"0.55580693",
"0.5529592",
"0.5377004",
"0.53257716",
"0.52398247",
"0.5222247",
"0.5221797",
"0.51649415",
"0.51563936",
"0.51121587",
"0.509293",
"0.50730383",
"0.5054024",
"0.50460184",
"0.50362295",
"0.50292456",
"0.5... | 0.0 | -1 |
The list of AAD group object IDs that will have admin role of the cluster. | def admin_group_object_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "admin_group_object_ids") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_aad_admin_group_object_ids(self) -> Union[List[str], None]:\n return self._get_aad_admin_group_object_ids(enable_validation=True)",
"def admin_group_object_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:\n return pulumi.get(self, \"admin_group_object_ids\")",
"def get_group_admin_... | [
"0.8314658",
"0.82687557",
"0.7692424",
"0.7668282",
"0.75499696",
"0.71512187",
"0.7012604",
"0.69647706",
"0.68132555",
"0.68077713",
"0.6789662",
"0.6706167",
"0.6668644",
"0.6650921",
"0.65174377",
"0.6514174",
"0.6513707",
"0.64684474",
"0.6466344",
"0.64410853",
"0.6375... | 0.8173278 | 3 |
ControlPlaneProfile The control plane properties for the provisioned cluster. | def __init__(__self__, *,
availability_zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
cloud_provider_profile: Optional[pulumi.Input['CloudProviderProfileArgs']] = None,
control_plane_endpoint: Optional[pulumi.Input['ControlPlaneEndpointProfileContro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_profile(self) -> 'outputs.ClusterPoolResourcePropertiesResponseComputeProfile':\n return pulumi.get(self, \"compute_profile\")",
"def aks_cluster_profile(self) -> 'outputs.ClusterPoolResourcePropertiesResponseAksClusterProfile':\n return pulumi.get(self, \"aks_cluster_profile\")",
"de... | [
"0.6663954",
"0.6228086",
"0.5960472",
"0.5592841",
"0.5485699",
"0.5445458",
"0.5358216",
"0.5348881",
"0.5348881",
"0.5335483",
"0.5294336",
"0.5243618",
"0.5239505",
"0.51938695",
"0.5178488",
"0.51694024",
"0.5159391",
"0.5116929",
"0.5112616",
"0.5071119",
"0.50581497",
... | 0.0 | -1 |
Unique name of the agent pool profile in the context of the subscription and resource group. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self) -> str:\n return self.profile_device.name",
"def name(self):\n return self.measurement_profile.name",
"def _get_unique_name(self, name: str, prefix: str):\n if name is None:\n return prefix + \"-\" + PolicyPool.__generate_random_string()\n elif name in self... | [
"0.66112113",
"0.65354484",
"0.651985",
"0.65068525",
"0.64472425",
"0.6152568",
"0.613091",
"0.603319",
"0.60273725",
"0.59952253",
"0.5963842",
"0.59166694",
"0.5907245",
"0.5893807",
"0.58470553",
"0.57983255",
"0.57983255",
"0.57983255",
"0.57983255",
"0.57983255",
"0.579... | 0.0 | -1 |
VmSize The size of the agent pool VMs. | def vm_size(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "vm_size") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vm_size(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"vm_size\")",
"def pool_size(self) -> Optional[pulumi.Input['BuildServiceAgentPoolSizePropertiesArgs']]:\n return pulumi.get(self, \"pool_size\")",
"def vm_size(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(sel... | [
"0.7096677",
"0.70296574",
"0.6893503",
"0.67277414",
"0.66670907",
"0.65625894",
"0.6460218",
"0.63132423",
"0.6222337",
"0.6069661",
"0.60372996",
"0.6013997",
"0.60056216",
"0.5991601",
"0.59473985",
"0.5927618",
"0.5806976",
"0.57933545",
"0.5781126",
"0.5765513",
"0.5762... | 0.6813507 | 5 |
The HTTPS proxy server endpoint to use. | def https_proxy(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "https_proxy") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def https_proxy(self) -> Optional[str]:\n return pulumi.get(self, \"https_proxy\")",
"def myproxy_server(self):\n return self.__get_option('myproxy_server')",
"def proxy_url(self) -> str:\n return pulumi.get(self, \"proxy_url\")",
"def proxy_url(self):\n return self.__proxy_url",
... | [
"0.7592147",
"0.70679206",
"0.67487925",
"0.66793597",
"0.65531087",
"0.65255326",
"0.64279073",
"0.64279073",
"0.64265025",
"0.63814336",
"0.63667804",
"0.63567555",
"0.6345138",
"0.6283781",
"0.6272997",
"0.6257402",
"0.6254837",
"0.62052906",
"0.6148819",
"0.61386776",
"0.... | 0.73492455 | 2 |
LoadBalancerProfile Profile of the cluster load balancer. | def __init__(__self__, *,
availability_zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
cloud_provider_profile: Optional[pulumi.Input['CloudProviderProfileArgs']] = None,
count: Optional[pulumi.Input[int]] = None,
linux_profile: Optio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_profile(self) -> Optional[pulumi.Input['ManagedClusterLoadBalancerProfileArgs']]:\n return pulumi.get(self, \"load_balancer_profile\")",
"def load_balancer_profile(self) -> Optional[pulumi.Input['LoadBalancerProfileArgs']]:\n return pulumi.get(self, \"load_balancer_profile\")",
... | [
"0.79954857",
"0.7743945",
"0.6310012",
"0.6220785",
"0.60519725",
"0.6028776",
"0.59667295",
"0.5801705",
"0.5801705",
"0.57998896",
"0.57407534",
"0.5732378",
"0.57040197",
"0.5699798",
"0.56650585",
"0.5648545",
"0.5640648",
"0.5636679",
"0.55829805",
"0.5582329",
"0.54267... | 0.0 | -1 |
Unique name of the agent pool profile in the context of the subscription and resource group. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self) -> str:\n return self.profile_device.name",
"def name(self):\n return self.measurement_profile.name",
"def _get_unique_name(self, name: str, prefix: str):\n if name is None:\n return prefix + \"-\" + PolicyPool.__generate_random_string()\n elif name in self... | [
"0.6610625",
"0.6534243",
"0.6520213",
"0.6505671",
"0.64470166",
"0.6152562",
"0.6131236",
"0.60344696",
"0.60290414",
"0.59972024",
"0.59633523",
"0.59155184",
"0.590559",
"0.58925503",
"0.5848389",
"0.5799912",
"0.5799912",
"0.5799912",
"0.5799912",
"0.5799912",
"0.5799912... | 0.0 | -1 |
VmSize The size of the agent pool VMs. | def vm_size(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "vm_size") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vm_size(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"vm_size\")",
"def pool_size(self) -> Optional[pulumi.Input['BuildServiceAgentPoolSizePropertiesArgs']]:\n return pulumi.get(self, \"pool_size\")",
"def vm_size(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(sel... | [
"0.7096677",
"0.70296574",
"0.6893503",
"0.67277414",
"0.66670907",
"0.65625894",
"0.6460218",
"0.63132423",
"0.6222337",
"0.6069661",
"0.60372996",
"0.6013997",
"0.60056216",
"0.5991601",
"0.59473985",
"0.5927618",
"0.5806976",
"0.57933545",
"0.5781126",
"0.5765513",
"0.5762... | 0.6813507 | 4 |
Unique name of the agent pool profile in the context of the subscription and resource group. | def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self) -> str:\n return self.profile_device.name",
"def name(self):\n return self.measurement_profile.name",
"def _get_unique_name(self, name: str, prefix: str):\n if name is None:\n return prefix + \"-\" + PolicyPool.__generate_random_string()\n elif name in self... | [
"0.66112113",
"0.65354484",
"0.651985",
"0.65068525",
"0.64472425",
"0.6152568",
"0.613091",
"0.603319",
"0.60273725",
"0.59952253",
"0.5963842",
"0.59166694",
"0.5907245",
"0.5893807",
"0.58470553",
"0.57983255",
"0.57983255",
"0.57983255",
"0.57983255",
"0.57983255",
"0.579... | 0.0 | -1 |
VmSize The size of the agent pool VMs. | def vm_size(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "vm_size") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vm_size(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"vm_size\")",
"def pool_size(self) -> Optional[pulumi.Input['BuildServiceAgentPoolSizePropertiesArgs']]:\n return pulumi.get(self, \"pool_size\")",
"def vm_size(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(sel... | [
"0.7096677",
"0.70296574",
"0.6893503",
"0.67277414",
"0.66670907",
"0.65625894",
"0.6460218",
"0.63132423",
"0.6222337",
"0.6069661",
"0.60372996",
"0.6013997",
"0.60056216",
"0.5991601",
"0.59473985",
"0.5927618",
"0.5806976",
"0.57933545",
"0.5781126",
"0.5765513",
"0.5762... | 0.6813507 | 3 |
DNSServiceIP An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. | def dns_service_ip(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "dns_service_ip") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def service_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"service_cidr\")",
"def service_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"service_cidr\")",
"def service_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"ser... | [
"0.6345445",
"0.6345445",
"0.6345445",
"0.5613832",
"0.50941086",
"0.492934",
"0.4897114",
"0.486355",
"0.47378713",
"0.46595684",
"0.46579883",
"0.45950517",
"0.45930776",
"0.45823815",
"0.45793012",
"0.4502991",
"0.44969392",
"0.44969392",
"0.44670072",
"0.44530597",
"0.444... | 0.62951136 | 4 |
LoadBalancerProfile Profile of the cluster load balancer. | def load_balancer_profile(self) -> Optional[pulumi.Input['LoadBalancerProfileArgs']]:
return pulumi.get(self, "load_balancer_profile") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_profile(self) -> Optional[pulumi.Input['ManagedClusterLoadBalancerProfileArgs']]:\n return pulumi.get(self, \"load_balancer_profile\")",
"def aks_cluster_profile(self) -> 'outputs.ClusterPoolResourcePropertiesResponseAksClusterProfile':\n return pulumi.get(self, \"aks_cluster_prof... | [
"0.799392",
"0.6310471",
"0.6219861",
"0.6052601",
"0.60283256",
"0.59676886",
"0.58035433",
"0.58035433",
"0.58019155",
"0.57392466",
"0.573114",
"0.57021016",
"0.56992716",
"0.5666817",
"0.5646172",
"0.5639424",
"0.5636759",
"0.558451",
"0.5582851",
"0.5424464",
"0.535987",... | 0.7743291 | 1 |
PodCidr A CIDR notation IP range from which to assign pod IPs when kubenet is used. | def pod_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "pod_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cidr(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"cidr\")",
"def cidr(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"cidr\")",
"def cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"cidr\")",
"def cidr(self) -> Optional[pulumi.Input[str]]:\n ... | [
"0.5790983",
"0.5790983",
"0.5679105",
"0.5679105",
"0.5546194",
"0.5546194",
"0.5546194",
"0.5523009",
"0.5506565",
"0.55048233",
"0.55048233",
"0.5461405",
"0.534532",
"0.5332054",
"0.5309646",
"0.53059006",
"0.53024375",
"0.52798325",
"0.52798325",
"0.52798325",
"0.5235053... | 0.7307548 | 1 |
The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for singlestack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dualstack networking. | def pod_cidrs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "pod_cidrs") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_IPv4_to_CIDR(self):\n match_list = '1.2.3.0/29'\n self.assertEqual(helpers.IPRange_to_CIDR('1.2.3.1', '1.2.3.6'), match_list)",
"def test_IPv4s_to_valid_CIDR(self):\n self.assertEqual(\n helpers.IPRange_to_valid_CIDR('192.168.0.1', '192.168.0.1'),\n '192.168.0.... | [
"0.6920752",
"0.65083635",
"0.6484416",
"0.641776",
"0.63842654",
"0.62757444",
"0.62143826",
"0.6168925",
"0.6168925",
"0.6164812",
"0.6164812",
"0.6151156",
"0.6151156",
"0.6139616",
"0.61360097",
"0.608533",
"0.60340667",
"0.60340667",
"0.60285735",
"0.60285735",
"0.602494... | 0.5654129 | 36 |
The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for singlestack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dualstack networking. They must not overlap with any Subnet IP ranges. | def service_cidrs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "service_cidrs") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_IPv4_to_CIDR(self):\n match_list = '1.2.3.0/29'\n self.assertEqual(helpers.IPRange_to_CIDR('1.2.3.1', '1.2.3.6'), match_list)",
"def _split_cidrs(vpc_cidr, zones=None, ec2_client=None, region_name=None):\n if not zones:\n if not ec2_client:\n ec2_client = boto3.client(... | [
"0.6661204",
"0.64591795",
"0.6435936",
"0.63920933",
"0.63624084",
"0.626094",
"0.62210345",
"0.6120802",
"0.6109028",
"0.60803056",
"0.6046384",
"0.60386944",
"0.6021384",
"0.6021384",
"0.60006315",
"0.59930927",
"0.59930927",
"0.5975711",
"0.5972838",
"0.5971427",
"0.58921... | 0.0 | -1 |
Identity for the Provisioned cluster. | def __init__(__self__, *,
type: pulumi.Input['ResourceIdentityType']):
pulumi.set(__self__, "type", type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identity(self) -> pulumi.Output['outputs.ClusterIdentity']:\n return pulumi.get(self, \"identity\")",
"def identity(self) -> Optional[pulumi.Input['ClusterIdentityArgs']]:\n return pulumi.get(self, \"identity\")",
"def identity(self) -> pulumi.Input['ClusterIdentityArgs']:\n return pul... | [
"0.752257",
"0.7398116",
"0.72665226",
"0.7238032",
"0.7238032",
"0.7238032",
"0.7238032",
"0.7238032",
"0.70550114",
"0.70550114",
"0.70550114",
"0.70550114",
"0.697907",
"0.6620335",
"0.655557",
"0.6494575",
"0.64899313",
"0.64360243",
"0.64360243",
"0.63899595",
"0.6361781... | 0.0 | -1 |
The type of identity used for the provisioned cluster. The type SystemAssigned, includes a system created identity. The type None means no identity is assigned to the provisioned cluster. | def type(self) -> pulumi.Input['ResourceIdentityType']:
return pulumi.get(self, "type") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type(self) -> Optional[pulumi.Input[Union[str, 'ManagedIdentityType']]]:\n return pulumi.get(self, \"type\")",
"def identity_type(self) -> Optional[pulumi.Input[Union[str, 'CmkIdentityType']]]:\n return pulumi.get(self, \"identity_type\")",
"def type(self) -> pulumi.Input[Union[str, 'ManagedS... | [
"0.72359097",
"0.6942881",
"0.6796822",
"0.6743902",
"0.6649138",
"0.6584021",
"0.6550021",
"0.6506693",
"0.64722836",
"0.6333968",
"0.62976646",
"0.6269088",
"0.6269088",
"0.6239672",
"0.6073401",
"0.6066358",
"0.60344934",
"0.5982729",
"0.5895074",
"0.5873382",
"0.5851272",... | 0.63153356 | 10 |
AddonProfiles Profile of managed cluster addon. | def addon_profiles(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input['AddonProfilesArgs']]]]:
return pulumi.get(self, "addon_profiles") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_up_addon_profiles(self, mc: ManagedCluster) -> ManagedCluster:\n self._ensure_mc(mc)\n\n # determine the value of constants\n addon_consts = self.context.get_addon_consts()\n CONST_MONITORING_ADDON_NAME = addon_consts.get(\n \"CONST_MONITORING_ADDON_NAME\"\n )\... | [
"0.7015285",
"0.70030284",
"0.64746726",
"0.6469915",
"0.64524657",
"0.63640934",
"0.62364703",
"0.6012015",
"0.5962577",
"0.5738262",
"0.57334805",
"0.5694817",
"0.56858253",
"0.5668841",
"0.5657818",
"0.5648579",
"0.5604747",
"0.5603564",
"0.56018686",
"0.56018686",
"0.5549... | 0.6764512 | 2 |
NodeResourceGroup Name of the resource group containing agent pool nodes. | def node_resource_group(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "node_resource_group") | {
"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.70394194",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.7037649",
"0.6945211",
"0.67540073",
"0.67529726",
"0.66841984",
"0.66841984",
"0.66841984",
"0.66841984",
"0.668419... | 0.750187 | 0 |
HybridAKSStorageStatus defines the observed state of HybridAKSStorage | def __init__(__self__, *,
provisioning_status: Optional[pulumi.Input['StorageSpacesPropertiesProvisioningStatusArgs']] = None):
if provisioning_status is not None:
pulumi.set(__self__, "provisioning_status", provisioning_status) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def storage_bytes_status(self) -> str:\n return pulumi.get(self, \"storage_bytes_status\")",
"def storage_gateway_status():\n gw_arn = os.environ['gw_arn']\n #Gets gateway ARN from the serverless script depending upon environment being deployed to\n\n sgw = boto3.client('storagegateway')\n sgw... | [
"0.651442",
"0.64952594",
"0.6258575",
"0.6192214",
"0.5868871",
"0.5808265",
"0.56239104",
"0.5616892",
"0.5559495",
"0.548378",
"0.54702646",
"0.5426858",
"0.5421656",
"0.5418866",
"0.53763276",
"0.5374888",
"0.5362641",
"0.53455853",
"0.53393966",
"0.53373533",
"0.5331104"... | 0.0 | -1 |
Name of the resource pool in VSphere | def resource_pool(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "resource_pool") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resource_pool_id(self) -> str:\n return pulumi.get(self, \"resource_pool_id\")",
"def _determine_resource_pool(session, vm_):\n resource_pool = \"\"\n if \"resource_pool\" in vm_.keys():\n resource_pool = _get_pool(vm_[\"resource_pool\"], session)\n else:\n pool = session.xenapi... | [
"0.7684495",
"0.720403",
"0.6825744",
"0.6759102",
"0.67413265",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65347934",
"0.65280163",
"0.6478877",
"0.64785725",
"0... | 0.7305387 | 1 |
HybridAKSStorageStatus defines the observed state of HybridAKSStorage | def status(self) -> Optional[pulumi.Input['StorageSpacesPropertiesStatusArgs']]:
return pulumi.get(self, "status") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def storage_bytes_status(self) -> str:\n return pulumi.get(self, \"storage_bytes_status\")",
"def storage_gateway_status():\n gw_arn = os.environ['gw_arn']\n #Gets gateway ARN from the serverless script depending upon environment being deployed to\n\n sgw = boto3.client('storagegateway')\n sgw... | [
"0.65150267",
"0.6494839",
"0.6192419",
"0.58682615",
"0.58075684",
"0.5621734",
"0.5617191",
"0.555913",
"0.548315",
"0.54700184",
"0.54266053",
"0.54215086",
"0.54180133",
"0.53758734",
"0.53740287",
"0.53619903",
"0.5344375",
"0.53405046",
"0.53370106",
"0.53314245",
"0.53... | 0.6259041 | 2 |
Address of the Gateway associated with the network | def gateway(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "gateway") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def network_address(self):\n\n return self._network_address",
"def address(self):\n \n return self.__ip",
"def wan_address(self):\n return self._wan_address",
"def wan_address(self):\n if self._community.dispersy:\n host = self._community.dispersy.wan_address[0]\n\n ... | [
"0.7198366",
"0.7178252",
"0.70842457",
"0.6898058",
"0.68309003",
"0.676177",
"0.6726812",
"0.67122513",
"0.66830206",
"0.6619948",
"0.6619948",
"0.6603798",
"0.6582916",
"0.65826637",
"0.65781",
"0.65118974",
"0.6506415",
"0.6506415",
"0.6506415",
"0.6506415",
"0.6506415",
... | 0.643103 | 31 |
Computes the SHA256 hash of the file at the given path and encodes its value to a hexadecimal string of the given length. The computed value is returned as a string. | def get_file_hash(fname, hash_length):
hash_sha = hashlib.sha256()
with open(fname, 'rb') as infile:
for chunk in iter(lambda: infile.read(4096), b''):
hash_sha.update(chunk)
hash_sha = hash_sha.hexdigest()
hash_sha = int(hash_sha, 16) % (2 ** (4 * hash_length))
return hex_encode... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_hash(path: Path) -> str:\n m = hashlib.sha256()\n m.update(path.read_bytes())\n return m.hexdigest()",
"def sha256(path: Union[Path, str]) -> str:\n # The file shouldn't be too big to load into memory, so be lazy.\n with open(path, 'rb') as fp:\n data = fp.read()\n m = hashlib.sh... | [
"0.7636494",
"0.76014704",
"0.7514853",
"0.7365946",
"0.7228515",
"0.7178993",
"0.7174888",
"0.71408516",
"0.7072246",
"0.7057379",
"0.7043497",
"0.7041706",
"0.70254683",
"0.70200604",
"0.69845206",
"0.6977326",
"0.69688314",
"0.6907978",
"0.68987346",
"0.68977046",
"0.68842... | 0.75713116 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.