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 |
|---|---|---|---|---|---|---|
Simple bid dataset made of bid of lists. Same as `bid_dataset_0` in which demand intersects supply | def bidlist_dataset_0():
bm = BidManager()
bm.add_bid(1, 3, 0, True, 0)
bm.add_bid(2, 4, 1, True, 0)
bm.add_bid(5, 1, 2, True, 0)
bm.add_bid(4, 2, 3, False, 0)
bm.add_bid(1, 1, 4, False, 0)
bm.add_bid(5, 6, 5, False, 0)
return bm.get_df() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bid_dataset_1():\n\n bm = BidManager()\n\n bm.add_bid(1, 6.7, 0, True, 0)\n bm.add_bid(1, 6.6, 1, True, 0)\n bm.add_bid(1, 6.5, 2, True, 0)\n bm.add_bid(1, 6.4, 3, True, 0)\n bm.add_bid(1, 6.3, 4, True, 0)\n bm.add_bid(1, 6, 5, True, 0)\n\n bm.add_bid(1, 1, 6, False, 0)\n bm.add_bid(... | [
"0.77188975",
"0.75895643",
"0.6843523",
"0.6013941",
"0.5923481",
"0.5853487",
"0.56925863",
"0.5686099",
"0.56388825",
"0.55483335",
"0.5479251",
"0.5375521",
"0.5375521",
"0.5351677",
"0.5337863",
"0.52868015",
"0.52803874",
"0.5219304",
"0.521482",
"0.5187669",
"0.5170221... | 0.7712856 | 1 |
Returns all artifacts that can be get from this Channel. | def get(self) -> Iterable[Artifact]:
# TODO(b/125037186): We should support dynamic query against a Channel
# instead of a static Artifact collection.
return self._artifacts | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_artifacts(self): # noqa\n return []",
"def build_artifacts(self):\n return self._build_artifacts",
"def artifacts(self):\n return ArtifactManager(session=self._session)",
"def artifacts(self) -> Optional[Dict[str, Digest]]:\n return None",
"def get_all_entities(self):\n... | [
"0.753005",
"0.71621376",
"0.6808004",
"0.6711717",
"0.65810156",
"0.652821",
"0.64832616",
"0.6434282",
"0.63888735",
"0.62750924",
"0.6228542",
"0.6078709",
"0.6067226",
"0.6040727",
"0.6038874",
"0.59493965",
"0.593736",
"0.58574903",
"0.58574903",
"0.58574903",
"0.5857490... | 0.84708333 | 0 |
Reset the current config and routing map with blank objects | def reset(self):
self._config = Config()
self._router = Router(())
self._middleware = []
self._start_response = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reset(self):\n self._maps = {}",
"def reset_config():\r\n # TODO implement configuration reset\r\n pass",
"def reset( self ):\n self.conf = self.defaults",
"def reset_mapping(self):\n log.debug('Resetting %s wiremock mapping', self.url)\n try:\n requests.post(... | [
"0.6953647",
"0.68499345",
"0.6789301",
"0.66339177",
"0.6619755",
"0.6577201",
"0.6577186",
"0.65759045",
"0.6541521",
"0.6526948",
"0.6462455",
"0.6429008",
"0.6428707",
"0.64018464",
"0.6378993",
"0.6375002",
"0.6368425",
"0.6345978",
"0.63337827",
"0.6285402",
"0.6284637"... | 0.762735 | 0 |
Asks user to specify a city, month, and day to analyze. | def get_filters():
print('Hello! Let\'s explore some US bikeshare data!')
print()
#TO DO: get user input for city (chicago, new york city, washington). HINT: Use a while loop to handle invalid inputs
#Get a city name from the user, return something to the user showing the selection and break if they enter some... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Raw_Data(city,month,day):\n print(\"The city you have entered is: \",city)\n print(\"The month you have entered is: \",month)\n print(\"The day you have entered is: \",day)",
"def get_filters():\n city = None\n month = None\n day = None\n while day == None:\n # TO DO: get user input f... | [
"0.6670663",
"0.65355295",
"0.6460245",
"0.6373799",
"0.6348607",
"0.6310135",
"0.62867314",
"0.625986",
"0.6231188",
"0.62122154",
"0.62052953",
"0.61711454",
"0.6169287",
"0.6158972",
"0.6158044",
"0.6153508",
"0.614449",
"0.61302817",
"0.610529",
"0.6102876",
"0.6091747",
... | 0.6181617 | 11 |
Loads data for the specified city and filters by month and day if applicable. | def load_data(city, month, day):
# Using pandas accessor to find month, day, hour from the Start Time column in the source data
print("A moment please while I find the data....\n")
df = pd.read_csv(CITY_DATA[city])
df['Start Time'] = pd.to_datetime(df['Start Time'])
df['day_of_week'] = df['Start Time'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_data(city, month, day):\n df = pd.read_csv(CITY_DATA [city])\n \n # convert the Start Time column to datetime\n df['Start Time'] = pd.to_datetime(df['Start Time'])\n \n # extract month and day of week from Start Time to create new columns\n df['month'] = df['Start Time'].dt.month\n ... | [
"0.81320685",
"0.8108889",
"0.8045821",
"0.8042514",
"0.80090284",
"0.80071104",
"0.79991937",
"0.7998333",
"0.7988789",
"0.797905",
"0.79737365",
"0.79610896",
"0.7956163",
"0.7947432",
"0.79463065",
"0.7908287",
"0.7908229",
"0.7904569",
"0.7900715",
"0.78930074",
"0.788921... | 0.0 | -1 |
Displays statistics on the most frequent times of travel. | def time_stats(df):
print('\nCalculating The Most Frequent Times of Travel...\n')
start_time = time.time()
# TO DO: display the most common month
popular_month = df['month'].mode()[0]
print('Most popular month: ',popular_month)
# TO DO: display the most common day of week
popular_day = df... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def time_stats(df):\n\n print('\\nDisplaying the statistics on the most frequent times of '\n 'travel...\\n')\n start_time = time.time()\n\n # display the most common month\n most_common_month = df['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' +\... | [
"0.80247396",
"0.80233026",
"0.7915788",
"0.78266186",
"0.7822246",
"0.78143597",
"0.77659196",
"0.7740343",
"0.773628",
"0.76867086",
"0.7668633",
"0.7651731",
"0.7644636",
"0.76399267",
"0.76367253",
"0.7625196",
"0.7623158",
"0.7612803",
"0.76002145",
"0.7583438",
"0.75797... | 0.77344066 | 9 |
Displays statistics on the most popular stations and trip. | def station_stats(df):
print('\nCalculating The Most Popular Stations and Trip...\n')
start_time = time.time()
# TO DO: display most commonly used start station
common_start = df['Start Station'].mode()[0]
print("The most common place to start: ",common_start)
# TO DO: display most commonly u... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m... | [
"0.7816157",
"0.7662524",
"0.7554042",
"0.7492024",
"0.7475423",
"0.74471235",
"0.7430301",
"0.74246186",
"0.741813",
"0.7400704",
"0.7387859",
"0.73857087",
"0.73599696",
"0.73571277",
"0.73555714",
"0.73525584",
"0.7351796",
"0.735084",
"0.7342505",
"0.734093",
"0.7337747",... | 0.7365416 | 12 |
Displays statistics on the total and average trip duration. | def trip_duration_stats(df):
print('\nCalculating Trip Duration...\n')
start_time = time.time()
# TO DO: display total travel time
total_time = df['Trip Duration'].sum()
print("The total travel time was:",str(total_time))
# TO DO: display mean travel time
mean_time = df['Trip Duration'].m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri... | [
"0.8145283",
"0.800625",
"0.79516613",
"0.79394716",
"0.7933188",
"0.79289365",
"0.7917429",
"0.79167455",
"0.79100615",
"0.79077137",
"0.7902854",
"0.7893696",
"0.7891645",
"0.7888904",
"0.7887135",
"0.78862405",
"0.7884963",
"0.78764445",
"0.7870734",
"0.7868757",
"0.786631... | 0.80273277 | 1 |
Get the subset of nodes that can be the closest to this argument | def getCloseSubset(self, arg, dist_arg):
curr = self.root
while not isinstance(curr,VPTreeLeaf):
d = dist_arg(curr.pk, arg)
if d < curr.median_dist:
curr = curr.left_child
else:
curr = curr.right_child
return curr.pk_list | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def closest_node(node, nodes):\n nodes = np.asarray(nodes)\n deltas = nodes - node\n dist_2 = np.einsum(\"ij,ij->i\", deltas, deltas)\n return np.argmin(dist_2), np.min(dist_2)",
"def closest(t):\n diff = abs(label(t) - sum([ label(branch) for branch in branches(t) ]))\n return min([diff] + [cl... | [
"0.6476359",
"0.63017595",
"0.6295756",
"0.6269725",
"0.6256022",
"0.6213952",
"0.61908907",
"0.61212766",
"0.60095876",
"0.6000805",
"0.59745795",
"0.5947318",
"0.5916751",
"0.5901735",
"0.58946735",
"0.5864193",
"0.5860664",
"0.5858397",
"0.57895947",
"0.57834923",
"0.57782... | 0.5688965 | 28 |
Evaluate model using series of metrics. ====================================== | def evaluate_model(model_name, y_true, y_pred):
# Calculate performance metrics
rmse_eval = evaluate_rmse(y_true, y_pred)
mae_eval = evaluate_mae(y_true, y_pred)
r2_eval = evaluate_r2(y_true, y_pred)
# Print results
print_evaluation(model_name, mae_eval, rmse_eval, r2_eval) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def model_evaluate(model,x_train,n_y_array,x_val, vald_array):\n\n scores = model.evaluate(x_train, n_y_array, verbose=1)\n\n scores2 = model.evaluate(x_val, vald_array, verbose=1)\n\n\n print(\"for traininf set\")\n\n print(\"%s: %.2f%%\" % (model.metrics_names[1], scores[1]*100))\n\n print(\"%s: %... | [
"0.7563282",
"0.7417819",
"0.7345979",
"0.73233026",
"0.7242037",
"0.7214854",
"0.7197544",
"0.71700525",
"0.7096475",
"0.70146847",
"0.70070124",
"0.69532263",
"0.6944711",
"0.6879867",
"0.6841434",
"0.6789499",
"0.6788523",
"0.6772493",
"0.6768116",
"0.67620474",
"0.6760156... | 0.69549173 | 11 |
Returns the minimax action using self.depth and self.evaluationFunction | def getAction(self, gameState):
"*** YOUR CODE HERE ***"
bestchoice = "Stop"
value = float("-inf")
alpha = float("-inf")
beta = float("inf")
i = 0
actlist = gameState.getLegalActions(0)
while i < len(actlist):
action = actlist[i]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getAction(self, gameState: GameState):\n _max = float(\"-inf\")\n action = None\n for move in gameState.getLegalActions(0):\n util = minimax(self.evaluationFunction, 1, 0,\n gameState.generateSuccessor(0, move), self.depth)\n if util > _max o... | [
"0.7482665",
"0.7383559",
"0.71806973",
"0.7110041",
"0.70884514",
"0.70694935",
"0.70683014",
"0.7048308",
"0.70055133",
"0.69651455",
"0.69642085",
"0.69604385",
"0.6945924",
"0.68998593",
"0.6895832",
"0.688605",
"0.6826282",
"0.6767276",
"0.6758028",
"0.6751636",
"0.67054... | 0.0 | -1 |
Test case for custom_query_response_descriptor_octopus_server_web_api_actions_list_event_categories_responder | def test_custom_query_response_descriptor_octopus_server_web_api_actions_list_event_categories_responder(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_custom_query_response_descriptor_octopus_server_web_api_actions_list_event_categories_responder_spaces(self):\n pass",
"def test_custom_query_response_descriptor_octopus_server_web_api_actions_list_events_responder(self):\n pass",
"def test_custom_query_response_descriptor_octopus_server... | [
"0.89028096",
"0.7795244",
"0.7233156",
"0.7229972",
"0.7201658",
"0.7037292",
"0.69368",
"0.67444867",
"0.65723395",
"0.6540148",
"0.6513401",
"0.6442267",
"0.6442267",
"0.6436719",
"0.63611627",
"0.61597776",
"0.6145536",
"0.60522145",
"0.5994829",
"0.596764",
"0.5934692",
... | 0.956792 | 0 |
Test case for custom_query_response_descriptor_octopus_server_web_api_actions_list_event_categories_responder_spaces | def test_custom_query_response_descriptor_octopus_server_web_api_actions_list_event_categories_responder_spaces(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_custom_query_response_descriptor_octopus_server_web_api_actions_list_event_categories_responder(self):\n pass",
"def test_custom_query_response_descriptor_octopus_server_web_api_actions_list_events_responder_spaces(self):\n pass",
"def test_custom_query_response_descriptor_octopus_server... | [
"0.87426376",
"0.8176682",
"0.7826414",
"0.76852435",
"0.76480013",
"0.74944454",
"0.7132097",
"0.69892365",
"0.6961501",
"0.68087775",
"0.6778637",
"0.6666411",
"0.65505254",
"0.63158834",
"0.6303496",
"0.62652373",
"0.6238433",
"0.6182006",
"0.6182006",
"0.6178335",
"0.6045... | 0.9490483 | 0 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def plot_confusion_matrix(y_true, y_pred, classes,
normalize=False,
title=None,
cmap=plt.cm.Blues):
if not title:
if normalize:
title = 'Normalized confusion matrix'
else:
title = 'Confusion matrix,... | {
"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.81942594",
"0.80949026",
"0.8028581",
"0.8018849",
"0.79934716",
"0.7990885",
"0.7980801",
"0.79750925",
"0.7960907",
"0.79557455",
"0.79372376",
"0.7934255",
"0.79340357",
"0.79309034",
"0.7925931",
"0.7924125",
"0.79232645",
"0.7922545",
"0.79224193",
"0.79218626",
"0.79... | 0.0 | -1 |
Setup the MySensors platform for sensors. | def setup_platform(hass, config, add_devices, discovery_info=None):
# Only act if loaded via mysensors by discovery event.
# Otherwise gateway is not setup.
if discovery_info is None:
return
for gateway in mysensors.GATEWAYS.values():
# Define the S_TYPES and V_TYPES that the platform s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setup_sensors(self, configs):\n self.__sensors = self.setup_components(configs, 'scale_client.sensors')",
"def setup_platform(\n hass: HomeAssistant,\n config: ConfigType,\n add_entities: AddEntitiesCallback,\n discovery_info: DiscoveryInfoType | None = None,\n) -> None:\n name = config... | [
"0.7212745",
"0.7093431",
"0.70541626",
"0.70416975",
"0.68479294",
"0.6828407",
"0.68229806",
"0.68132997",
"0.6795623",
"0.6784897",
"0.66878235",
"0.66808456",
"0.6680276",
"0.66720206",
"0.66181",
"0.66095674",
"0.6599806",
"0.6584221",
"0.65744656",
"0.6573402",
"0.65687... | 0.6399857 | 34 |
Return True if state updates should be forced. If True, a state change will be triggered anytime the state property is updated, not just when the value changes. | def force_update(self):
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_on(self):\n if self.is_update_locked():\n return self.graceful_state\n if self._state['action'] == 1 and self._state['state'] == 2:\n return True\n return False",
"def update_state(self, force=False):\n if not force and time.time() - self.last_updated_at <... | [
"0.7352585",
"0.6847802",
"0.6785121",
"0.6759138",
"0.6740426",
"0.66969055",
"0.66902435",
"0.66786283",
"0.66786283",
"0.66786283",
"0.66786283",
"0.66786283",
"0.6668241",
"0.6620494",
"0.66057354",
"0.6562687",
"0.6562687",
"0.65256304",
"0.6504759",
"0.64863086",
"0.642... | 0.63826674 | 23 |
Return the unit of measurement of this entity. | def unit_of_measurement(self):
set_req = self.gateway.const.SetReq
unit_map = {
set_req.V_TEMP: (TEMP_CELSIUS
if self.gateway.metric else TEMP_FAHRENHEIT),
set_req.V_HUM: '%',
set_req.V_DIMMER: '%',
set_req.V_LIGHT_LEVEL: '%',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_measurement(self):\n return self._unit",
"... | [
"0.8798588",
"0.8798588",
"0.8798588",
"0.8798588",
"0.8798588",
"0.8798588",
"0.8798588",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.874945",
"0.8741121",
... | 0.73372775 | 90 |
will raise CanNotEnterSkillLevel if the user is blocked from that ContestPool. otherwise does nothing. | def validate_can_enter(self, user, contest_pool):
# the contest attempting to be joined
target_skill_level = contest_pool.skill_level
if target_skill_level.enforced == False:
return # the skill level of this contest is not enforced -- anyone can join no matter what
# find ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def attack_bonus_on_level(self, level):\n raise NotImplementedError",
"def ability_bonus_on_level(self, level):\n raise NotImplementedError",
"def check_if_enough_skill_points(self):\r\n for skill_string in self.__skills:\r\n if (self.__skills[skill_string].points_to_up >\r\n ... | [
"0.5639696",
"0.5457208",
"0.54558647",
"0.5245098",
"0.5224073",
"0.51902544",
"0.5085946",
"0.50718695",
"0.50690836",
"0.50189334",
"0.49549413",
"0.49481076",
"0.49457508",
"0.49391586",
"0.49351296",
"0.4928797",
"0.49112466",
"0.48969543",
"0.4893207",
"0.48865083",
"0.... | 0.747221 | 0 |
returns the datetime equivalent to the start time plus the duration minutes | def get_end(self):
return self.start + timedelta(minutes=self.duration) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def stop_time(self):\n return self.start_time + timedelta(hours=self.duration)",
"def get_duration(start_datetime):\n end_datetime = datetime.now()\n total_seconds = (end_datetime - start_datetime).total_seconds()\n hours, remainder = divmod(total_seconds, 3600)\n minutes, seco... | [
"0.7029181",
"0.6745447",
"0.65464294",
"0.641167",
"0.6407045",
"0.6390997",
"0.6359816",
"0.6292358",
"0.6234452",
"0.622688",
"0.6206527",
"0.62004876",
"0.6192609",
"0.6179414",
"0.61400425",
"0.61248934",
"0.611297",
"0.6088689",
"0.6027309",
"0.6009388",
"0.60005116",
... | 0.68873024 | 1 |
Return a `ProtocolStore` linked to the same database as the subject under test. `ProtocolStore` is tested elsewhere. We only need it here to prepare the database for our `AnalysisStore` tests. An analysis always needs a protocol to link to. | def protocol_store(sql_engine: SQLEngine) -> ProtocolStore:
return ProtocolStore.create_empty(sql_engine=sql_engine) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def subject(sql_engine: SQLEngine) -> AnalysisStore:\n return AnalysisStore(sql_engine=sql_engine)",
"async def test_create_engine_with_protocol(\n decoy: Decoy,\n subject: EngineStore,\n json_protocol_source: ProtocolSource,\n) -> None:\n protocol = ProtocolResource(\n protocol_id=\"my coo... | [
"0.6188478",
"0.6123151",
"0.5851717",
"0.58411133",
"0.56083995",
"0.53392106",
"0.5315312",
"0.5278126",
"0.52757543",
"0.5232903",
"0.51536906",
"0.5149424",
"0.51023304",
"0.51023155",
"0.5101444",
"0.50953954",
"0.5074067",
"0.5046802",
"0.50019735",
"0.4977478",
"0.4968... | 0.6799919 | 0 |
Return the `AnalysisStore` test subject. | def subject(sql_engine: SQLEngine) -> AnalysisStore:
return AnalysisStore(sql_engine=sql_engine) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_subject(self):\n return self._subject",
"def subject(self):\n return self.__subject",
"def subject(self):\n return self._subject",
"def subject(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"subject\")",
"def subject(decoy: Decoy, hardware_api: HardwareControlA... | [
"0.62759763",
"0.6199015",
"0.6181294",
"0.6041375",
"0.5911803",
"0.59001315",
"0.57129455",
"0.56475353",
"0.5620528",
"0.56187594",
"0.5566251",
"0.5537356",
"0.5513122",
"0.5455822",
"0.5455822",
"0.54085624",
"0.5407185",
"0.5376858",
"0.5376858",
"0.5361416",
"0.5310536... | 0.67404085 | 0 |
Delete app and db instances after each test case. | def tearDown(self):
db.session.remove()
db.drop_all()
self.app_context.pop() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tearDown(self):\n self.app = create_app()\n self.client = self.app.test_client\n setup_db(self.app, TEST_DB_PATH)\n\n # binds the app to the current context\n with self.app.app_context():\n # create all tables\n db.drop_all()",
"def tearDown(self):\n ... | [
"0.80024976",
"0.79851097",
"0.7972559",
"0.7925397",
"0.7925397",
"0.78998685",
"0.7873015",
"0.78698266",
"0.78220516",
"0.7796553",
"0.7796553",
"0.7758316",
"0.77538884",
"0.77538884",
"0.77538884",
"0.77538884",
"0.7735989",
"0.76388305",
"0.7582643",
"0.7575801",
"0.750... | 0.7746995 | 16 |
Test the user model verify_password method. The method should return True for valid passwords and False for invalid passwords. | def test_password_verification(self):
self.user.password = '123456'
self.assertTrue(self.user.verify_password('123456'))
self.assertFalse(self.user.verify_password('password')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_verify_password(self):\n db.session.add(self.user)\n db.session.commit()\n\n user = User.query.filter_by(user_name = \"john_doe\").first()\n\n self.assertTrue(user.verify_password(\"password\"))\n self.assertFalse(user.verify_password(\"pass\"))",
"def test_check_passw... | [
"0.84078205",
"0.83725405",
"0.8251786",
"0.8189135",
"0.80189997",
"0.79673856",
"0.77531254",
"0.7726492",
"0.7695734",
"0.75975794",
"0.75353336",
"0.74572295",
"0.7387828",
"0.738287",
"0.73202395",
"0.73050046",
"0.72525483",
"0.7227365",
"0.72150856",
"0.7207916",
"0.71... | 0.8808948 | 0 |
Test that that Users table raises errors for empty cells. | def test_saving_null_entries_to_users_table(self):
user = User(first_name='seni', email='seni@andela.com')
user.password = '123456'
with self.assertRaises(sqlalchemy.exc.IntegrityError):
db.session.add(user)
db.session.commit() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_table_empty(self):\n self.assertEqual(len(self.table), 0)",
"def test_user_table_empty(db_session):\n query = db_session.query(User).all()\n assert not len(query)",
"def test_get_error_data_table_when_no_errors(self):\n field_setup = None\n error_names = ['non-field_name', '... | [
"0.72586447",
"0.7214089",
"0.71232027",
"0.68206036",
"0.6811023",
"0.6800343",
"0.67889094",
"0.67741096",
"0.67175996",
"0.66645706",
"0.6651963",
"0.6548274",
"0.6543312",
"0.6535204",
"0.65245736",
"0.6508661",
"0.6464346",
"0.6463127",
"0.64504963",
"0.6443909",
"0.6443... | 0.61600894 | 42 |
Test the many to many relationship between User and LongUrl. | def test_longurl_user_relationship(self):
self.long_url.users.append(self.user)
self.long_url.users.append(self.user2)
self.user.long_urls.append(self.long_url2)
db.session.add_all([self.long_url, self.long_url2, self.user,
self.user2])
self.assertEqua... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_shorturl_user_relationship(self):\n self.user.short_urls.append(self.short_url)\n self.user2.short_urls.append(self.short_url)\n self.user.short_urls.append(self.short_url2)\n self.long_url.short_urls.append(self.short_url)\n self.long_url.short_urls.append(self.short_ur... | [
"0.74622315",
"0.73880506",
"0.62779707",
"0.6114311",
"0.6001878",
"0.5982388",
"0.5849832",
"0.580381",
"0.5799761",
"0.57066196",
"0.56939006",
"0.5666139",
"0.56272733",
"0.5567841",
"0.54922986",
"0.5491555",
"0.54792404",
"0.5424204",
"0.54074323",
"0.5370483",
"0.53089... | 0.8212299 | 0 |
Return a printable representation of this view Since this object is meant to be used in templates, this default string implemntation returns the value of the view's associated tag. | def __str__(self) -> str:
return self.value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__(self):\n return str(self.tag)",
"def __repr__(self):\n\n p = self\n\n return f\"<tag_name = {p.tag_name}\"",
"def __html__(self):\n return str(self)",
"def __str__ (self) :\n\n return self.as_string()",
"def __str__(self):\n return f\"<{type(self).__nam... | [
"0.7747086",
"0.7305602",
"0.71214753",
"0.7016658",
"0.6964847",
"0.69403636",
"0.6936162",
"0.6936162",
"0.6936162",
"0.6934378",
"0.6915249",
"0.69129384",
"0.6909598",
"0.6909598",
"0.6909598",
"0.69087905",
"0.6900906",
"0.6896826",
"0.6896826",
"0.6880308",
"0.6878012",... | 0.69731885 | 5 |
If env var name contains a sensitive pattern like 'SECRET' or 'KEY', then just return the hash of the value. Input is a env var tuple, e.g. ('SHELL','/bin/bash') | def filter_sensitive_vars(env_var: Tuple[str, str]):
(key, value) = env_var
# Test if value is super long
MAX_VALUE_LEN = 256
if len(value) > MAX_VALUE_LEN:
return (key + '(HASHED)', hashlib.md5(str(value).encode("utf-8")).hexdigest() + '(HASH)')
# Test if Value is url with password: http:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_get_secret_from_env(monkeypatch):\n key = str(uuid.uuid4()).replace('-', '.')\n value = str(uuid.uuid4())\n monkeypatch.setenv(key.replace('.', '_').upper(), value)\n secret = lambdautils.utils.get_secret(key)\n assert secret == value",
"def check_for_env_vars(value: Union[str, dict]):\n ... | [
"0.6662633",
"0.61409557",
"0.603325",
"0.6026969",
"0.6003298",
"0.59879744",
"0.5976578",
"0.5969175",
"0.59118867",
"0.58975935",
"0.5842905",
"0.58061445",
"0.5761401",
"0.5720288",
"0.5717983",
"0.57175016",
"0.5709207",
"0.56771815",
"0.5670162",
"0.56640077",
"0.565564... | 0.74745923 | 0 |
returns user by id | def get(self, id):
try:
flask_app.logger.debug('We are getting the user: %d', id)
return user_service.get(id)
except AssertionError as e:
user_space.abort(400, e.args[0], status = "Could not get user", statusCode = "400")
except Exception as e:
user_space.abort(500, e.args[0], status = "Could not get ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_user(id):\n pass",
"def get_user_by_id(self, id):\n\t\treturn self.users.get(id)",
"def get(id):\n return User.query.filter_by(id=id).first()",
"def getUser(self, id : int) -> bbUser.bbUser:\n id = self.validateID(id)\n return self.users[id]",
"def get_single_user(self, id):... | [
"0.8961141",
"0.8901264",
"0.87237954",
"0.86390316",
"0.8568494",
"0.84984964",
"0.8495531",
"0.84471226",
"0.8429416",
"0.83838964",
"0.83577317",
"0.83530885",
"0.83268124",
"0.82770354",
"0.82770354",
"0.82770354",
"0.82770354",
"0.82713675",
"0.8251324",
"0.8236562",
"0.... | 0.8004454 | 42 |
Takes weight vector w Returns slope m and intercept b of line We know that w^T x = 0 for points (x1,x2) on the line, so w0 1 + w1 x1 + w2 x2 = 0 w0 + w1 x1 + w2 x2 = 0 | def weight_to_line(w):
b = -(w[0] / w[2])
m = -(w[1] / w[2])
return b, m | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def model_fun(params, slope, x):\n w = params['w']\n t0 = params['t0']\n offset = params['offset']\n return offset + slope * jax.nn.sigmoid(jnp.dot(x, w) - t0)",
"def setWeights(self, weights):\n weights = np.array(weights)\n\n w1 = weights[0]\n w2 = weights[1]\n i... | [
"0.684835",
"0.68014485",
"0.6570542",
"0.6397525",
"0.63610613",
"0.61787796",
"0.61785775",
"0.61728173",
"0.6169821",
"0.6153904",
"0.6129785",
"0.60924566",
"0.6074908",
"0.6049103",
"0.60461664",
"0.603847",
"0.6014494",
"0.5980499",
"0.59669745",
"0.5959798",
"0.5949633... | 0.78953344 | 0 |
Return the class of this device, from component DEVICE_CLASSES. | def device_class(self):
return DEVICE_CLASS_OUTLET | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def device_class(self):\n return DEVICE_CLASSES.get(self.sensor_data[\"model\"])",
"def device_class(self):\n return self.sensor_type[\"class\"]",
"def device_class(self):\n return SENSOR_TYPES[self.sensor][3].get(\"device_class\")",
"def get_class(self):\n return devices.get_clas... | [
"0.87266827",
"0.852074",
"0.8471363",
"0.8442806",
"0.83113384",
"0.83078414",
"0.8241434",
"0.8241434",
"0.8241434",
"0.8241434",
"0.8241434",
"0.8197917",
"0.81939846",
"0.8125181",
"0.8109455",
"0.8109455",
"0.8109455",
"0.8059611",
"0.8053818",
"0.8053818",
"0.80360585",... | 0.6745936 | 54 |
Return the current state of the on/off zone. The zone is considered 'on' if & only if it is override/on (e.g. timer/on is 'off'). | def is_on(self) -> bool:
return self._zone.data["mode"] == "override" and self._zone.data["setpoint"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_on(self):\n return self._zone.is_on",
"def state(self):\n return STATE_ON if self.is_on else STATE_OFF",
"def state(self):\n return STATE_ON if self.is_on else STATE_OFF",
"def state(self):\n return STATE_ON if self.is_on else STATE_OFF",
"def _get_state(self):\n fw_wp... | [
"0.71188664",
"0.6940509",
"0.6940509",
"0.6940509",
"0.6791038",
"0.6631459",
"0.6631459",
"0.6631459",
"0.65985185",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",
"0.657138",... | 0.687257 | 4 |
Returns the total energy of the given system. | def energy(ps):
return kinetic_energy(ps) + potential_energy(ps) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def total_energy(self):\n return self._total_energy",
"def get_energy(self):\n return self.momentum*self.momentum/(2*self.mass)",
"def get_energy(system, positions, vecs):\n \n integrator = ommtoolsints.LangevinIntegrator(293.15 * kelvin, 1./picoseconds, 2. * femtoseconds)\n platform = m... | [
"0.71792144",
"0.7173614",
"0.714209",
"0.7126193",
"0.70427406",
"0.69814205",
"0.6958869",
"0.69188374",
"0.67727834",
"0.67677534",
"0.6761382",
"0.67152756",
"0.6704224",
"0.6704224",
"0.6682953",
"0.66675264",
"0.6662387",
"0.6614439",
"0.65915495",
"0.65711635",
"0.6556... | 0.68108755 | 8 |
Iteratively segments a curve into its component CurvePhases | def segment(segmentation_model, thresholds=None):
if thresholds is None:
thresholds = DEFAULT_THRESHOLDS
# Mark all flats
_set_flat_segments(segmentation_model, thresholds)
yield None
while (segmentation_model.phases == CurvePhases.UndeterminedNonFlat.value).any():
# Mark linear... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SeparateCurves2(context):\n Curves = []\n active = context.active_object\n splines = active.data.splines\n\n for idx, spline in enumerate(splines): \n\n CurveName = active.name + \"_\" + str(idx)\n StrandVerts = [v.co for v in spline.points]\n # create Object\n cu... | [
"0.6465296",
"0.6366335",
"0.6262557",
"0.6152942",
"0.6111494",
"0.6111406",
"0.6075181",
"0.5921951",
"0.5912101",
"0.5806138",
"0.57624584",
"0.57509226",
"0.57401353",
"0.5659682",
"0.564102",
"0.5580429",
"0.55028707",
"0.5496736",
"0.5492969",
"0.5491851",
"0.5487916",
... | 0.53884643 | 31 |
Restore max heap property in the ith element | def max_heapify(array, root):
print(array)
while True:
left_child = 2*i
right_child = 2*i + 1
print(left_child, right_child)
n = len(array)
if left_child <= n and array[left_child] > array[i]:
largest = left_child
else:
largest = i
print(right_child)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_max(self):\n retval = self.heap_list[1]\n self.heap_list[1] = self.heap_list[self.size]\n self.size = self.size - 1\n pop_val = self.heap_list.pop()\n self.percolate_down(1)\n return retval",
"def heap_extract_max(self, A):\n maxi = A[0]\n A[0] =... | [
"0.7689879",
"0.7252342",
"0.69993097",
"0.69961876",
"0.69873685",
"0.6835044",
"0.6714873",
"0.6707172",
"0.6673313",
"0.66124445",
"0.6597348",
"0.65843034",
"0.6539959",
"0.65248215",
"0.6513975",
"0.6496424",
"0.64715767",
"0.64586765",
"0.6455396",
"0.6455396",
"0.64492... | 0.6195748 | 43 |
Compute pairwise distance of a point cloud. | def _pairwise_distance(x):
x_inner = -2*torch.matmul(x, x.transpose(2, 1))
x_square = torch.sum(torch.mul(x, x), dim=-1, keepdim=True)
return x_square + x_inner + x_square.transpose(2, 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def distancePairs(self):\n return spsd.squareform(spsd.pdist(self.coordinates()))",
"def _pairwise_dist(cx, cy, p=2, _pow_flag=False):\n def _are_equal(cx, cy):\n if cx is cy:\n return True\n return torch.equal(cx, cy)\n\n res = None\n m = cx.size(0)\n n = cy.size(0)\n... | [
"0.68686175",
"0.6627776",
"0.6617983",
"0.655276",
"0.653255",
"0.64474905",
"0.6430863",
"0.63984513",
"0.6350344",
"0.632654",
"0.63025546",
"0.6294871",
"0.6260713",
"0.62574446",
"0.6238805",
"0.6221704",
"0.619433",
"0.6188565",
"0.61809283",
"0.61570513",
"0.61513954",... | 0.6414535 | 7 |
Construct as point wrapper from a selected point object. | def from_selection(cls):
guid = compas_rhino.select_point()
return cls.from_guid(guid) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def createFromPoint(cls, point, **kwargs):\n return cls(point.x, point.y, **kwargs)",
"def __get_points_object__(xyz):\n # TODO: Need to fix this to handle all points, not just the first\n source = vtk.vtkPointSource()\n source.SetCenter(xyz[0])\n source.SetRadius(0)\n s... | [
"0.743295",
"0.6749444",
"0.67372584",
"0.6725572",
"0.6703211",
"0.6458322",
"0.64559287",
"0.64450854",
"0.64450854",
"0.6393821",
"0.6359074",
"0.63401157",
"0.6257237",
"0.6219237",
"0.6195984",
"0.6170856",
"0.6165779",
"0.6084238",
"0.6083281",
"0.6075913",
"0.60643107"... | 0.0 | -1 |
Gets the band_width of this CreateCloudPhoneServerRequestBody. | def band_width(self):
return self._band_width | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def width(self) -> int:\n\t\treturn self._raw_result['data']['width']",
"def width(self):\n return self['width']",
"def get_width(self) -> int:\n return self.rsimulator.get_frame_width()",
"def get_width(self):\n return self.width",
"def get_road_width(self):\r\n if self.road_wi... | [
"0.6095818",
"0.6086903",
"0.60555774",
"0.60122865",
"0.59824216",
"0.5979289",
"0.5979289",
"0.5979289",
"0.59719956",
"0.597015",
"0.5959364",
"0.5958696",
"0.5958696",
"0.5958696",
"0.5958696",
"0.59579915",
"0.5936687",
"0.59099936",
"0.58338964",
"0.58291477",
"0.582130... | 0.7520951 | 0 |
Gets the extend_param of this CreateCloudPhoneServerRequestBody. | def extend_param(self):
return self._extend_param | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def phone_extension(self) -> Optional[str]:\n return pulumi.get(self, \"phone_extension\")",
"def extend_param(self, extend_param):\n self._extend_param = extend_param",
"def get_extension_param(self):\n if 'frame' in self.disp_parameters['extension']:\n exten = 'all'\n e... | [
"0.5636278",
"0.5588487",
"0.53195536",
"0.52099067",
"0.5185296",
"0.517154",
"0.50998527",
"0.5092028",
"0.5002822",
"0.49325213",
"0.48385856",
"0.4789014",
"0.477487",
"0.47609818",
"0.4741877",
"0.47183836",
"0.4695215",
"0.46725905",
"0.46725905",
"0.46601155",
"0.46465... | 0.65604705 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, CreateCloudPhoneServerRequestBody):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.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):
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.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.0 | -1 |
return a list of colors. | def setColorConf(colors,ngroups)->list:
if colors == "hcl":
try:
from colorspace import sequential_hcl
color_repo = sequential_hcl(h=[15,375],l=65,c=70)
colors_list = color_repo.colors(ngroups + 1)
except ImportError:
print('hcl colorspace package has... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getColors():\n return ['#8c99fc', '#cacefd', '#fff1d7', '#feda98', '#fda85a', '#fc6647']",
"def getColors():\n colors = ['#d53e4f',\n '#fc8d59',\n '#fee08b',\n '#ffffbf',\n '#e6f598',\n '#99d594',\n '#3288bd',\n ]... | [
"0.8782499",
"0.8512662",
"0.822734",
"0.81806785",
"0.817295",
"0.817295",
"0.8125536",
"0.7948913",
"0.7865565",
"0.76129365",
"0.7571507",
"0.75689185",
"0.75621325",
"0.7552887",
"0.7356989",
"0.73403585",
"0.7288362",
"0.7283716",
"0.72825146",
"0.7210132",
"0.7205034",
... | 0.7155825 | 23 |
Clone(itkIsoDataThresholdCalculatorHDF self) > itkIsoDataThresholdCalculatorHDF_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHDF_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDF_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFF_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFF_Clone(self)",
"def Clone(self) -> \"itkHistogramThresholdCalculatorHDF_Pointer\":\n return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalc... | [
"0.8554783",
"0.8258655",
"0.81480765",
"0.8018703",
"0.8007642",
"0.79722804",
"0.7963955",
"0.79008806",
"0.7559696",
"0.7545366",
"0.751799",
"0.7472497",
"0.7434612",
"0.73097396",
"0.72864026",
"0.7202958",
"0.7093336",
"0.67993784",
"0.67993057",
"0.6796522",
"0.6770994... | 0.917414 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDF | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDF *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDF_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHDF_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDF *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDF_cast(obj)",
"def itkIsoDataThresholdCalculatorHFF_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFF *\":\n ... | [
"0.8141866",
"0.7676534",
"0.7574197",
"0.7465129",
"0.7451627",
"0.71564496",
"0.7150579",
"0.7098716",
"0.7098447",
"0.70970136",
"0.70797604",
"0.7032059",
"0.6989272",
"0.6964693",
"0.6964098",
"0.69375986",
"0.6935302",
"0.6871792",
"0.68597585",
"0.68536675",
"0.6748655... | 0.8055614 | 1 |
New() > itkIsoDataThresholdCalculatorHDF Create a new object of the class itkIsoDataThresholdCalculatorHDF and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parameter ... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHDF.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHFF.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkHistogramThresholdCalculatorHDF.__New_orig__()\n import itkTemplate\n i... | [
"0.7632723",
"0.75938237",
"0.7254258",
"0.72426116",
"0.7209722",
"0.70994145",
"0.701572",
"0.70067936",
"0.6974605",
"0.6911856",
"0.6893007",
"0.68750143",
"0.6852827",
"0.67975324",
"0.66186625",
"0.64857644",
"0.64610595",
"0.6421311",
"0.6369186",
"0.6343073",
"0.63298... | 0.8091353 | 0 |
itkIsoDataThresholdCalculatorHDF_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDF | def itkIsoDataThresholdCalculatorHDF_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDF *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDF_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDF *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDF_cast(obj)",
"def itkIsoDataThresholdCalculatorHFF_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFF *\":\n return _itkIsoDataThreshol... | [
"0.8453416",
"0.8087776",
"0.7941935",
"0.78809375",
"0.78496146",
"0.7514363",
"0.74353474",
"0.74031246",
"0.740032",
"0.73830324",
"0.73742163",
"0.7342124",
"0.732693",
"0.7321061",
"0.73111373",
"0.7307277",
"0.72865695",
"0.7250726",
"0.7179532",
"0.71216655",
"0.708317... | 0.8676543 | 0 |
Clone(itkIsoDataThresholdCalculatorHDSS self) > itkIsoDataThresholdCalculatorHDSS_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHDSS_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDSS_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHDUS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUS_Clone(self)",
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFSS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalcula... | [
"0.84898937",
"0.8273826",
"0.8162977",
"0.7837391",
"0.7764406",
"0.75924414",
"0.7549157",
"0.74829346",
"0.7318271",
"0.73146",
"0.7164149",
"0.69512224",
"0.68996865",
"0.6838507",
"0.66538364",
"0.6627796",
"0.65364856",
"0.6497752",
"0.64468193",
"0.63944143",
"0.637010... | 0.9154244 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDSS | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDSS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDSS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHDSS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDSS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDSS_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUS *\":\n return _itkIsoDataThre... | [
"0.75920683",
"0.75827557",
"0.75440216",
"0.7338149",
"0.73228586",
"0.7265612",
"0.7263054",
"0.7239291",
"0.7222607",
"0.71242994",
"0.71150607",
"0.7054207",
"0.70487684",
"0.70229256",
"0.70199096",
"0.6948311",
"0.6924187",
"0.68415296",
"0.6835327",
"0.67643744",
"0.66... | 0.7603303 | 0 |
New() > itkIsoDataThresholdCalculatorHDSS Create a new object of the class itkIsoDataThresholdCalculatorHDSS and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHDSS.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHFSS.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHDUS.__New_orig__()\n import itkTemplate\n i... | [
"0.72389066",
"0.7195321",
"0.7132121",
"0.65295225",
"0.6468579",
"0.6358963",
"0.6353383",
"0.6352633",
"0.6253941",
"0.6125984",
"0.6015743",
"0.5998025",
"0.5916716",
"0.5902549",
"0.5894164",
"0.5814306",
"0.5800941",
"0.5796523",
"0.57492524",
"0.5709911",
"0.5701449",
... | 0.8033076 | 0 |
itkIsoDataThresholdCalculatorHDSS_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDSS | def itkIsoDataThresholdCalculatorHDSS_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDSS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDSS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDSS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDSS_cast(obj)",
"def itkIsoDataThresholdCalculatorHDUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUS *\":\n return _itkIsoDataThre... | [
"0.80722094",
"0.79663986",
"0.7808199",
"0.76991016",
"0.76062626",
"0.7473871",
"0.74641144",
"0.731461",
"0.7271553",
"0.726566",
"0.7264143",
"0.72242177",
"0.7221355",
"0.71242297",
"0.71093947",
"0.7106004",
"0.7004682",
"0.69619817",
"0.6882675",
"0.68376887",
"0.67338... | 0.8302645 | 0 |
Clone(itkIsoDataThresholdCalculatorHDUC self) > itkIsoDataThresholdCalculatorHDUC_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHDUC_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUC_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHDUS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUS_Clone(self)",
"def Clone(self) -> \"itkHistogramThresholdCalculatorHDUC_Pointer\":\n return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdC... | [
"0.84847325",
"0.7835145",
"0.783368",
"0.7758571",
"0.7755985",
"0.7648376",
"0.7622836",
"0.74408007",
"0.7333308",
"0.71590674",
"0.711837",
"0.67781717",
"0.6771529",
"0.6744446",
"0.6717266",
"0.66587454",
"0.6597924",
"0.6592126",
"0.6518979",
"0.6444472",
"0.64210635",... | 0.8987378 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDUC | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDUC *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUC_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHDUC_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUC *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUC_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUS *\":\n return _itkIsoDataThre... | [
"0.80072135",
"0.7683409",
"0.76714927",
"0.74982375",
"0.74974984",
"0.7465754",
"0.737887",
"0.7367019",
"0.73538756",
"0.7322084",
"0.7291567",
"0.72894317",
"0.72786576",
"0.7126812",
"0.7029297",
"0.69454724",
"0.692178",
"0.685906",
"0.68429834",
"0.6789411",
"0.6736791... | 0.7897058 | 1 |
New() > itkIsoDataThresholdCalculatorHDUC Create a new object of the class itkIsoDataThresholdCalculatorHDUC and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHDUC.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHDUS.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkHistogramThresholdCalculatorHDUC.__New_orig__()\n import itkTemplate\n ... | [
"0.7301943",
"0.7255554",
"0.66846776",
"0.66393733",
"0.65342146",
"0.64257014",
"0.6348359",
"0.63220996",
"0.610289",
"0.60320425",
"0.6010678",
"0.5958105",
"0.5942422",
"0.59098047",
"0.58723617",
"0.5856352",
"0.58486646",
"0.5838856",
"0.5809916",
"0.5788919",
"0.57882... | 0.8103228 | 0 |
itkIsoDataThresholdCalculatorHDUC_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDUC | def itkIsoDataThresholdCalculatorHDUC_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDUC *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUC_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUC *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUC_cast(obj)",
"def itkIsoDataThresholdCalculatorHDUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUS *\":\n return _itkIsoDataThre... | [
"0.8320403",
"0.80786616",
"0.7919797",
"0.783352",
"0.7716649",
"0.7620537",
"0.75916743",
"0.75206995",
"0.745535",
"0.743691",
"0.7410925",
"0.7391102",
"0.7355014",
"0.727217",
"0.72116375",
"0.7183224",
"0.7119788",
"0.6932259",
"0.6924386",
"0.6764176",
"0.6760907",
"... | 0.8671532 | 0 |
Clone(itkIsoDataThresholdCalculatorHDUS self) > itkIsoDataThresholdCalculatorHDUS_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHDUS_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUS_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHDSS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDSS_Clone(self)",
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHDUC_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalcula... | [
"0.82358927",
"0.82076496",
"0.80185485",
"0.7957177",
"0.7577852",
"0.75019556",
"0.7475156",
"0.74196213",
"0.73034555",
"0.72364205",
"0.7167624",
"0.69795376",
"0.68774164",
"0.68158495",
"0.6742527",
"0.65773517",
"0.64879453",
"0.6472442",
"0.64262336",
"0.6409868",
"0.... | 0.90694135 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDUS | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDUS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHDUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUS_cast(obj)",
"def itkIsoDataThresholdCalculatorHFUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUS *\... | [
"0.77212894",
"0.728816",
"0.7219856",
"0.7193993",
"0.7184625",
"0.7180772",
"0.7165727",
"0.71527064",
"0.70936793",
"0.7087731",
"0.7061462",
"0.7057799",
"0.70466965",
"0.69904435",
"0.6912562",
"0.68712586",
"0.67985207",
"0.67547053",
"0.6710289",
"0.6657004",
"0.663968... | 0.76851207 | 1 |
New() > itkIsoDataThresholdCalculatorHDUS Create a new object of the class itkIsoDataThresholdCalculatorHDUS and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHDUS.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHDUC.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHDSS.__New_orig__()\n import itkTemplate\n i... | [
"0.74216115",
"0.7408103",
"0.7143581",
"0.69988805",
"0.67928296",
"0.6791863",
"0.6658335",
"0.66280717",
"0.66160446",
"0.65329516",
"0.63667136",
"0.6191888",
"0.607113",
"0.60155535",
"0.59628946",
"0.5942062",
"0.59389824",
"0.59056056",
"0.5891777",
"0.5847571",
"0.584... | 0.79586416 | 0 |
itkIsoDataThresholdCalculatorHDUS_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHDUS | def itkIsoDataThresholdCalculatorHDUS_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHDUS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDUS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHDUS_cast(obj)",
"def itkHistogramThresholdCalculatorHDUS_cast(obj: 'itkLightObject') -> \"itkHistogramThresholdCalculatorHDUS *\":\n return _itkHistogr... | [
"0.80596274",
"0.7589904",
"0.75651276",
"0.75618565",
"0.7459956",
"0.74315196",
"0.74152017",
"0.73856413",
"0.7334273",
"0.72357523",
"0.7225443",
"0.71914035",
"0.7182519",
"0.7153152",
"0.70423627",
"0.7022878",
"0.6976136",
"0.69645596",
"0.692177",
"0.68759996",
"0.682... | 0.83432275 | 0 |
Clone(itkIsoDataThresholdCalculatorHFF self) > itkIsoDataThresholdCalculatorHFF_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHFF_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFF_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFUC_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUC_Clone(self)",
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFUS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalcula... | [
"0.8514862",
"0.84072405",
"0.8378157",
"0.834652",
"0.82018554",
"0.79722923",
"0.78591496",
"0.7846841",
"0.78433096",
"0.77056175",
"0.76310587",
"0.7507486",
"0.7488003",
"0.7467726",
"0.72813773",
"0.72154915",
"0.7185355",
"0.71076566",
"0.70218635",
"0.69010305",
"0.68... | 0.9163808 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFF | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFF *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFF_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHFF_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFF *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFF_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDF *\":\n return _itkIsoDataThreshol... | [
"0.8211974",
"0.77008903",
"0.765891",
"0.76135397",
"0.75687015",
"0.7556833",
"0.7553174",
"0.7546114",
"0.7488128",
"0.7364975",
"0.73072076",
"0.7283554",
"0.7219802",
"0.7199208",
"0.71640646",
"0.71370894",
"0.7136952",
"0.7131774",
"0.710888",
"0.70996416",
"0.702202",... | 0.80961704 | 1 |
New() > itkIsoDataThresholdCalculatorHFF Create a new object of the class itkIsoDataThresholdCalculatorHFF and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parameter ... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHFF.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHFUS.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkHistogramThresholdCalculatorHFF.__New_orig__()\n import itkTemplate\n ... | [
"0.74041206",
"0.73848635",
"0.7376711",
"0.7283476",
"0.7219475",
"0.7104858",
"0.7063399",
"0.69468033",
"0.69199795",
"0.681409",
"0.67226523",
"0.66380805",
"0.6634291",
"0.6572632",
"0.64866084",
"0.64071727",
"0.6342379",
"0.6326629",
"0.6313865",
"0.629884",
"0.6283515... | 0.79700196 | 0 |
itkIsoDataThresholdCalculatorHFF_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFF | def itkIsoDataThresholdCalculatorHFF_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFF *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFF_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFF *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFF_cast(obj)",
"def itkIsoDataThresholdCalculatorHDF_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHDF *\":\n return _itkIsoDataThreshol... | [
"0.83918184",
"0.79666895",
"0.796641",
"0.79038334",
"0.7870555",
"0.7865797",
"0.7846248",
"0.78131735",
"0.77736026",
"0.76440537",
"0.761672",
"0.75076884",
"0.74347126",
"0.74315804",
"0.74281496",
"0.7423894",
"0.7421686",
"0.74143493",
"0.7373036",
"0.73582965",
"0.735... | 0.86297166 | 0 |
Clone(itkIsoDataThresholdCalculatorHFSS self) > itkIsoDataThresholdCalculatorHFSS_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHFSS_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFSS_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFUS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUS_Clone(self)",
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFUC_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalcula... | [
"0.8582392",
"0.83421195",
"0.8271316",
"0.8261591",
"0.8234895",
"0.7798927",
"0.77089393",
"0.76622474",
"0.7611052",
"0.74598366",
"0.74121577",
"0.7350802",
"0.721502",
"0.7111369",
"0.7080868",
"0.697894",
"0.6914903",
"0.6899798",
"0.68182826",
"0.67714614",
"0.6669139"... | 0.9139807 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFSS | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFSS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFSS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHFSS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFSS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFSS_cast(obj)",
"def itkIsoDataThresholdCalculatorHFUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUS *\... | [
"0.7970249",
"0.77998286",
"0.7799734",
"0.77567804",
"0.77471554",
"0.7613981",
"0.75704217",
"0.748676",
"0.7403039",
"0.73875904",
"0.73774695",
"0.73703223",
"0.7363959",
"0.73186725",
"0.72481865",
"0.7217759",
"0.7204282",
"0.7123717",
"0.70282453",
"0.7016243",
"0.7014... | 0.78853154 | 1 |
New() > itkIsoDataThresholdCalculatorHFSS Create a new object of the class itkIsoDataThresholdCalculatorHFSS and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHFSS.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHFUS.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkHistogramThresholdCalculatorHFSS.__New_orig__()\n import itkTemplate\n ... | [
"0.7532784",
"0.74785197",
"0.73648036",
"0.71260685",
"0.7122786",
"0.69687235",
"0.6882601",
"0.6862639",
"0.66472363",
"0.65533155",
"0.6412308",
"0.64050007",
"0.63742334",
"0.6319807",
"0.6249161",
"0.61890334",
"0.6174446",
"0.6164772",
"0.61237067",
"0.6122709",
"0.606... | 0.8128814 | 0 |
itkIsoDataThresholdCalculatorHFSS_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFSS | def itkIsoDataThresholdCalculatorHFSS_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFSS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFSS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFSS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFSS_cast(obj)",
"def itkIsoDataThresholdCalculatorHFUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUS *\":\n return _itkIsoDataThre... | [
"0.8171325",
"0.80677474",
"0.79671204",
"0.79094136",
"0.7866336",
"0.78395337",
"0.7732998",
"0.7728348",
"0.7630857",
"0.7627113",
"0.7619539",
"0.75054914",
"0.7488853",
"0.7481908",
"0.745235",
"0.7445836",
"0.7435752",
"0.7212566",
"0.71818435",
"0.7152383",
"0.71482784... | 0.838866 | 0 |
Clone(itkIsoDataThresholdCalculatorHFUC self) > itkIsoDataThresholdCalculatorHFUC_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHFUC_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUC_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFUS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUS_Clone(self)",
"def Clone(self) -> \"itkHistogramThresholdCalculatorHFUC_Pointer\":\n return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdC... | [
"0.8785258",
"0.82886523",
"0.81986",
"0.81392145",
"0.81183565",
"0.7812244",
"0.75667167",
"0.75474155",
"0.75152874",
"0.7418986",
"0.7348308",
"0.7341895",
"0.73187774",
"0.73097074",
"0.73019797",
"0.71894276",
"0.7185104",
"0.71249205",
"0.7037329",
"0.6913475",
"0.6912... | 0.9096088 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFUC | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFUC *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUC_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHFUC_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUC *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUC_cast(obj)",
"def itkIsoDataThresholdCalculatorHFUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUS *\... | [
"0.8138904",
"0.7882526",
"0.77937895",
"0.77669793",
"0.7751712",
"0.75188214",
"0.7497404",
"0.74585336",
"0.7389336",
"0.73699206",
"0.7360691",
"0.72917974",
"0.72346264",
"0.723385",
"0.7228879",
"0.72195333",
"0.7075907",
"0.7068311",
"0.7067323",
"0.70618",
"0.703537",... | 0.7980478 | 1 |
New() > itkIsoDataThresholdCalculatorHFUC Create a new object of the class itkIsoDataThresholdCalculatorHFUC and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHFUC.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHFUS.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkHistogramThresholdCalculatorHFUC.__New_orig__()\n import itkTemplate\n ... | [
"0.7838205",
"0.7749398",
"0.7485932",
"0.7313486",
"0.7301864",
"0.70172775",
"0.7009621",
"0.6937782",
"0.6898264",
"0.68783796",
"0.68493307",
"0.6768119",
"0.6739616",
"0.6662929",
"0.6650856",
"0.66436875",
"0.6589392",
"0.64897573",
"0.64583486",
"0.6445154",
"0.6419602... | 0.8221564 | 0 |
itkIsoDataThresholdCalculatorHFUC_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFUC | def itkIsoDataThresholdCalculatorHFUC_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFUC *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUC_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUC *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUC_cast(obj)",
"def itkIsoDataThresholdCalculatorHFUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUS *\":\n return _itkIsoDataThre... | [
"0.8239855",
"0.8181204",
"0.79770166",
"0.79635096",
"0.7878556",
"0.7858778",
"0.7732721",
"0.7668894",
"0.7623479",
"0.7540945",
"0.75302625",
"0.74493045",
"0.74133354",
"0.7413012",
"0.7368154",
"0.73477894",
"0.73332554",
"0.73188543",
"0.7216818",
"0.7201661",
"0.72015... | 0.8530007 | 0 |
Clone(itkIsoDataThresholdCalculatorHFUS self) > itkIsoDataThresholdCalculatorHFUS_Pointer | def Clone(self) -> "itkIsoDataThresholdCalculatorHFUS_Pointer":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUS_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFUC_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUC_Clone(self)",
"def Clone(self) -> \"itkIsoDataThresholdCalculatorHFSS_Pointer\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalcula... | [
"0.86070377",
"0.8318661",
"0.8074624",
"0.8019487",
"0.7899431",
"0.75803715",
"0.7531281",
"0.743346",
"0.7422374",
"0.73727334",
"0.72108126",
"0.7174776",
"0.717209",
"0.71136177",
"0.7040116",
"0.7010346",
"0.6883851",
"0.6874452",
"0.68107694",
"0.6782904",
"0.67592156"... | 0.90327066 | 0 |
cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFUS | def cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFUS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkIsoDataThresholdCalculatorHFUS_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUS_cast(obj)",
"def itkIsoDataThresholdCalculatorHFUC_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUC *\... | [
"0.7994736",
"0.7775971",
"0.770182",
"0.76917464",
"0.7689135",
"0.7456216",
"0.74058783",
"0.74055165",
"0.73853785",
"0.73630965",
"0.7326701",
"0.72929347",
"0.71763664",
"0.71189725",
"0.70690197",
"0.7059502",
"0.705821",
"0.7013639",
"0.7005926",
"0.6876991",
"0.685338... | 0.7879169 | 1 |
New() > itkIsoDataThresholdCalculatorHFUS Create a new object of the class itkIsoDataThresholdCalculatorHFUS and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkIsoDataThresholdCalculatorHFUS.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHFUC.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkIsoDataThresholdCalculatorHFSS.__New_orig__()\n import itkTemplate\n i... | [
"0.7777498",
"0.76748407",
"0.7468125",
"0.7353125",
"0.72931314",
"0.7104056",
"0.7056001",
"0.68670064",
"0.67672056",
"0.67413145",
"0.6621304",
"0.659149",
"0.6527203",
"0.6346012",
"0.62964654",
"0.627781",
"0.62501633",
"0.624185",
"0.6240636",
"0.62179506",
"0.6208599"... | 0.8156117 | 0 |
itkIsoDataThresholdCalculatorHFUS_cast(itkLightObject obj) > itkIsoDataThresholdCalculatorHFUS | def itkIsoDataThresholdCalculatorHFUS_cast(obj: 'itkLightObject') -> "itkIsoDataThresholdCalculatorHFUS *":
return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUS_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUS *\":\n return _itkIsoDataThresholdCalculatorPython.itkIsoDataThresholdCalculatorHFUS_cast(obj)",
"def itkIsoDataThresholdCalculatorHFUC_cast(obj: 'itkLightObject') -> \"itkIsoDataThresholdCalculatorHFUC *\":\n return _itkIsoDataThre... | [
"0.81927794",
"0.8182986",
"0.7985469",
"0.79408544",
"0.78466976",
"0.7768799",
"0.77524173",
"0.77256656",
"0.766351",
"0.76548874",
"0.76131433",
"0.74142367",
"0.73983365",
"0.7355308",
"0.7336705",
"0.7327769",
"0.7244936",
"0.7220419",
"0.71797997",
"0.71766055",
"0.714... | 0.8448555 | 0 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def plot_confusion_matrix(cm,
normalize=False,
title='Confusion matrix',
cmap=plt.cm.Blues):
if normalize:
cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]
print("Normalized confusion matrix")
else:
... | {
"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.8194862",
"0.80949175",
"0.8029915",
"0.8019153",
"0.79941195",
"0.7991258",
"0.7980955",
"0.7976606",
"0.79610753",
"0.79590565",
"0.79378676",
"0.7934962",
"0.7934504",
"0.79313844",
"0.7926313",
"0.7924577",
"0.79241234",
"0.7923211",
"0.7923023",
"0.7921931",
"0.791787... | 0.7822236 | 84 |
Imports a deck from Yaml file. | def importDeck(fileName):
parser = parseConfig()
parser.importDeck(fileName)
decks = parser.getListOfDecks()
cards = parser.getListOfCards(decks[0])
deck = createDeck(1, decks[0])
importedDeck = parser.getDeck()
for cards in importedDeck.values():
for qNa in cards.values():
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def loadseasoning(self):\n stream = open(self.fileref)\n self.config = yaml.safe_load(stream)\n stream.close()",
"def load(cls, filename):\n with open(filename) as f:\n d = yaml.load(f.read(), Loader=yaml.SafeLoader)\n return Portfolio.from_dict(d)",
"def yank_load... | [
"0.6127874",
"0.597666",
"0.59551316",
"0.58173776",
"0.5809901",
"0.57786644",
"0.5770914",
"0.57291657",
"0.57049906",
"0.5704437",
"0.56875855",
"0.56453824",
"0.56412566",
"0.5637506",
"0.561495",
"0.5614327",
"0.5613106",
"0.56014234",
"0.55864894",
"0.55704635",
"0.5560... | 0.711551 | 0 |
Returns JSON object to be written to file. | def get_camera_stationary_frame_difference_skeleton(threshold, sampling_rate):
return {
'result': [],
'hyperparameters': {
'threshold': threshold,
'sampling_rate': sampling_rate
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _write_json(self):\n with open(self._file_path, 'w') as f:\n json.dump(self._content, f, indent=4, separators=None,\n encoding='utf-8', sort_keys=False)",
"def save_to_json_file(my_obj, filename):\n with open(filename, 'w') as json_file:\n written = json_file.... | [
"0.7819667",
"0.7782587",
"0.7722199",
"0.7716674",
"0.7714153",
"0.7641739",
"0.76284885",
"0.75559676",
"0.75522566",
"0.75489694",
"0.75489694",
"0.75442904",
"0.7532108",
"0.7469932",
"0.7446855",
"0.7444374",
"0.7411376",
"0.74064106",
"0.7382394",
"0.73814756",
"0.73683... | 0.0 | -1 |
Initializes the Instrument object with instrument specific values. Runs once upon instantiation. | def init(self):
logger.info(mm_chain.ackn_str)
self.acknowledgements = mm_chain.ackn_str
self.references = mm_chain.refs['chain']
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, instrument):\n endpoint = self.ENDPOINT.format(instrument=instrument)\n super(Instruments, self).__init__(endpoint, method=self.METHOD)",
"def __init__(self, instrument):\n self._unsub_dispatcher = None\n self._instrument = instrument\n self._state = instrume... | [
"0.6913557",
"0.6879273",
"0.68774587",
"0.6641445",
"0.66391665",
"0.654191",
"0.6497492",
"0.64372224",
"0.6429172",
"0.640927",
"0.6386189",
"0.6384578",
"0.6341557",
"0.6273904",
"0.62615025",
"0.62500954",
"0.6240905",
"0.6240905",
"0.6240905",
"0.6240905",
"0.62046504",... | 0.0 | -1 |
Expands an ndimensional key/value grid. Example >>> expand_ndimensional_grid((3, 3), {(1, 1)}, set()) [((1, 1), (0, 1)), ((1, 1), (2, 1)), ((1, 1), (1, 0)), ((1, 1), (1, 2))] | def expand_ndimensional_grid(
dimensions: Tuple[int, ...], seeds: Set[Tuple[int, ...]], complete: Set[Tuple[int, ...]]
) -> List[Tuple[Tuple[int, ...], Tuple[int, ...]]]:
dimensions = tuple(dimensions)
compute = set()
connections = []
for d in range(len(dimensions)):
# Loop over all compu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_grid(nrows, ncols, ndots):\n\n # Validation\n if nrows * ncols < ndots:\n raise Exception(\"ndots must be <= than grid size\")\n\n rows = np.arange(1, nrows + 1)\n cols = np.arange(1, ncols + 1)\n\n # Create empty matrix\n grid = np.empty((len(rows), len(cols), 2), dtype=np.intp)\n grid[...,... | [
"0.6068316",
"0.6047614",
"0.5910984",
"0.58702683",
"0.58116037",
"0.5778455",
"0.57426924",
"0.57419384",
"0.5661741",
"0.56495047",
"0.56463814",
"0.5640361",
"0.56367904",
"0.5554228",
"0.55496985",
"0.5503497",
"0.54107183",
"0.5408479",
"0.53818697",
"0.53522015",
"0.53... | 0.64238775 | 0 |
Checks if the max simulation time has been reached. | def time_is_out(self):
return self.get_simulation_time() > self.config.max_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __checkTimer(self):\n if self.__endTime is None:\n raise AssertionError('The end time had not been set.')\n if time.time() > self.__endTime:\n self._logError('Maximum Run Time Reached !!')\n raise _MaxRunTimeReachedError('')",
"def is_timeout(self) -> bool:\n ... | [
"0.753576",
"0.6964186",
"0.6962653",
"0.67866325",
"0.6735561",
"0.6706021",
"0.6683751",
"0.6641603",
"0.65707105",
"0.6558882",
"0.6545695",
"0.6535919",
"0.6535235",
"0.65320987",
"0.6520581",
"0.6499196",
"0.6456955",
"0.64429843",
"0.64335674",
"0.6426248",
"0.6411197",... | 0.80292934 | 0 |
Web controller that returns the index page of the simulator. | async def index_controller(self, request):
return {"port": self.config.http_port, "ip": self.config.http_ip} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index():\n return render_template('index.html'), 200",
"def index():\n\n return render_template(\"index.html\"), 200",
"def index(self):\n return self.load_view('index.html')",
"def index():\n\n\treturn(render_template('index.html'))",
"def index():\n return 'OK'",
"def index():\r\n ... | [
"0.7708409",
"0.7682766",
"0.7657167",
"0.75923026",
"0.75689334",
"0.75628585",
"0.7562848",
"0.7562848",
"0.7552864",
"0.7506949",
"0.7491605",
"0.7481899",
"0.7481899",
"0.745273",
"0.7424214",
"0.7424214",
"0.7424214",
"0.7424214",
"0.7424214",
"0.7424214",
"0.7424214",
... | 0.0 | -1 |
Web controller that returns an Excel file with the simulation results. | async def download_stats_excel_controller(self, request):
headers = {
"Content-Disposition": "Attachment; filename=simulation.xlsx"
}
output = io.BytesIO()
# Use a temp filename to keep pandas happy.
writer = pd.ExcelWriter(output, engine='xlsxwriter')
# Wr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def export(self):\n\n rpt_date = datetime.now()\n filename = 'bushfire_report_{}.xls'.format(rpt_date.strftime('%d%b%Y'))\n response = HttpResponse(content_type='application/vnd.ms-excel')\n response['Content-Disposition'] = 'attachment; filename=' + filename\n\n book = Workbook(... | [
"0.6699586",
"0.66927207",
"0.6554865",
"0.6533005",
"0.6502117",
"0.64905214",
"0.64725286",
"0.64438146",
"0.64399254",
"0.6406539",
"0.6362228",
"0.63343924",
"0.61151564",
"0.6045767",
"0.5998955",
"0.59455425",
"0.5933286",
"0.5845864",
"0.58017695",
"0.5716946",
"0.5671... | 0.74873686 | 0 |
Returns the elapsed simulation time to the current time. If the simulation is not started it returns 0. | def get_simulation_time(self):
if not self.simulation_init_time:
return 0
if self.simulation_running:
return time.time() - self.simulation_init_time
return self.simulation_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_elapsed_time(self):\n if hasattr(self, 'starttime'):\n return monotonic() - self.starttime\n else:\n return 0",
"def time():\n master = MasterTimer.getMasterTimer()\n\n if master.end_time:\n return master.end_time - master.start_time\n e... | [
"0.7963259",
"0.7720057",
"0.7698553",
"0.75977135",
"0.7553143",
"0.75444084",
"0.7503051",
"0.7492272",
"0.7466691",
"0.74464834",
"0.74105734",
"0.7382358",
"0.736348",
"0.72966",
"0.72829574",
"0.72687083",
"0.72538483",
"0.72183037",
"0.7216741",
"0.72125465",
"0.7127101... | 0.81731373 | 0 |
Return true if the user is logged in. This is determined by looking at browser cookies. | def login(self, returnToURL):
if not self.request().hasValue('userId') or \
not self.request().hasValue('password'):
self.response().sendRedirect('/nova/login.psp?returnToURL=%s' % returnToURL)
return 0
return 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_logged_in(self):\n return self.cookie is not None",
"def is_logged_in():\n return 'user' in session",
"def isLoggedIn(self):\n session = self.getSession()\n if session is not None:\n return True\n return False",
"def logged_in():\n\n if current_user.is_auth... | [
"0.84465575",
"0.8392614",
"0.82681805",
"0.82386005",
"0.8235004",
"0.81958026",
"0.81482345",
"0.81445897",
"0.7974621",
"0.79431325",
"0.7839363",
"0.7755381",
"0.7753337",
"0.77131116",
"0.76050925",
"0.75463814",
"0.7518571",
"0.7501208",
"0.75004077",
"0.74079716",
"0.7... | 0.0 | -1 |
Seed contacts to test | def setUp(self):
Contact.objects.create(name='contact1', email='test@test.com', phone='1263636', address="address 1")
Contact.objects.create(name='contact2', email='test@test.com') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setUp(self):\n self.contacts = Contacts()",
"def setUp(self):\n self.new_contact = Contact(\"zoo\", \"vier\", 254719702373, \"kemwaura@gmail.com\")",
"def setUp(self):\n # Below creating the new contact object to test.\n self.new_contact = Contact(\n \"James\", \"Muri... | [
"0.7550092",
"0.70871645",
"0.7083725",
"0.694393",
"0.677775",
"0.67114186",
"0.6679226",
"0.65859276",
"0.6583426",
"0.65165824",
"0.6500442",
"0.6467552",
"0.6465632",
"0.6460572",
"0.64483505",
"0.643584",
"0.64271235",
"0.64107364",
"0.63982767",
"0.63976187",
"0.6349740... | 0.7882287 | 0 |
Test to create empty name & invalid email | def test_create_valiation(self):
with self.assertRaises(ValidationError) as test:
contact = Contact.objects.create(email='3232131')
contact.full_clean()
the_exception = dict(test.exception)
self.assertEqual(the_exception['name'], ['This field cannot be blank.'])
s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_blank_names(self):\n rv = self.signup('', '', 'Bo_theo5@example.com', 'Bo1995', 'Bo1995')\n self.assertIn(b'This field is required.', rv.data)",
"def test_empty_email():\n expect_error(register, InputError, \"a\", \"abdkjjd\", \"a\", \"A\", \"\")",
"def test_blank_email(self):\n ... | [
"0.7910199",
"0.7828595",
"0.78014666",
"0.75602883",
"0.7537394",
"0.7466374",
"0.73787355",
"0.73578817",
"0.7292964",
"0.724661",
"0.7174471",
"0.7167245",
"0.7144664",
"0.7125848",
"0.71125644",
"0.7109098",
"0.7100519",
"0.7089706",
"0.70796365",
"0.70753",
"0.7071923",
... | 0.67648095 | 68 |
Convert text string to number, raising on error if no default | def numify(text, default=object):
try:
return ast.literal_eval(text)
except (SyntaxError, ValueError):
if default is object:
raise
return default | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_to_number(text):\n try:\n value = float(text)\n return value\n except ValueError:\n return 0.0",
"def num(s: str):\n try: return int(s)\n except ValueError: return float(s)",
"def get_number(text):\n# if (isinstance(text, str) or isinstance(te... | [
"0.78456247",
"0.74413687",
"0.71640104",
"0.71572506",
"0.71380174",
"0.7073106",
"0.70665187",
"0.7040263",
"0.69931144",
"0.6984985",
"0.6944338",
"0.6944014",
"0.68531597",
"0.68482584",
"0.6837646",
"0.6837646",
"0.6837646",
"0.6837646",
"0.6837646",
"0.6823564",
"0.6798... | 0.7827644 | 1 |
This function creates a learning rate decay operation in tensorflow using inverse time decay | def learning_rate_decay(alpha, decay_rate, global_step, decay_step):
return tf.train.inverse_time_decay(alpha, global_step, decay_step,
decay_rate, staircase=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def learning_rate_decay(alpha, decay_rate, global_step, decay_step):\n gd = tf.train.inverse_time_decay(alpha, global_step, decay_step,\n decay_rate, staircase=True)\n return gd",
"def learning_rate_decay(a, d_rate, g_step, d_step):\n return tf.train.inverse_time_deca... | [
"0.8179194",
"0.8147227",
"0.8060592",
"0.8005789",
"0.7965664",
"0.78876513",
"0.7248877",
"0.7097466",
"0.7073548",
"0.7071314",
"0.6925843",
"0.6802211",
"0.67716044",
"0.67583686",
"0.6737371",
"0.6711233",
"0.66644573",
"0.66474766",
"0.66304696",
"0.6603312",
"0.6582075... | 0.79768825 | 4 |
A onepixel large 'logo' for the test app. | def app_logo_img():
return base64.b64decode(
b"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlPM0jRW/QAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII="
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def app_logo_url():\n return \"https://raw.githubusercontent.com/aiidalab/aiidalab-hello-world/master/img/logo.png\"",
"def logo(self):\n self.def_logo(0x21)\n self.send(\"\\x21\\x22\\x08\\x08\\x0a\\x23\\x24\")\n self.reset_codepage()",
"def test_weblogo(self):\n self.m.weblogo(o... | [
"0.73783123",
"0.72532636",
"0.7146891",
"0.7146891",
"0.7146891",
"0.7084593",
"0.7075752",
"0.7073558",
"0.7011113",
"0.70059675",
"0.682176",
"0.67838",
"0.6739748",
"0.6730312",
"0.6675108",
"0.6654683",
"0.66493",
"0.66044605",
"0.6570646",
"0.6570646",
"0.6454951",
"0... | 0.7208256 | 2 |
Create apps.yaml content with one test app entry. | def apps_yaml(requests_mock, app_git_url, app_metadata, app_logo):
apps_yaml = {
"test": {
"releases": [f"git+{app_git_url}"],
"metadata": app_metadata,
"categories": ["utilities"],
"logo": app_logo.url,
}
}
requests_mock.get(app_git_url)
y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _addAppYaml(self):\n if self.wc.exists(self._branchPath('app/app.yaml')):\n raise ObstructionError('app/app.yaml exists already')\n\n yaml_path = self._branchPath('app/app.yaml')\n self.wc.copy(yaml_path + '.template', yaml_path)\n\n yaml = io.fileToLines(self.wc.path(yaml_path))\n out = []... | [
"0.7124151",
"0.6664604",
"0.6657249",
"0.66440314",
"0.6574042",
"0.6561914",
"0.65005904",
"0.63823324",
"0.63458985",
"0.6341839",
"0.6319771",
"0.62916225",
"0.6252524",
"0.62071645",
"0.61362386",
"0.612163",
"0.6116702",
"0.60953504",
"0.607798",
"0.6076748",
"0.6058047... | 0.6943037 | 1 |
Return the queryset backing annotations. Executing this queryset is costly because there is no way to optimize the query execution. Since this is a related_set queryset, that was further filtered, each item in the queryset causes a db hit. | def GetAnnotationsQS(self):
return self._costly_annotations_qs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_queryset(self):\r\n queryset: QuerySet = super().get_queryset().prefetch_related('film_work_genre', 'genres', 'film_work_person',\r\n 'persons', ) \\\r\n .annotate(\r\n actors=ArrayAgg('persons__person__full_na... | [
"0.6831465",
"0.6727052",
"0.65054554",
"0.6459458",
"0.64486736",
"0.6312835",
"0.62815255",
"0.6255363",
"0.62418616",
"0.6220894",
"0.61762536",
"0.61750937",
"0.6167035",
"0.6163675",
"0.6159714",
"0.61537594",
"0.61537594",
"0.61159205",
"0.6111904",
"0.6069471",
"0.6062... | 0.6528129 | 2 |
get the photodetachment heating rate. | def get_pdt_heat(nu, asize, Z, grain_type, Ntot, G0=1.7):
import numpy as np
hnu = nu*hplanck
u_nu = fz.get_ISRF(hnu, Ntot, G0)
sigma_pdt = fz.get_sigma_pdt(hnu, asize, Z, grain_type)
nupdt = fz.get_nu_pdt(asize, Z, grain_type)
Emin = fz.get_Emin(asize, Z)
pdt_factor = sigma_pdt * cl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_rate_hz(self) -> float:\n return self._update_rate_hz",
"def get_pixel_rate(self):\n return lib.is_PixelClock_dt(self.hcam,5,ctypes.c_uint).value*1E6",
"def _do_get_rate(self):\n rate = {\n 1: \"1 : Helium Probe in FAST rate\",\n 0: \"0 : Helium Probe in SL... | [
"0.6746003",
"0.6735112",
"0.67152905",
"0.6534882",
"0.6511193",
"0.6477181",
"0.6463305",
"0.64498776",
"0.6412542",
"0.6394361",
"0.6373058",
"0.63536066",
"0.6350546",
"0.6320734",
"0.6296197",
"0.62831813",
"0.62493986",
"0.61060476",
"0.61058116",
"0.61047196",
"0.61033... | 0.0 | -1 |
Gets the status of this recipe (status messages, engines status, ...) | def get_status(self):
data = self.client._perform_json(
"GET", "/projects/%s/recipes/%s/status" % (self.project_key, self.recipe_name))
return DSSRecipeStatus(self.client, data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def status(self):\n return self._get(path='status')",
"def get_status(self):\n return self.status",
"def get_status(self):\n return self.status",
"def get_status(self):\n return self.status",
"def get_status(self):\n return self._status",
"def status(self):\n\t\treturn ... | [
"0.76231366",
"0.75275254",
"0.75275254",
"0.75275254",
"0.7473916",
"0.74620855",
"0.7444185",
"0.74346995",
"0.737945",
"0.7378319",
"0.73619825",
"0.73619825",
"0.7354234",
"0.73525697",
"0.7344919",
"0.73338723",
"0.7312794",
"0.7312794",
"0.7312794",
"0.7312794",
"0.7312... | 0.78587586 | 0 |
Returns a list of all output refs of this recipe, regardless of the output role | def get_flat_output_refs(self):
ret = []
for role_key, role_obj in self.get_recipe_outputs().items():
for item in role_obj["items"]:
ret.append(item["ref"])
return ret | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def outputs() -> List[str]:\n return Invocation.current.expanded_outputs",
"def _list_outputs(self):\n \n outputs = self._outputs().get()\n return outputs",
"def outputs(self):\n\n outputs = []\n for arg in self.arguments:\n if arg.OUT:\n outputs.... | [
"0.73343956",
"0.69508576",
"0.67978525",
"0.65715367",
"0.6532029",
"0.64850676",
"0.6379126",
"0.63368064",
"0.6300658",
"0.6299225",
"0.62592703",
"0.6239811",
"0.6237",
"0.6237",
"0.6217018",
"0.6211965",
"0.6199809",
"0.618601",
"0.61840045",
"0.6117083",
"0.6114316",
... | 0.8212404 | 0 |
Removes all grouping keys from this grouping recipe | def clear_grouping_keys(self):
self.obj_payload["keys"] = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def removeAllKeys(self) -> None:\n ...",
"def clearKeys(self):\n for attr in self._filter():\n pm.cutKey(attr)",
"def clear_Groups(self):\n\n\t\tself.__groups[:] = []",
"def purge(self):\n keys = [k for (k, v) in self.get_range()]\n\n [self.remove(k) for k in keys]",
... | [
"0.68552893",
"0.68089443",
"0.6467646",
"0.61144936",
"0.6018067",
"0.5901979",
"0.58910054",
"0.58779514",
"0.58628327",
"0.5860215",
"0.58519715",
"0.5841031",
"0.5816615",
"0.5809598",
"0.57757604",
"0.57360566",
"0.57292396",
"0.57210135",
"0.5702982",
"0.57021207",
"0.5... | 0.81063426 | 0 |
Gets a dict representing the aggregations to perform on a column. Creates it and adds it to the potential aggregations if it does not already exists | def get_or_create_column_settings(self, column):
found = None
for gv in self.obj_payload["values"]:
if gv["column"] == column:
found = gv
break
if found is None:
found = {"column" : column}
self.obj_payload["values"].append(foun... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_column_aggregations(self, column, type, min=False, max=False, count=False, count_distinct=False,\n sum=False,concat=False,stddev=False,avg=False):\n cs = self.get_or_create_column_settings(column)\n cs[\"type\"] = type\n cs[\"min\"] = min\n cs[\"ma... | [
"0.69536006",
"0.665502",
"0.664671",
"0.6439848",
"0.6235935",
"0.6015677",
"0.596724",
"0.59519184",
"0.59269905",
"0.59027725",
"0.58590513",
"0.58140486",
"0.58090967",
"0.5808009",
"0.5711147",
"0.56049865",
"0.5590441",
"0.55874723",
"0.55815834",
"0.55730116",
"0.55629... | 0.47571087 | 100 |
Returns the raw list of joins | def raw_joins(self):
return self.obj_payload["joins"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def joins(self):\n return self._joins",
"def get_joins(self):\n\t\tprint('connecting to Sql Server:\\n\\tserver: {server}\\n\\tdatabase: {database}'.format(**self.__dict__))\n\t\t# Child: <schema>.<table>\n\t\t# Parent: <schema>.<table>\n\t\t# Column: <column>\n\t\tJoin = namedtuple('Join', 'Child,Column,... | [
"0.7737606",
"0.6810194",
"0.6216007",
"0.62149346",
"0.6184629",
"0.61811614",
"0.59715235",
"0.58825624",
"0.5873485",
"0.58332485",
"0.58188087",
"0.57602125",
"0.57287395",
"0.5707607",
"0.57006335",
"0.5541582",
"0.5464234",
"0.5459455",
"0.5437373",
"0.5411987",
"0.5408... | 0.82750225 | 0 |
Returns the code env settings for this recipe | def get_code_env_settings(self):
rp = self.get_recipe_params()
if not "envSelection" in rp:
raise ValueError("This recipe kind does not seem to take a code env selection")
return rp["envSelection"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def env(self): # type: () -> t.List[str]\n return self.config['Env']",
"def env(self):\n return spack.schema.environment.parse(self.conf.get(\"environment\", {}))",
"def get_recipe_config():\n return json.loads(os.getenv(\"DKU_CUSTOM_RECIPE_CONFIG\"))",
"def environment_variables(\n ... | [
"0.68926835",
"0.65869516",
"0.6426956",
"0.64138716",
"0.64138716",
"0.64138716",
"0.64138716",
"0.6398108",
"0.63333887",
"0.62153196",
"0.6180623",
"0.61802644",
"0.61407155",
"0.608022",
"0.608022",
"0.608022",
"0.60514814",
"0.60374707",
"0.6034862",
"0.6004894",
"0.6004... | 0.8369004 | 0 |
Adds a new token to the database. It is not revoked when it is added. | def add_token_to_database(encoded_token, identity_claim):
decoded_token = decode_token(encoded_token)
jti = decoded_token['jti']
token_type = decoded_token['type']
user_identity = decoded_token[identity_claim]
if not current_app.config.get('JWT_ACCESS_TOKEN_EXPIRES'):
expires = datetim... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add(self, token):\n self.rpc.call(MsfRpcMethod.AuthTokenAdd, [token])",
"def save_token(self):\n db.session.add(self)\n db.session.commit()",
"def save(self, token_name, token, expired=None, user_id=None):\n args = (token_name, token, expired, user_id)\n self.db_manager.e... | [
"0.7551502",
"0.7396472",
"0.73902434",
"0.7290621",
"0.67683935",
"0.6690589",
"0.6690589",
"0.6630171",
"0.6562644",
"0.65060145",
"0.6397973",
"0.6273855",
"0.623949",
"0.6134817",
"0.6127467",
"0.6116151",
"0.60236835",
"0.60233516",
"0.60198814",
"0.6007915",
"0.6001051"... | 0.7112243 | 4 |
Gets the state of the Button. | def get_state(self):
if not self._variable.get():
return "Locked"
elif self._variable.get():
return "Unlocked" | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_button_state(self, button):\n\n\t\treturn self._interface.get_button_state(button)",
"def get_button(self, button):\n return getattr(self.get_buttons_state(), button)",
"def get_buttons_state(self):\n return joy_to_xbox(self.xbox_listener.get())",
"def GetButton(self):\r\n\r\n re... | [
"0.8813994",
"0.7758816",
"0.75433433",
"0.74128884",
"0.73708254",
"0.7334327",
"0.73240215",
"0.728677",
"0.728677",
"0.72481525",
"0.720063",
"0.71443605",
"0.71443605",
"0.7125174",
"0.7125174",
"0.7125174",
"0.7125174",
"0.7125174",
"0.70652837",
"0.7025167",
"0.6917391"... | 0.0 | -1 |
Test exceptions caused by invalid start and end values. | def test_Calc_exceptions(self, start, end):
with pytest.raises(Exception):
pycgmCalc.Calc(start, end, self.motion_data, self.cal_SM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_validate_begin_equals_end():\n with pytest.raises(InvalidSegmentError):\n _validate([[1, 2], [5, 5]])",
"def test_validate_begin_greater_than_end():\n with pytest.raises(InvalidSegmentError):\n _validate([[1, 2], [5, 3]])",
"def test_invalid_time_range(event_member):\n _, member... | [
"0.80873936",
"0.7695312",
"0.71613306",
"0.70870066",
"0.69826627",
"0.68177915",
"0.68063",
"0.6805241",
"0.66724676",
"0.6648638",
"0.663881",
"0.6622772",
"0.6616261",
"0.65966576",
"0.6584879",
"0.65698636",
"0.65683633",
"0.6561831",
"0.65529394",
"0.6549869",
"0.651919... | 0.7131121 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.