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
Return the minimum value for selected column
def get_min(self): return self.serie.min()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_min(self):\n min_value= self.df[self.col_name].min()\n return min_value", "def min(self, column):\n return self.aggregate('min', *[column])", "def get_column_with_min_value(data):\n if not isinstance(data, pd.DataFrame):\n raise TypeError('Invalid input type: type(data) =...
[ "0.8765112", "0.7936118", "0.7560935", "0.72481465", "0.7153355", "0.711524", "0.7070418", "0.7070418", "0.70680994", "0.7067393", "0.7046302", "0.6931934", "0.6931628", "0.69184643", "0.69149846", "0.6875927", "0.6863844", "0.6807005", "0.6807005", "0.68001133", "0.6797233",...
0.6644938
37
Return the maximum value for selected column
def get_max(self): return self.serie.max()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_max(self):\n max_value= self.df[self.col_name].max()\n return max_value", "def max(self, column):\n if not column:\n columns = ['*']\n\n return self.aggregate('max', *[column])", "def argmax(table):\n return max((v,k) for k,v in table.iteritems())[1]", "def get_max(s...
[ "0.86999696", "0.75755316", "0.72424453", "0.71820384", "0.70821434", "0.70789444", "0.69712305", "0.6968163", "0.6962547", "0.69194615", "0.691839", "0.69182307", "0.6917467", "0.6809399", "0.6797092", "0.6791634", "0.67898965", "0.6787332", "0.67746305", "0.67244416", "0.67...
0.66580737
25
Create a copy of this response.
def copy(self): return self.replace()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy(self):\n new = object.__new__(type(self))\n new.bot = self.bot\n new.description = self.description\n new.icon_hash = self.icon_hash\n new.icon_type = self.icon_type\n new.id = 0\n new.name = self.name\n return new", "def copy(self):\n retur...
[ "0.72103095", "0.70746976", "0.70337427", "0.6971996", "0.69687164", "0.69687164", "0.693731", "0.6932586", "0.69272363", "0.69097924", "0.68765146", "0.68765146", "0.68765146", "0.68749887", "0.68749887", "0.6867643", "0.6860679", "0.6857296", "0.68530816", "0.68439436", "0....
0.0
-1
Create a new response with the same attributes except for the given new values
def replace(self, *args, **kws): for x in self.ATTRS: kws.setdefault(x, getattr(self, x)) cls = self.__class__ return cls(*args, **kws)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch_response(self, response, headers={}):\n for key, value in headers.items():\n response[key] = value\n return response", "def assertEqualExceptMeta(self, original, response, msg=None, ignore=()):\n self.assertTrue(response.pop('id')) # Sanity check that ID > 0\n re...
[ "0.59592104", "0.5786376", "0.55267453", "0.5525316", "0.5525316", "0.5521141", "0.5408082", "0.5345663", "0.53388417", "0.53214055", "0.53059334", "0.5265842", "0.5258608", "0.52476346", "0.52308506", "0.5227737", "0.52063316", "0.5199307", "0.5185895", "0.5166726", "0.51568...
0.0
-1
It returns the index of x in a given array.
def binary_search(numbers, item): if len(numbers) == 0: return "Please provide an array" start = 0 end = len(numbers) - 1 while start <= end: middle = (start + end) // 2 guess = numbers[middle] # Checks if the item is pressent at mid. if item == guess: return mi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def linear_search(arr, x):\n for i in range(len(arr)):\n if arr[i] == x:\n return i\n \n return -1", "def index(a, x):\n i = bisect_left(a, x)\n if i != len(a) and a[i] == x:\n return i\n raise ValueError", "def np_index_of(array, item):\n where = np.where(array ==...
[ "0.758862", "0.71049756", "0.68362445", "0.6802046", "0.6766399", "0.66528994", "0.6551934", "0.6551934", "0.64433956", "0.64410394", "0.64133775", "0.64052033", "0.63444585", "0.62860024", "0.62546307", "0.62437606", "0.6243634", "0.6211818", "0.620162", "0.6171368", "0.6158...
0.0
-1
Specifies whether or not the LDAP traffic needs to be secured via TLS.
def ldap_over_tls(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "ldap_over_tls")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tls_enabled(self):\n has_cert = getattr(self.args, 'ssl_certfile', None) is not None\n has_key = getattr(self.args, 'ssl_keyfile', None) is not None\n tls = getattr(self.args, 'tls', False)\n return tls or self.is_sandbox or (has_cert and has_key)", "def tls(self) -> pulumi.Input[...
[ "0.71720636", "0.7160213", "0.71125567", "0.71125567", "0.6993489", "0.6993489", "0.69114465", "0.6852348", "0.6851937", "0.67897075", "0.666929", "0.6563684", "0.6491896", "0.6465868", "0.6444953", "0.6402861", "0.64006335", "0.6247577", "0.6247577", "0.62190706", "0.6184712...
0.79814816
0
Indicates which days of the month snapshot should be taken. A comma delimited string.
def days_of_month(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "days_of_month")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def days_of_month(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DayArgs']]]]:\n return pulumi.get(self, \"days_of_month\")", "def month_days(month, days):\n\n print(month + \" has \" + str(days) + \" days.\")", "def days_in_month(month):\r\n if month==\"February\":\r\n return 28\r\n...
[ "0.64941704", "0.60752183", "0.58128613", "0.5809635", "0.56987536", "0.56987536", "0.56693774", "0.5585061", "0.55710804", "0.54783267", "0.54783267", "0.5475959", "0.5468247", "0.5441474", "0.5441474", "0.54236114", "0.5409691", "0.5394823", "0.5365517", "0.534361", "0.5292...
0.6488396
1
The remote region for the other end of the Volume Replication.
def remote_volume_region(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "remote_volume_region")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def region(self):\n return self.config.region", "def region(self):\n if self._region is None:\n cache_key = self.expand_name(\"region\")\n cached = unitdata.kv().get(cache_key)\n if cached:\n self._region = cached\n else:\n r...
[ "0.70517313", "0.69883794", "0.67892504", "0.67385226", "0.67385226", "0.6677991", "0.66246086", "0.66246086", "0.66246086", "0.66246086", "0.66246086", "0.66246086", "0.6491992", "0.64507616", "0.64507616", "0.64507616", "0.64507616", "0.64507616", "0.64507616", "0.6448934", ...
0.7720207
0
Creates 1D CNN model.
def create_cnn_model() -> tf.keras.Sequential: model = Sequential( [ layers.Convolution1D(filters=16, kernel_size=7, input_shape=[186, 1]), layers.LeakyReLU(), layers.MaxPool1D(pool_size=2), layers.Convolution1D(filters=16, kernel_size=5), layers.L...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_model_cnn(x_train, n=32, d=0.25, k=5):\n model = Sequential()\n model.add(Dropout(rate = d, input_shape = (x_train.shape[1], 1)))\n model.add(Conv1D(filters=n, kernel_size=(5), strides=1, activation = 'relu', kernel_constraint=max_norm(4)))\n model.add(Dropout(rate = d))\n model.add(MaxPoo...
[ "0.7623458", "0.7489159", "0.7484966", "0.73371595", "0.7267862", "0.70591027", "0.70563793", "0.70501095", "0.70030415", "0.6912963", "0.68892455", "0.68868345", "0.68751043", "0.6830899", "0.68181753", "0.68173605", "0.67555225", "0.6740872", "0.67303604", "0.672566", "0.67...
0.8065953
0
Changes an element tuple into the format required for unpacking by stripping all items other than locator method and locator string. This should be used to interact with CORE functionality, by unpacking the output of this function.
def format_element(self, element): return element[0], element[1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tuples_helper(element) -> list:\n try:\n return [element[\"ExportName\"], element[\"OutputValue\"]]\n except:\n return [element[\"OutputKey\"], element[\"OutputValue\"]]", "def strip_tuple(tuple_list, tuple_index = 0):\n elem_list = []\n for i in range(0, len(tuple_list)):\n ...
[ "0.5938195", "0.5789329", "0.577969", "0.577969", "0.566988", "0.5474743", "0.546726", "0.5442323", "0.5418231", "0.5394381", "0.5357106", "0.5304165", "0.5304165", "0.529233", "0.5287148", "0.5284375", "0.51935023", "0.5167967", "0.5156819", "0.5086922", "0.50808644", "0.5...
0.49886462
24
Uncheck a checkbox if it's not already. For checkboxes which can't be interacted with directly (hidden but toggled via JS detecting a click on a different object), provide a wrapper element in addition for the function to click instead.
def uncheck(self, element_tuple, *, wrapper_element_tuple=None): self.log_info(f"Browser.uncheck: Setting {element_tuple} checkbox to unchecked") checkbox = self.CORE.find_element(*self.format_element(element_tuple)) if checkbox.is_selected(): if wrapper_element_tuple is not None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uncheckMyWorkBox(self):\n self.util.waitForElementToBePresent(self.element.my_work_checkbox)\n checkbox = self.util.driver.find_element_by_xpath(self.element.my_work_checkbox)\n if checkbox.is_selected():\n self.util.clickOn(self.element.my_work_checkbox)", "def check(self, el...
[ "0.66842973", "0.6338794", "0.6328351", "0.6298265", "0.6136606", "0.61337143", "0.58903587", "0.58327997", "0.5708069", "0.5581485", "0.5454794", "0.54523826", "0.541073", "0.53601396", "0.5353384", "0.534173", "0.5338449", "0.5336849", "0.531623", "0.53078806", "0.5290702",...
0.73116904
0
Generates a ChromeDriver instance in compliance with configured settings
def create_chrome_instance(provided_config=None): chrome_options = ChromeOptions() chrome_options.add_argument(f"--window-size={provided_config.BrowserWidth},{provided_config.BrowserHeight}") for option in provided_config.Options: chrome_options.add_argument(option) if provided_config.Headless:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_driver_with_options():\n #options = get_driver_options()\n #return webdriver.Chrome(options=options)\n return webdriver.Chrome()", "def __setup_chrome() -> webdriver:\n chrome_prefs = {}\n chrome_options = webdriver.ChromeOptions()\n if ConfigurationManager.getInstance().get_app_setting...
[ "0.7371014", "0.72790366", "0.72727513", "0.7219082", "0.7103658", "0.7075896", "0.699881", "0.6900303", "0.68324727", "0.68074524", "0.6779175", "0.6694839", "0.6690196", "0.66874033", "0.6686535", "0.6671118", "0.6652798", "0.6563128", "0.6543638", "0.6512139", "0.6483952",...
0.6511585
20
Sets a flag when the name is changed.
def _name_changed(self): self._named = True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set(self, name: str):\n self.dict[name] = True", "def set_name(self, newname=\"\"):\n self.name = newname", "def update_name(self, new_name):\r\n self.__name = new_name", "def update_name(self, new_name):\r\n self.__name = new_name", "def new_name(self,new_name):\n se...
[ "0.7217058", "0.7008744", "0.6971489", "0.6971489", "0.69652337", "0.6922351", "0.6885303", "0.6838007", "0.680184", "0.6779535", "0.67409337", "0.67409337", "0.67409337", "0.67409337", "0.6739083", "0.6739083", "0.67372864", "0.67174345", "0.67174345", "0.66178006", "0.65519...
0.74930835
0
Returns a new random perfect maze with the given sizes.
def generate(width=20, height=20): m = Maze(width, height) m.randomize() return m
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_maze(size):\n dots = MazeGenerator.generate_dot_positions(size.x, size.y)\n maze = MazeGenerator.create_grid_string(dots, size.x, size.y)\n return maze", "def generate_random_maze_matrix(size, ambient_size=None):\n maze = np.ones((size, size))\n\n # Start from a random point...
[ "0.7122004", "0.6862014", "0.68315554", "0.6600048", "0.6448835", "0.6361071", "0.6230406", "0.61894333", "0.617471", "0.61246455", "0.61092216", "0.60549974", "0.60517037", "0.6019971", "0.59491324", "0.5940893", "0.591626", "0.5805965", "0.5799036", "0.579472", "0.5794508",...
0.72316444
0
Returns a random position on the maze.
def _get_random_position(self): return (random.randrange(0, self.maze.width), random.randrange(0, self.maze.height))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getRandomPosition(self):\n return Position(random.random()*self.w, random.random()*self.h)", "def getRandomPosition(self):\n x = random.randint(0, self.width - 1)\n y = random.randint(0, self.height - 1)\n return Position(x, y)", "def random_position(self):\n\t\treturn (random.r...
[ "0.7946045", "0.7853748", "0.7770066", "0.76973015", "0.76914775", "0.76745063", "0.7599151", "0.734271", "0.73359865", "0.7275391", "0.72499496", "0.7173055", "0.7136863", "0.71251756", "0.71239305", "0.71097726", "0.7108292", "0.7027182", "0.7027182", "0.69617575", "0.69403...
0.8542216
0
Establish a clean test environment.
def setUp(self): super(TestSheepdogStore, self).setUp() def _fake_execute(*cmd, **kwargs): pass self.config(default_store='sheepdog', group='glance_store') execute = mock.patch.object(processutils, 'execute').start() execute.side_effect = _fake_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def teardown_test_env():\n if not keep_tmp_dirs:\n print('\\nCleaning up temporary directories...')\n shutil.rmtree(tmp_elm_dpath, ignore_errors=True)\n shutil.rmtree(tmp_elm_examples_dpath, ignore_errors=True)\n\n print('Removing conda environment used for testing......
[ "0.79925764", "0.7463707", "0.7463707", "0.7230146", "0.71087873", "0.6968578", "0.6877131", "0.6847525", "0.68396896", "0.68036956", "0.68036956", "0.68036956", "0.68036956", "0.68036956", "0.68036956", "0.68036956", "0.6776391", "0.6713096", "0.6713096", "0.6651407", "0.662...
0.0
-1
Wrapper to load and return YAML data
def load_yaml(yaml_stream): return yaml.safe_load(yaml_stream)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _load_datas(self) -> tp.Dict[str, dict]:\n with open(self._file, \"r\") as stream:\n try:\n load: tp.Dict[str, dict] = yaml.safe_load(stream)\n logger.info(\"YAML imported\")\n return load\n except yaml.YAMLError as exc:\n ...
[ "0.77212983", "0.74955165", "0.7471604", "0.7384878", "0.73785967", "0.7366348", "0.7363979", "0.7359165", "0.7336432", "0.7302265", "0.7270013", "0.7235651", "0.7176974", "0.7174454", "0.7113792", "0.70880854", "0.70689505", "0.701759", "0.70037425", "0.7001296", "0.69992083...
0.6726783
46
Computes IQR bound and fits the imputer on the data.
def fit(self, x, y=None): x = pd.DataFrame(x) q1 = x.quantile(0.25) q3 = x.quantile(0.75) iqr = q3 - q1 self.lower_bound = q1 - (1.5 * iqr) self.upper_bound = q3 + (1.5 * iqr) self.imputer.fit( x.where(~((x < self.lower_bound) | (x > self.upper_bound))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IQR(data):\n return percentile(data, 75) - percentile(data, 25)", "def iqr(self, arr):\n a = np.asarray(arr)\n self.q1 = stats.scoreatpercentile(a, 25)\n self.q2 = stats.scoreatpercentile(a, 50)\n self.q3 = stats.scoreatpercentile(a, 75)", "def IQR(x, factor=1.5):\n xs = n...
[ "0.7170351", "0.6358508", "0.6163939", "0.60618055", "0.59064853", "0.5845869", "0.56856245", "0.55740243", "0.554194", "0.54870594", "0.5465165", "0.5458175", "0.54513913", "0.5412058", "0.5383834", "0.5365061", "0.5343856", "0.53277075", "0.52903855", "0.5289847", "0.528769...
0.7409191
0
Retrieves trained language pipeline from within SpaCy. If not available, it is downloaded.
def retrieve_spacy_language(lang): if not spacy.util.is_package(lang): subprocess.call(f'python -m spacy download {lang}', shell=True) model = spacy.load(lang) model.add_pipe('merge_entities') model.add_pipe('merge_noun_chunks') return model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_spacy_pipeline() -> Optional[spacy.language.Language]:\n return _spacy_pipeline.get()", "def spacy_pipeline() -> spacy.language.Language:\n context = get_spacy_pipeline()\n assert context is not None\n return context", "def get_default_spacy_pipeline() -> spacy.language.Language:\n nlp =...
[ "0.7091127", "0.70141554", "0.6868762", "0.62662375", "0.62160814", "0.61969113", "0.61932147", "0.6075514", "0.602528", "0.6020859", "0.6005432", "0.60026765", "0.5977601", "0.5968006", "0.5952573", "0.5910913", "0.5900922", "0.58935994", "0.5858334", "0.584124", "0.5835949"...
0.6313812
3
Returns a JSON response, transforming 'context' to make the payload.
def render_to_json_response(self, context, **response_kwargs): return JsonResponse( self.get_data(context), **response_kwargs )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_to_response(self, context):\n return self.get_json_response(self.convert_context_to_json(context))", "def render_to_response(self, context):\n\t\treturn self.get_json_response(self.convert_context_to_json(context))", "def render_to_json_response(self, context, **response_kwargs):\n ret...
[ "0.7898513", "0.78243256", "0.76760525", "0.76760525", "0.755985", "0.750485", "0.7381955", "0.73643523", "0.73468465", "0.7346432", "0.7307924", "0.7131703", "0.69398844", "0.68930125", "0.6721945", "0.6629656", "0.6629656", "0.6629656", "0.6629656", "0.66246855", "0.6609292...
0.7410596
7
Redistributes pairs in an element.
def reallocate(self) -> None: self._pair_lines.clear() for add_pair in self._buffer: insert = False for line in self._pair_lines: pairs = line.get(add_pair["time"].get_number()) if pairs is not None and pairs[0]["time"].duration() == \ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __elementSwap(self,\n index1: int,\n index2: int):\n self.__ordered_holder[index1], self.__ordered_holder[index2] = self.__ordered_holder[index2], self.__ordered_holder[index1]", "def vec_swap_entries(x, i, j):\n xi = x[i]\n xj = x[j]\n x = x.at[i].se...
[ "0.56897736", "0.56060475", "0.55970746", "0.55315346", "0.5510989", "0.5479538", "0.5444332", "0.5420653", "0.5405305", "0.53519267", "0.5335261", "0.5334788", "0.53205585", "0.5312659", "0.53043026", "0.53043026", "0.5296285", "0.529294", "0.52922386", "0.52736247", "0.5255...
0.0
-1
Comparator for sorting pairs.
def compare_pairs(pair_1: StudentPair, pair_2: StudentPair) -> bool: if pair_1["time"].duration() == pair_2["time"].duration(): return pair_1["dates"] < pair_2["dates"] return pair_1["time"].duration() < pair_2["time"].duration()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toPairs(self):\n result = Pairs()\n for first, second in enumerate(self):\n if first < second:\n result.append((first, second))\n return result", "def custom_sort(x, y):\n if x[1] == y[1]:\n return 1 if x[0] > y[0] else -1\n return cmp(y[1], x[1])",...
[ "0.6679795", "0.62482387", "0.6242709", "0.6222325", "0.61899817", "0.61898816", "0.6146837", "0.60932255", "0.6060789", "0.6018594", "0.5992988", "0.5958325", "0.59307265", "0.59229374", "0.58537763", "0.5832714", "0.5828197", "0.5826512", "0.5779967", "0.5769997", "0.574827...
0.5301554
98
List of indexes with the distribution of the number of rows per day.
def indexes(self) -> list: return self._indexes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def daily_table(self):\n htable = [0 for i in range(7)]\n for i in range(self.dataset.shape[0]):\n stime = time.localtime(np.int32(self.dataset[i][2]))\n evtime = stime[6]\n htable[evtime] += 1\n return htable", "def get_indexes(self, dataset: BaseDataset) ->...
[ "0.6799797", "0.6322448", "0.6319713", "0.6258298", "0.6250555", "0.620788", "0.6124279", "0.60334873", "0.6025376", "0.6025376", "0.6025376", "0.59548146", "0.5925233", "0.58652484", "0.58599883", "0.5854881", "0.5850198", "0.58409804", "0.58120227", "0.58029526", "0.5794318...
0.58710945
13
Set the initial isotropic propagation direction
def initialize_direction(self): self.mu = 2. * np.random.rand(1)[0] - 1.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setDirection(self,stepDir = 2):\n pass", "def set_direction(self, dir):\n if dir == 0:\n self.direction = [0, -1]\n elif dir == 1:\n self.direction = [1, 0]\n elif dir == 2:\n self.direction = [0, 1]\n elif dir == 3:\n self.direct...
[ "0.63499457", "0.627857", "0.6150965", "0.6123944", "0.60277706", "0.5952499", "0.591162", "0.5908013", "0.5805843", "0.57685465", "0.5727362", "0.57241774", "0.56849694", "0.5649166", "0.5632465", "0.5627853", "0.5621839", "0.56213796", "0.5609948", "0.5609948", "0.5595058",...
0.6684342
0
Initialize position of MC packet The packet is placed uniformly within the current grid cell.
def initialize_position(self): self.x = self.cell_xl + self.cell_dx * np.random.rand(1)[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_position(self):\n self.x = (self.cell_xl**3 +\n (self.cell_xr**3 - self.cell_xl**3) *\n np.random.rand(1)[0])**(1./3.)", "def init_position(self):\n\t\t\n\t\t# Starting position, 1 is for WHITE, -1 is for BLACK\n\t\tself['D4'] = self['E5'] = 1\n\t\tself['D5...
[ "0.71103084", "0.7026595", "0.66901904", "0.6508754", "0.6504931", "0.64174485", "0.63801694", "0.6350033", "0.6284387", "0.6255963", "0.62462723", "0.614725", "0.61292565", "0.6105714", "0.60866934", "0.6068095", "0.60315335", "0.5918932", "0.59148216", "0.59146696", "0.5912...
0.7646355
0
Initialize position of MC packet The packet is placed uniformly within the current grid cell. Hereby, the cellvolume growth with radius is taken into account.
def initialize_position(self): self.x = (self.cell_xl**3 + (self.cell_xr**3 - self.cell_xl**3) * np.random.rand(1)[0])**(1./3.)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_position(self):\n self.x = self.cell_xl + self.cell_dx * np.random.rand(1)[0]", "def init(self):\n\n self.pos = np.random.rand(self.N, 7)\n for i in range(3):\n self.pos[:, i] *= (self.bounds[2*i+1] - self.bounds[2*i])\n self.pos[:, i] += self.bounds[2*i]...
[ "0.6914089", "0.65769494", "0.6276434", "0.60204", "0.59571284", "0.5940393", "0.5916409", "0.58788735", "0.58478135", "0.5825908", "0.5797013", "0.5789238", "0.57826674", "0.57720035", "0.5749402", "0.574757", "0.57341284", "0.56948817", "0.5686301", "0.5681976", "0.5651929"...
0.67568654
1
Calculate H outside sphere
def H_outside(self, r): mu_star = self.mu_star(r) res = 0.5 * self.S * (0.5 * (1. - mu_star**2) - quad(self.H_integ_outside, mu_star, 1, args=(r,))[0]) return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sphere(indiv):\n return sum([ x ** 2 for x in indiv])", "def hemisphere(self):\n return self._hemisphere", "def h(self, z):\n # See definition at end of Section 1, p2 of Arnaud et al.\n return np.sqrt(self.Om*(1.+z)**3. + self.Ol)", "def fix_sphere_h (center_x, center_y, center_z,...
[ "0.68637985", "0.68291473", "0.67570186", "0.6647817", "0.6618411", "0.66053873", "0.65707576", "0.65644026", "0.65445274", "0.6529522", "0.6416142", "0.6411168", "0.6407305", "0.62939465", "0.6290983", "0.6278872", "0.6259458", "0.625756", "0.62552714", "0.62325835", "0.6217...
0.7031765
0
Calculate K inside sphere
def K_inside(self, r): return self.S * (1./3. - quad(self.K_integ_inside, 0, 1, args=(r,))[0])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f(k):\n return k * k * pk(k, suppression) * spherical_jn(0, k * r)", "def f(k):\n return k * k * k * k * pk(k, suppression) * spherical_jn(0, k * r)", "def f(k):\n return k * k * k * pk(k, suppression) * spherical_jn(1, k * r)", "def f(k):\n return k * k * k * ...
[ "0.74059075", "0.73933923", "0.7363293", "0.7322796", "0.7118826", "0.70805424", "0.70268506", "0.69763017", "0.6933727", "0.69305617", "0.69282126", "0.682265", "0.6784595", "0.67704767", "0.6762743", "0.67496175", "0.6734776", "0.66885114", "0.6650141", "0.664442", "0.66153...
0.72975403
4
Calculate K outside sphere
def K_outside(self, r): mu_star = self.mu_star(r) res = 0.5 * self.S * (1./3. * (1. - mu_star**3) - quad(self.K_integ_outside, mu_star, 1, args=(r,))[0]) return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def K_inside(self, r):\n\n return self.S * (1./3. - quad(self.K_integ_inside, 0, 1, args=(r,))[0])", "def f(k):\n return k * k * k * k * pk(k, suppression) * spherical_jn(0, k * r)", "def f(k):\n return k * k * pk(k, suppression) * spherical_jn(0, k * r)", "def f(k):\n ...
[ "0.72005075", "0.7171832", "0.7163883", "0.7124244", "0.7121231", "0.6890522", "0.68780947", "0.6828601", "0.67781955", "0.67012084", "0.66986316", "0.66532344", "0.6574576", "0.65655214", "0.65253115", "0.64910245", "0.6480324", "0.6438029", "0.6431755", "0.64193493", "0.641...
0.7255574
0
function to get fixed price of product.
def get_price(self, field_name='PRICES'): price_data = self.get_price_data() return price_data.get('price') or self.find_price(self.get_default(field_name))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_product_price(product):\n return latest_product_version(product).price", "def get_product_price(self):\n\n price = \"0.0000\"\n\n try:\n price = self.trees.get_element_by_id(\"priceblock_ourprice\").text\n except:\n try:\n price = self.trees.ge...
[ "0.7212667", "0.71844286", "0.71137273", "0.7080221", "0.7070639", "0.7051693", "0.7011619", "0.6993199", "0.6970063", "0.69171685", "0.69171685", "0.69171685", "0.69165456", "0.69157565", "0.689632", "0.68707734", "0.68613744", "0.6764227", "0.6761955", "0.671586", "0.671224...
0.65540415
33
function to convert the product price into dollar.
def get_price_dollar(self): price = self.get_price() currency_code = self.get_currency_code() if price and currency_code: if currency_code != 'USD': return currency(price, from_money=currency_code, to_money='USD') return price
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_usd(my_price):\n return f\"${my_price:,.2f}\" #> $12,000.71", "def to_usd(my_price):\n return f\"${my_price:,.2f}\" #> $12,000.71", "def to_usd(my_price):\n return f\"${my_price:,.2f}\" #> $12,000.71", "def to_usd(my_price):\n return f\"${my_price:,.2f}\" #> $12,000.71", "def to_usd(my_p...
[ "0.74097216", "0.74097216", "0.74097216", "0.74097216", "0.74097216", "0.7382305", "0.7355091", "0.73041093", "0.7229378", "0.72087675", "0.6877052", "0.68630433", "0.6812436", "0.67804545", "0.67004544", "0.6674125", "0.66741055", "0.6556348", "0.65339965", "0.6529302", "0.6...
0.76077604
0
Returns a fairly random nonce. Since the number of requests wont be really high being used for streaming, this should work.
def _get_nonce(): return uuid.uuid4().get_hex()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nonce():\n return random.randint(0, 4294967295)", "def nonce():\n return random.randint(0, 4294967295)", "def generate_nonce():\n return str(int(round(time.time() * 1000)))", "def _generate_nonce(self):\n return str(random.randrange(100000, 999999))", "def generateNonce():\r\n hash =...
[ "0.8899983", "0.8899983", "0.8409738", "0.8404919", "0.8272713", "0.82658195", "0.8235994", "0.8223351", "0.8223351", "0.81095797", "0.8067207", "0.7870935", "0.782407", "0.7790252", "0.7680633", "0.7661428", "0.73025686", "0.7279136", "0.7092669", "0.7067775", "0.70519304", ...
0.80236906
11
Returns the UNIX timestamp from system clock as a string.
def _get_timestamp(): return str(int(time.time()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __get_unix_now(self):\n ms_now = int(time.time() * 10 ** 5)\n return hex(ms_now)[2:]", "def get_current_unix_time():\n # https://timanovsky.wordpress.com/2009/04/09/get-unix-timestamp-in-java-python-erlang/\n current_time = time.time()\n timestamp = int(current_time *1000)\n return ...
[ "0.76755875", "0.743419", "0.7433017", "0.73788744", "0.73104984", "0.72863066", "0.72626096", "0.72388893", "0.71487504", "0.71116817", "0.7090071", "0.7084927", "0.70677614", "0.6987097", "0.6952762", "0.6951051", "0.69508094", "0.6947026", "0.6938149", "0.69213223", "0.680...
0.7501271
1
Copies the fake timestamp to a stat timestamp tuple.
def CopyToStatTimeTuple(self): if self._number_of_seconds is None: return None, None if self._microseconds is not None: return self._number_of_seconds, self._microseconds * 10 return self._number_of_seconds, None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _make_timestamp(self):\r\n\t\tlogger.debug(\"Get a timestamp\")\r\n\t\treturn time.mktime(datetime.today().timetuple())", "def _set_timestamp(self):\n d = datetime.now()\n self._time_stamp = \"{:>2} {} {} {:>2}:{:>02}\".format(\n d.day, MONTH_ABBREV[d.month], d.year, d.ho...
[ "0.65542275", "0.6441507", "0.62939113", "0.628449", "0.61313134", "0.6130165", "0.61139107", "0.6060384", "0.6047154", "0.6045662", "0.6036357", "0.5985301", "0.59715736", "0.59715736", "0.59715736", "0.59715736", "0.59715736", "0.59715736", "0.59715736", "0.595704", "0.5957...
0.6739669
0
Retrieves a timestamp that is compatible with plaso.
def GetPlasoTimestamp(self): if self._number_of_seconds is None: return if self._microseconds is not None: return (self._number_of_seconds * 1000000) + self._microseconds return self._number_of_seconds * 1000000
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_timestamp(self):\n p = self._get_sub_text('timestamp')\n if not p:\n return None\n else:\n return xep_0082.datetime(p)", "def fetch_timestamp(self):\r\n return self.__public_request('GET', '/api/v1/timestamp')", "def get_timestamp():\n return int(tim...
[ "0.7587911", "0.736075", "0.7351805", "0.7318355", "0.7314204", "0.7308146", "0.7282744", "0.71994996", "0.71980804", "0.7192426", "0.71344715", "0.7130453", "0.7125411", "0.70702213", "0.7064327", "0.7018043", "0.70092803", "0.7004173", "0.70015395", "0.69089264", "0.6883055...
0.72155964
7
This method retrieves ngrams of length n from a given sentence.
def iter_ngrams(self, sentence, n): return [tuple(sentence[i : i+n]) for i in range(len(sentence)-n+1)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_ngrams(seq, n):\n return", "def ngrams(text, n):\n return chain(*[ngrams_(text, i) for i in range(n + 1)])", "def _get_word_ngrams(n, sentences):\n assert len(sentences) > 0\n assert n > 0\n\n words = split_into_words(sentences)\n return _get_ngrams(n, words)", "def _get_word_ngrams...
[ "0.8177132", "0.8108822", "0.80935425", "0.80236024", "0.80007464", "0.80007464", "0.7973129", "0.7862303", "0.765795", "0.76501894", "0.76501894", "0.7597416", "0.7590804", "0.7536127", "0.75229967", "0.746831", "0.74574083", "0.74231577", "0.7403887", "0.7322611", "0.730308...
0.8083008
3
Get rotation matrix R along verticle axis from the angle
def get_R(angles): cs, ss = np.cos(angles), np.sin(angles) zeros, ones = np.zeros(len(cs)), np.ones(len(cs)) Rs = np.array( [[cs, ss, zeros], [-ss, cs, zeros], [zeros, zeros, ones]], dtype=np.float32 ) # (3, 3, N) return Rs.transpose((2, 0, 1))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotation_matrix(angle, axis):\n about_z = rotation_about_z(angle)\n z_to_axis = z_to_vector(axis)\n axis_to_z = np.linalg.inv(z_to_axis)\n return reduce(np.dot, [z_to_axis, about_z, axis_to_z])", "def rotation_inv(R: np.array) -> np.array:\n return R.T", "def get_rotation_vector(R):\n v =...
[ "0.8042162", "0.7843572", "0.78321725", "0.7727587", "0.761758", "0.7539035", "0.7497475", "0.746153", "0.74251133", "0.7403668", "0.7388793", "0.7382405", "0.7380394", "0.73802567", "0.7378012", "0.73746455", "0.7367724", "0.73619705", "0.73442173", "0.7321287", "0.731802", ...
0.0
-1
Get rotation matrix R along verticle axis from the angle
def get_R_torch(angles): cs, ss = torch.cos(angles), torch.sin(angles) zeros = torch.zeros(len(cs), device=angles.device) ones = torch.ones(len(cs), device=angles.device) Rs = torch.empty((angles.shape[0], 3, 3), device=angles.device).float() # (N, 3, 3) Rs[:, 0] = torch.stack((cs, ss, zeros), dim=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotation_matrix(angle, axis):\n about_z = rotation_about_z(angle)\n z_to_axis = z_to_vector(axis)\n axis_to_z = np.linalg.inv(z_to_axis)\n return reduce(np.dot, [z_to_axis, about_z, axis_to_z])", "def rotation_inv(R: np.array) -> np.array:\n return R.T", "def get_rotation_vector(R):\n v =...
[ "0.8042418", "0.7843473", "0.78315514", "0.7727638", "0.7617734", "0.7538989", "0.7497006", "0.74618345", "0.74244744", "0.7403585", "0.7389639", "0.7380619", "0.7380172", "0.73798925", "0.737828", "0.7374555", "0.7367599", "0.73624396", "0.734485", "0.7320597", "0.73180103",...
0.0
-1
Gradient descent step of the accelerated gradient descent method. This is the solution to equation (8) of Ji and Ye (2009).
def gradient_step(Y, X, lmbd, L, current_W): XT = X.T gradient = np.dot(XT.dot(X),current_W) - XT.dot(Y) C = current_W - (1/L) * gradient U, s, V = np.linalg.svd(C) s = s - lmbd/L final_s = np.maximum(s,0) U_dim = U.shape[1] V_dim = V.shape[0] S = np.zeros((U_dim, V_dim)) S_rank...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gradient_descent(self, X ,eta, tol,iter):\n gd=[]\n gd_x=[X]\n iteration=0\n # current_pt=X\n first_derivative=sym.diff(self.gdfunc)\n #print(first_derivative)\n x=sym.Symbol('x')\n first_derivative=sym.lambdify(x,first_derivative)\n learn_rate=eta...
[ "0.7387371", "0.73045385", "0.7301955", "0.72967243", "0.7284404", "0.72401005", "0.7207077", "0.7157161", "0.715336", "0.71316785", "0.710654", "0.7061659", "0.7058018", "0.7057642", "0.7041809", "0.70319414", "0.7030599", "0.7021542", "0.70007557", "0.69978786", "0.6996383"...
0.6388433
71
Closes the database engine. This makes sure that the running Python application isn't connected to the file DismodAT has to read because DismodAT can't read it while the application reads it.
def close(self): self.flush() if self.dismod_file.engine is not None: self.dismod_file.engine.dispose() self.dismod_file.engine = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close_db_while_running(self):\n self.close()\n try:\n yield\n finally:\n self.dismod_file.engine = get_engine(self._filename)", "def close_db(self):\n with nostderr():\n tb.file._open_files.close_all()", "def _close_database(self):\n asser...
[ "0.7932124", "0.7698381", "0.7628501", "0.7596482", "0.757162", "0.7550942", "0.74968183", "0.74968183", "0.74968183", "0.74738437", "0.74731934", "0.74630964", "0.7452261", "0.7433974", "0.7415599", "0.7393815", "0.7338402", "0.72717816", "0.72332126", "0.72172356", "0.72133...
0.71693957
23
Returns a dictionary from covariate name to its integer index.
def covariate_to_index(self): covariate_df = self.dismod_file.covariate return dict(covariate_df[["covariate_name", "covariate_id"]].to_records(index=False))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def id_index_map(self):\n result = {}\n for index, component_data in iteritems(self):\n result[id(component_data)] = index\n return result", "def token_to_idx(self) -> Dict[Hashable, int]:\n return self._token_to_idx", "def get_categories_enumerated_key_map(self):\n ...
[ "0.6708207", "0.6576246", "0.63318646", "0.6204813", "0.61899966", "0.6122378", "0.61169785", "0.61010176", "0.6099302", "0.6096077", "0.6034907", "0.60132337", "0.6011859", "0.5995864", "0.59569955", "0.5954234", "0.59499174", "0.5936469", "0.5935864", "0.59243613", "0.59080...
0.6467076
2
Round `float` that is sent in to the nearest `int`.
def echo_round() -> Generator[int, float, str]: sent = yield 0 while sent >= 0: sent = yield round(sent) return "Done"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def float_round(num, n):\n num = float(num)\n num = round(num, n)\n return num", "def nearest_int(num):\n return int(np.round(num))", "def float_round(x, prec=2, base=.05):\n return round(base * round(float(x) / base), prec)", "def _int2float(x: int) -> float:\n return round(x / 100, 2)", "...
[ "0.7440972", "0.7231356", "0.6969748", "0.6946121", "0.6937244", "0.68804234", "0.68034136", "0.6782001", "0.677883", "0.6712611", "0.6687245", "0.65997636", "0.65837985", "0.65065014", "0.6477337", "0.6438055", "0.63597786", "0.6336425", "0.63230187", "0.6272592", "0.6258182...
0.0
-1
Logs in user created in setUp
def login(self): return self.client.login(username='Georgie', password='12345678')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self):\n self.new_user = User(username='burens', password='12345')", "def setUp(self):\n self.login(self.create_superuser())", "def setUp(self):\n self.new_user = User('JosphatOtieno','jose@otis45')", "def test_login(self):\n self.user_api()\n self.base.metadata.c...
[ "0.793146", "0.78975517", "0.78562987", "0.7813264", "0.78029025", "0.7785907", "0.7773645", "0.7765679", "0.7761813", "0.77254343", "0.77240294", "0.77113175", "0.7702826", "0.7688141", "0.7678184", "0.7663037", "0.76566744", "0.7640755", "0.76153094", "0.76093364", "0.75932...
0.0
-1
Returns the object type for a Reads object
def get_type(self, ctx, params): # ctx is the context object # return variables are: returnVal #BEGIN get_type if 'workspace_name' not in params: raise ValueError('Parameter workspace_name is not set in input arguments') workspace_name = params['workspace_name'] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_object_type(self, object_type_id=''):\n # Return Value\n # ------------\n # object_type: {}\n #\n if not object_type_id:\n raise BadRequest(\"The resource_type_id parameter is missing\")\n return self.clients.resource_registry.read(object_type_id)", "...
[ "0.7071357", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.6988872", "0.69575155", "0.69575155", "0.69575155", ...
0.0
-1
Row normalization function Implement a function that normalizes each row of a matrix to have unit length.
def normalizeRows(x): N = x.shape[0] x /= np.sqrt(np.sum(x ** 2, axis=1)).reshape((N, 1)) + 1e-30 return x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalizeRows(x):\n\n ### YOUR CODE HERE\n norm2 = np.linalg.norm(x,2,axis = 1).reshape(x.shape[0],-1)\n x = x/norm2\n ### END YOUR CODE\n\n return x", "def normalizeRows(x):\n\n ### YOUR CODE HERE\n # using l2 norm to normalize\n x = x / np.sqrt(np.sum(x * x, axis=-1, keepdims=True))...
[ "0.8099689", "0.80678123", "0.79161626", "0.7844873", "0.7514624", "0.74229157", "0.74120814", "0.7315109", "0.7187008", "0.70935184", "0.70890456", "0.691026", "0.68471384", "0.67702127", "0.6760503", "0.6594641", "0.6537965", "0.6502695", "0.6501119", "0.64884686", "0.64776...
0.7919649
2
Compute the softmax function for each row of the input x. It is crucial that this function is optimized for speed because it will be used frequently in later code.
def softmax(x): orig_shape = x.shape if len(x.shape) > 1: # Matrix tmp = np.max(x, axis=1) x -= tmp.reshape((x.shape[0], 1)) x = np.exp(x) tmp = np.sum(x, axis=1) x /= tmp.reshape((x.shape[0], 1)) else: # Vector tmp = np.max(x) x -= tm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax(self, x):\n\n out = np.zeros(x.shape)\n for i in range(x.shape[0]):\n max_x = x[i] - np.max(x[i])\n out[i] = np.exp(max_x) / np.sum(np.exp(max_x), axis=0)\n\n return out", "def softmax(x: npt.NDArray) -> npt.NDArray:\n row_wise_max = np.max(x, axis=1).res...
[ "0.8578101", "0.85545444", "0.85178006", "0.84942997", "0.84723365", "0.84399134", "0.84285694", "0.8418548", "0.83919775", "0.8385109", "0.8363403", "0.83514667", "0.83368903", "0.8295091", "0.82931685", "0.8293041", "0.8293041", "0.8293041", "0.8293041", "0.8293041", "0.829...
0.8262257
25
Returns true if the slug url is available
def slug_available(slug): return ((Scan.query.filter_by(url_slug=slug).first() is None) and (Publication.query.filter_by(url_slug=slug).first() is None))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def slug_exists(host_slug: str,\n database_connection: mysql.connector.connect) -> bool:\n return validate_slug(host_slug, database_connection)", "def validate_slug(host_slug: str,\n database_connection: mysql.connector.connect) -> bool:\n host_slug = host_slug.strip()\n ...
[ "0.731647", "0.699601", "0.68824184", "0.68215793", "0.6745637", "0.6730685", "0.6623745", "0.6616063", "0.6612554", "0.65487105", "0.6356168", "0.63158953", "0.6292678", "0.6249678", "0.624358", "0.6216887", "0.6209696", "0.6153062", "0.61217886", "0.6115216", "0.61012435", ...
0.7709322
0
Create and run a qt date/time selection dialog. init a datetime, default now step_min a dict, keys are QtWidgets.QDateTimeEdit Sections, like QtWidgets.QDateTimeEdit.MinuteSection, and values are integers, the minimum amount that section of the date/time changes when you roll the mouse wheel.
def runAskDateTimeDialog( self, c: Cmdr, title: str, message: str='Select Date/Time', init: datetime.datetime=None, step_min: dict=None, ) -> None: #@+<< define date/time classes >> #@+node:ekr.20211005103909.1: *5* << define date/time classes >> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dt_changed(self):\n self.dateTimeEdit_2.setMinimumDateTime(self.dateTimeEdit.dateTime())", "def select_events_between_activated(self):\n\n def parseTime(txt):\n \"\"\"\n parse time in string (should be 00:00:00.000 or in seconds)\n \"\"\"\n if ':' in ...
[ "0.6102606", "0.5581471", "0.5167035", "0.5160645", "0.50392187", "0.50144684", "0.5013052", "0.49559203", "0.4917738", "0.48784727", "0.48759302", "0.48605368", "0.48604164", "0.48550627", "0.480916", "0.47747588", "0.47545725", "0.47438717", "0.47335535", "0.4725922", "0.46...
0.79846495
0
Return the value of the node for the setting.
def get_data(self, setting: str) -> list: c = self.c return c.config.getData(setting, strip_comments=False, strip_data=False) or []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def value(self):\n return self.node_value", "def value(self):\n return self.get_attribute(\"value\", str(self.children))", "def get_node_value(self, n):\n node = self.get_node(n)\n if node:\n return node.value", "def read_value(self):\n return self.load_attr(\"va...
[ "0.8024247", "0.7688601", "0.7602331", "0.73634183", "0.7300678", "0.71814626", "0.71631604", "0.71631604", "0.71631604", "0.71579677", "0.712822", "0.7075542", "0.70627284", "0.70296925", "0.70278597", "0.70278597", "0.70194465", "0.70194465", "0.70194465", "0.70013165", "0....
0.0
-1
find_constants Return a list of constants referenced in the supplied text,
def find_constants_referenced(self, text: str) -> list[str]: aList = sorted(set(re.findall(r"@[A-Za-z_][-A-Za-z0-9_]*", text))) # Exempt references to Leo constructs. for s in ('@button', '@constants', '@data', '@language'): if s in aList: aList.remove(s) retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def global_matches(self, text):\n\n matches = []\n n = len(text)\n\n for list in [ self.namespace ]:\n for word in list:\n if word[:n] == text:\n matches.append(word)\n\n return matches", "def get_defined_constants():\n raise NotImplementedError()", "def g...
[ "0.58599454", "0.578981", "0.5785223", "0.56432354", "0.5600148", "0.5561508", "0.55585694", "0.5519214", "0.54849255", "0.5418846", "0.53741246", "0.53187495", "0.5313181", "0.530148", "0.52545744", "0.51825374", "0.51619565", "0.51483244", "0.5140914", "0.51351464", "0.5130...
0.7396407
0
computes IoU between performer and ground truth building masks
def compute_pixel_iou(perf_building_mask, gt_building_mask): if perf_building_mask.shape != gt_building_mask.shape: raise ValueError("Dimension mismatch") intersection = np.sum(perf_building_mask & gt_building_mask) union = np.sum(perf_building_mask | gt_building_mask) iou = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_iou(ground_truth_building, performer_building):\n if ground_truth_building.min_x > performer_building.max_x or \\\n ground_truth_building.min_y > performer_building.max_y or \\\n ground_truth_building.max_x < performer_building.min_x or \\\n ground_...
[ "0.71459913", "0.69955", "0.675376", "0.6698098", "0.66957843", "0.66093457", "0.6595845", "0.65427727", "0.6436115", "0.63513964", "0.6322787", "0.6282413", "0.62599283", "0.62537706", "0.6210228", "0.6208297", "0.61734813", "0.6152568", "0.6151952", "0.6131706", "0.61215305...
0.76561904
0
Returns class that can handle data from devices with given model or can manage status of such devices. If is_manager = False result will be a class that derived from BaseDataHandler and have methods that can decode data from device and save it to database. Otherwise it will be a class that derived from BaseDeviceManage...
def _get_device_handler_or_manager(device_model: str, is_manager: bool = False): LIST = HANDLERS_LIST handlers_list = device_data_handlers if is_manager: LIST = MANAGERS_LIST handlers_list = device_managers try: handler_name = LIST[device_model] except KeyError: err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_device_manager(device_model: str):\n return _get_device_handler_or_manager(device_model, True)", "def get_device_data_handler(device_model: str):\n return _get_device_handler_or_manager(device_model, False)", "def get_handler_for_model(self, model):\n try:\n return self._registr...
[ "0.67649657", "0.6488736", "0.5599563", "0.55206025", "0.542871", "0.5284573", "0.5217034", "0.5091815", "0.5023947", "0.5023947", "0.5009368", "0.49807107", "0.49746594", "0.4945554", "0.4900993", "0.48656696", "0.48584735", "0.48584607", "0.48580474", "0.48580474", "0.48580...
0.8263041
0
Wrapper for _get_device_handler_or_manager method.
def get_device_manager(device_model: str): return _get_device_handler_or_manager(device_model, True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_device_handler_or_manager(device_model: str, is_manager: bool = False):\n\n LIST = HANDLERS_LIST\n handlers_list = device_data_handlers\n if is_manager:\n LIST = MANAGERS_LIST\n handlers_list = device_managers\n\n try:\n handler_name = LIST[device_model]\n except KeyErr...
[ "0.76123226", "0.7341856", "0.6130168", "0.6117212", "0.60769254", "0.5991454", "0.5757319", "0.5741887", "0.5719479", "0.5671883", "0.56580395", "0.56231046", "0.5527335", "0.5504597", "0.5458711", "0.54204184", "0.5414329", "0.5405207", "0.5384809", "0.5373784", "0.53058225...
0.76369745
0
Wrapper for _get_device_handler_or_manager method.
def get_device_data_handler(device_model: str): return _get_device_handler_or_manager(device_model, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_device_manager(device_model: str):\n return _get_device_handler_or_manager(device_model, True)", "def _get_device_handler_or_manager(device_model: str, is_manager: bool = False):\n\n LIST = HANDLERS_LIST\n handlers_list = device_data_handlers\n if is_manager:\n LIST = MANAGERS_LIST\n ...
[ "0.7637257", "0.76118815", "0.6133493", "0.6118185", "0.6078016", "0.5991407", "0.5757511", "0.57450354", "0.5721423", "0.5674563", "0.56562865", "0.56218755", "0.5529106", "0.55067295", "0.5460247", "0.5418331", "0.54118943", "0.54068494", "0.538605", "0.53722465", "0.530867...
0.734236
2
ROW returns the number of the row from 0(a8h8) to 7(a1h1) in which is the square 'x'
def ROW(x): return (x >> 3)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_cells_for_rows(self, rows):\r\n return (rows * rows + rows) // 2", "def rows(self) -> int:\n return self.__squares.__len__()", "def row_count(self):\n return self.well_count // self.col_count", "def row(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"row\")", "de...
[ "0.68206614", "0.65865594", "0.6565966", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.63450223", "0.62993187", "0.610818", ...
0.72117245
1
Create MetadataMap objects that will be used in the tests.
def setUp(self): # Create a map using the overview tutorial mapping file. self.overview_map_str = [ "#SampleID\tBarcodeSequence\tTreatment\tDOB\tDescription", "PC.354\tAGCACGAGCCTA\tControl\t20061218\t354", "PC.355\tAACTCGTCGATG\tControl\t20061218\t355", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self):\r\n # Create a map using the overview tutorial mapping file.\r\n self.overview_map_str = [\r\n \"#SampleID\\tBarcodeSequence\\tTreatment\\tDOB\\tDescription\",\r\n \"PC.354\\tAGCACGAGCCTA\\tControl\\t20061218\\t354\",\r\n \"PC.355\\tAACTCGTCGATG\\tCon...
[ "0.6777494", "0.6119957", "0.6091692", "0.607853", "0.6051635", "0.59925073", "0.5967245", "0.58849573", "0.5857285", "0.5826208", "0.58216155", "0.5820132", "0.5815573", "0.58073705", "0.58058447", "0.5803889", "0.57717216", "0.5771417", "0.57537293", "0.57516026", "0.573940...
0.68475837
0
Test parsing a mapping file into a MetadataMap instance.
def test_parseMetadataMap(self): obs = MetadataMap.parseMetadataMap(self.overview_map_str) self.assertEqual(obs, self.overview_map)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_parseMetadataMap(self):\r\n obs = MetadataMap.parseMetadataMap(self.overview_map_str)\r\n self.assertEqual(obs, self.overview_map)", "def parseMetadataMap(lines):\r\n return MetadataMap(*parse_mapping_file_to_dict(lines))", "def test_mapping_file_to_dict(self):\r\n s1 = ['#...
[ "0.76712304", "0.72917974", "0.7074408", "0.69405633", "0.6915975", "0.6783265", "0.67537105", "0.67109567", "0.6631358", "0.65012133", "0.6491774", "0.6454539", "0.643106", "0.6418316", "0.6412258", "0.63924867", "0.63459474", "0.6331289", "0.6321486", "0.6320176", "0.631146...
0.7637813
1
Test metadata by sample ID accessor with valid sample IDs.
def test_getSampleMetadata(self): exp = {'BarcodeSequence': 'AGCACGAGCCTA', 'Treatment': 'Control', 'DOB': '20061218', 'Description': '354'} obs = self.overview_map.getSampleMetadata('PC.354') self.assertEqual(obs, exp) exp = {'BarcodeSequence': 'ACCAGCGACTAG', 'Treatmen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_getSampleMetadata_bad_sample_id(self):\r\n # Nonexistent sample ID.\r\n self.assertRaises(KeyError, self.overview_map.getSampleMetadata,\r\n 'PC.000')\r\n self.assertRaises(KeyError, self.no_metadata.getSampleMetadata,\r\n 'PC.000')\r\...
[ "0.7431353", "0.7422627", "0.7368756", "0.7361648", "0.72176903", "0.7169399", "0.6952665", "0.6874135", "0.6873461", "0.6858016", "0.670197", "0.670197", "0.6692071", "0.6604647", "0.64640296", "0.6421047", "0.64128375", "0.6327992", "0.628114", "0.6274623", "0.61837107", ...
0.59703135
35
Test metadata by sample ID accessor with invalid sample IDs.
def test_getSampleMetadata_bad_sample_id(self): # Nonexistent sample ID. self.assertRaises(KeyError, self.overview_map.getSampleMetadata, 'PC.000') self.assertRaises(KeyError, self.no_metadata.getSampleMetadata, 'PC.000') # Integer sample ID. self.assertRa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_getSampleMetadata_bad_sample_id(self):\r\n # Nonexistent sample ID.\r\n self.assertRaises(KeyError, self.overview_map.getSampleMetadata,\r\n 'PC.000')\r\n self.assertRaises(KeyError, self.no_metadata.getSampleMetadata,\r\n 'PC.000')\r\...
[ "0.8133826", "0.72348", "0.71959615", "0.7168183", "0.70231897", "0.6887802", "0.6871468", "0.68642044", "0.6705414", "0.66979134", "0.662837", "0.66037434", "0.658648", "0.6456211", "0.642515", "0.63970757", "0.6369993", "0.6362547", "0.63348824", "0.63177156", "0.6286631", ...
0.81624603
0
Test correct validation of refnames
def test_is_valid_git_refname(self): # valid branchnames self.assertTrue(is_valid_git_refname('master')) self.assertTrue(is_valid_git_refname('debuggatron_2000')) self.assertTrue(is_valid_git_refname('refname/bar')) self.assertTrue(is_valid_git_refname('ref.nameslu/_eggs_/spam'))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_is_valid_git_refname(self):\r\n # valid branchnames\r\n self.assertTrue(is_valid_git_refname('master'))\r\n self.assertTrue(is_valid_git_refname('debuggatron_2000'))\r\n self.assertTrue(is_valid_git_refname('refname/bar'))\r\n self.assertTrue(is_valid_git_refname('ref.na...
[ "0.7155712", "0.70484257", "0.6959989", "0.6837648", "0.67429316", "0.66973555", "0.6492197", "0.6476293", "0.6464883", "0.6360999", "0.63417995", "0.6331771", "0.63068086", "0.6259249", "0.625452", "0.619649", "0.614463", "0.6125253", "0.6116972", "0.6110542", "0.609678", ...
0.71525216
1
Create an instance of local gaussian threshold
def localGaussian(self, region_width, scale=0.95, down=True): region_width = boof_fixed_length(region_width) java_object = pbg.gateway.jvm.boofcv.factory.filter.binary.FactoryThresholdBinary.\ localGaussian(region_width,float(scale),down,self.boof_image_type) return InputToBinary(ja...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gaussian_threshold_func(\n distribution: List[float],\n alpha: List[float],\n **kwargs,\n) -> float:\n if len(distribution.shape) > 1:\n parameters = np.array(\n [norm.fit(distribution[i]) for i in range(distribution.shape[0])]\n )\n num_threshold = alpha.shape[0]\n ...
[ "0.6320686", "0.6299358", "0.62813634", "0.6239726", "0.622714", "0.6209167", "0.6193873", "0.61874384", "0.61824715", "0.61805373", "0.61761224", "0.61290044", "0.6126147", "0.6075367", "0.60473645", "0.6028788", "0.6000742", "0.59999543", "0.59968203", "0.59848", "0.5980886...
0.701792
0
Create an instance of local gaussian threshold
def localSauvola(self, region_width, k=0.3, down=True): region_width = boof_fixed_length(region_width) java_object = pbg.gateway.jvm.boofcv.factory.filter.binary.FactoryThresholdBinary.\ localSauvola(region_width,down,float(k),self.boof_image_type) return InputToBinary(java_object)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localGaussian(self, region_width, scale=0.95, down=True):\n region_width = boof_fixed_length(region_width)\n\n java_object = pbg.gateway.jvm.boofcv.factory.filter.binary.FactoryThresholdBinary.\\\n localGaussian(region_width,float(scale),down,self.boof_image_type)\n return Input...
[ "0.70174056", "0.6320467", "0.6301312", "0.62820625", "0.6241312", "0.62278724", "0.620951", "0.61962664", "0.6188974", "0.61839104", "0.6181771", "0.61780196", "0.6130276", "0.6128769", "0.6075367", "0.6049565", "0.6029836", "0.6001879", "0.60009944", "0.5997879", "0.5986547...
0.0
-1
Create an instance of local gaussian threshold
def localWolf(self, region_width, k=0.3, down=True): region_width = boof_fixed_length(region_width) java_object = pbg.gateway.jvm.boofcv.factory.filter.binary.FactoryThresholdBinary.\ localWolf(region_width,down,float(k),self.boof_image_type) return InputToBinary(java_object)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localGaussian(self, region_width, scale=0.95, down=True):\n region_width = boof_fixed_length(region_width)\n\n java_object = pbg.gateway.jvm.boofcv.factory.filter.binary.FactoryThresholdBinary.\\\n localGaussian(region_width,float(scale),down,self.boof_image_type)\n return Input...
[ "0.701792", "0.6320686", "0.6299358", "0.62813634", "0.6239726", "0.622714", "0.6209167", "0.6193873", "0.61874384", "0.61824715", "0.61805373", "0.61761224", "0.61290044", "0.6126147", "0.6075367", "0.60473645", "0.6028788", "0.6000742", "0.59999543", "0.59968203", "0.59848"...
0.0
-1
Create an instance of local gaussian threshold
def localNiblack(self, region_width, k=0.3, down=True): region_width = boof_fixed_length(region_width) java_object = pbg.gateway.jvm.boofcv.factory.filter.binary.FactoryThresholdBinary.\ localNiblack(region_width,down,float(k),self.boof_image_type) return InputToBinary(java_object)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localGaussian(self, region_width, scale=0.95, down=True):\n region_width = boof_fixed_length(region_width)\n\n java_object = pbg.gateway.jvm.boofcv.factory.filter.binary.FactoryThresholdBinary.\\\n localGaussian(region_width,float(scale),down,self.boof_image_type)\n return Input...
[ "0.701792", "0.6320686", "0.6299358", "0.62813634", "0.6239726", "0.622714", "0.6209167", "0.6193873", "0.61874384", "0.61824715", "0.61805373", "0.61761224", "0.61290044", "0.6126147", "0.6075367", "0.60473645", "0.6028788", "0.6000742", "0.59999543", "0.59968203", "0.59848"...
0.0
-1
Returns a HttpResponseForbidden if the user does not own the section and task.
def user_owns_section_and_task(func): @functools.wraps(func) @user_owns_section def wrapper(request, section_id, task_id, *args, **kwargs): task = Task.objects.get(pk=task_id) user = task.section.board.user if request.user.id == user.id: # Logged in user owns task, exec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_allowed_if_in_task(self):\n\n @task_or_superuser_only\n def view(request):\n return HttpResponse(\"Hello\")\n\n request = self.factory.get(\"/\")\n request.META[_TASK_NAME_HEADER] = \"test\"\n\n response = view(request)\n self.assertEqual(response.statu...
[ "0.673319", "0.6722941", "0.6373558", "0.62612206", "0.62396926", "0.6188741", "0.6064272", "0.60561746", "0.6013209", "0.59906936", "0.59758806", "0.5967832", "0.5957171", "0.5938238", "0.5894628", "0.588916", "0.5877327", "0.5818235", "0.5811763", "0.5793476", "0.5788154", ...
0.7398975
0
Creates a more convenient board aggregate wrapper around a Board model.
def create_board_aggregate(board): data = { 'id': board.id, 'name': board.name, } # Build sectionList sectionList = [] for section in board.section_set.all(): # Build taskList taskList = [] for task in section.task_set.all(): # Each task is a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def board(self):\r\n return Board(self)", "def board(self):\r\n return Board(self)", "def board(self):\r\n return Board(self)", "def board(self):\r\n return Board(self)", "def board(self):\r\n return Board(self)", "def board(self, board_id):\r\n return Board(self...
[ "0.70413464", "0.70413464", "0.70413464", "0.70413464", "0.70413464", "0.64629716", "0.6221905", "0.5899963", "0.58118206", "0.5795982", "0.5769712", "0.5757588", "0.57526153", "0.5730352", "0.5679222", "0.5656481", "0.5651118", "0.56217873", "0.55867845", "0.558116", "0.5575...
0.6547972
5
Returns a logged user's board/section/tasks as a JSON object. The returned object is not a direct mapping of the database objects, but rather a more convenient aggregate (see the related function create_board_aggregate). If the user does not have a board, it creates and returns a new empty board.
def board(request): try: board = Board.objects.get(user=request.user) return JsonResponse(create_board_aggregate(board)) except ObjectDoesNotExist: # User has no board, create a new one and return aggregate board = create_default_board(request.user) return JsonResponse(c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_board_aggregate(board):\n\n data = {\n 'id': board.id,\n 'name': board.name,\n }\n\n # Build sectionList\n sectionList = []\n for section in board.section_set.all():\n # Build taskList\n taskList = []\n for task in section.task_set.all():\n ...
[ "0.64891285", "0.5994532", "0.59358305", "0.5862742", "0.5593309", "0.5553864", "0.5338541", "0.52381027", "0.522747", "0.5211359", "0.5194084", "0.5171273", "0.5152421", "0.51520437", "0.5151099", "0.5149118", "0.5149118", "0.5145029", "0.5144707", "0.51087034", "0.5090383",...
0.7096799
0
Optional embedding for tensor input. If there is no feature dimension, an embedding layer can be used. If the input tensor has without batch dimension the shape of e.g. `(None, F)` and `F` is the feature dimension, no embedding layer is required. However, for shape `(None, )` an embedding with `output_dim` assures a ve...
def generate_embedding(inputs, input_shape: list, embedding_args: dict, embedding_rank: int = 1, **kwargs): if len(kwargs) > 0: print("WARNING:kgcnn: Unknown embedding kwargs {0}. Will be reserved for future versions.".format(kwargs)) if len(input_shape) == embedding_rank: n = ks.layers.Embeddi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def embedding(org_input):\n # Create the embedding list\n for f in range(Config.num_feature):\n num_cat_value = Config.schema[f]\n\n if num_cat_value == 1:\n pass\n elif num_cat_value > 1:\n embed_dict[f] = tf.get_variable(\n ...
[ "0.6556829", "0.65243655", "0.64418864", "0.63933486", "0.6237811", "0.6163162", "0.61513436", "0.6133222", "0.6083689", "0.59896886", "0.5975222", "0.59632677", "0.5956818", "0.59096086", "0.59082794", "0.5852431", "0.5724415", "0.5710859", "0.5698398", "0.56394494", "0.5570...
0.5762082
16
Sets the name of this MsRun.
def name(self, name): # if name is None: # raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, name):\n self.__name = name", "def set_name(self, name):\n self.__name = name", "def set_name(self, name):\n self._name = name", "def SetName(self, name):\n self.name = name", "def setname(self, name):\n self.__name = name", "def set_name(self, name):...
[ "0.80029523", "0.80029523", "0.79991555", "0.7989367", "0.79665637", "0.79647076", "0.79647076", "0.79647076", "0.79647076", "0.79647076", "0.7959835", "0.79496604", "0.787503", "0.7864963", "0.78530174", "0.7837398", "0.7837398", "0.78324026", "0.7712417", "0.7712417", "0.76...
0.0
-1
Sets the id_format of this MsRun.
def id_format(self, id_format): self._id_format = id_format
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setID(self, idf):\n self.id = idf", "def format(self, format):\n\n self._format = format", "def format(self, format):\n\n self._format = format", "def _set_id(self, value):\n pass", "def set_id(self, id_):\n\n self.id_ = id_", "def _set_id(self):\n raise NotI...
[ "0.62020105", "0.58940774", "0.58940774", "0.5825699", "0.57359976", "0.57086235", "0.5689986", "0.56567943", "0.5608134", "0.55861366", "0.557906", "0.5565758", "0.55648816", "0.5557206", "0.55210143", "0.5476634", "0.54507226", "0.5403126", "0.54017705", "0.5398398", "0.539...
0.8249658
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, MsRun): 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.8457167", "0.8393036", "0.81455255", "0.8139734", "0.81333447", "0.8094964", "0.8093362", "0.8093362", "0.8093362", "0.80863476", "0.80863476", "0.8077286", "0.8077286", "0.806682" ]
0.0
-1
This function tests that updated_at is updated via save method
def test_updated_atviasavemethod(self): b1 = BaseModel() b1.save() self.assertEqual(type(b1.updated_at), type(datetime.now())) self.assertEqual(type(b1.updated_at), datetime) self.assertTrue(hasattr(b1, "updated_at"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_save_updated_at(self):\n r = Review()\n prev_updated_at = r.updated_at\n r.save()\n self.assertNotEqual(prev_updated_at, r.updated_at)", "def test_update_at(self):\n self.assertIsInstance(self.obj.update_at, datetime)", "def test_update_at(self):\n self.assert...
[ "0.8446482", "0.810859", "0.810859", "0.810859", "0.8075144", "0.8070695", "0.801376", "0.7932672", "0.7910144", "0.7822954", "0.7792112", "0.77798676", "0.76561564", "0.7625252", "0.7611181", "0.7477089", "0.73714316", "0.7286068", "0.7260684", "0.7260684", "0.7260684", "0...
0.8449542
0
Sets the name of this NicProperties.
def name(self, name): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def property_name(self, name: str) -> None:\n name = str(name)\n if len(name) > 100:\n name = name[:100]\n self.prop_name = name", "def set_name(self, name):\n self._name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n ...
[ "0.7805734", "0.76355445", "0.76195514", "0.76195514", "0.76195514", "0.76195514", "0.76195514", "0.7593033", "0.7593033", "0.75766164", "0.75605834", "0.7551873", "0.75146437", "0.7506389", "0.749766", "0.7403438", "0.73671365", "0.72911584", "0.72911584", "0.72855884", "0.7...
0.0
-1
Sets the mac of this NicProperties.
def mac(self, mac): self._mac = mac
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_mac(self, v, load=False):\n parent = getattr(self, \"_parent\", None)\n if parent is not None and load is False:\n raise AttributeError(\"Cannot set keys directly when\" +\n \" within an instantiated list\")\n\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n ...
[ "0.7533984", "0.70530933", "0.63903344", "0.63852715", "0.63852715", "0.6312601", "0.6276337", "0.6205089", "0.61271477", "0.60897404", "0.60897404", "0.6078541", "0.6056407", "0.6010822", "0.59828717", "0.5923654", "0.59165025", "0.5839205", "0.5834562", "0.5828612", "0.5731...
0.779444
0
Sets the ips of this NicProperties.
def ips(self, ips): self._ips = ips
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_ip_adresses(self):\n # unfold a config tree for the current suffix, if any\n for interface, details in self.interfaces.items():\n for k, v in details.items():\n if k == 'address':\n ip, prefix = address_to_ip_prefix(v)\n self.int...
[ "0.6625338", "0.5901696", "0.5705123", "0.5499859", "0.54270715", "0.5403276", "0.5350545", "0.53049237", "0.5277277", "0.52653635", "0.5236248", "0.52024084", "0.5202223", "0.5198747", "0.51927537", "0.5190193", "0.5187783", "0.5183375", "0.51768583", "0.5164255", "0.5164255...
0.7682676
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, NicProperties): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.80885184", "0.80885184", "0.805514", "0.7983044", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, NicProperties): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Runs at the end of the test case; drops the db
def tearDown(self): with self.app.app_context(): db.session.remove() db.drop_all()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def teardown():\n teardown_db()", "def tearDown(self):\n db.session.commit()\n db.drop_all()", "def tearDown(self):\n self.db.drop_all()\n pass", "def tearDown(self):\n with app.app_context():\n db = app.db.get_db()\n cur = db.cursor()\n ...
[ "0.87688816", "0.8661875", "0.8634616", "0.85929716", "0.8583327", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", ...
0.82276815
74
Return the exception message as a string. That message is also available via the 'message' property.
def get_message (self) : return self._message
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exception_message(self) -> str:\n return pulumi.get(self, \"exception_message\")", "def exception_message(self):\n # type: () -> string_types\n return self._exception_message", "def exception_msg(exception):\n if hasattr(exception, 'message'):\n return str(exception.message)\...
[ "0.8818971", "0.8671207", "0.8437717", "0.7510084", "0.7481239", "0.7481239", "0.7481239", "0.7479361", "0.7412919", "0.73954713", "0.73666924", "0.7348801", "0.7335201", "0.7325931", "0.7267539", "0.721931", "0.7197319", "0.7134845", "0.71122295", "0.70249623", "0.70056784",...
0.6356063
97
Return the type of the exception as string.
def get_type (self): return self._stype
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def error_type(self):\n return self.__class__.__name__", "def get_type(self) -> str:\n raise NotImplementedError", "def get_type(self) -> str:\n raise NotImplementedError", "def get_error_type(self):\n\n return self.err_type", "def type_as_string(self):\n return self.prop...
[ "0.7268135", "0.68084705", "0.68084705", "0.6798615", "0.67748123", "0.6680886", "0.6656614", "0.6619952", "0.6612963", "0.660463", "0.6588737", "0.6585325", "0.6556647", "0.65411013", "0.6499016", "0.6468789", "0.64451057", "0.6440919", "0.6431358", "0.63928306", "0.63822603...
0.0
-1
Green(self) > byte Returns the green intensity.
def Green(*args, **kwargs): return _gdi_.Colour_Green(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def green(self) -> float:\n return self._green", "def GetGreen(self):\n return _itkRGBAPixelPython.itkRGBAPixelUS_GetGreen(self)", "def GetGreen(self):\n return _itkRGBAPixelPython.itkRGBAPixelUC_GetGreen(self)", "def grey(self):\n return sum((self.value(0), self.value(1), self.va...
[ "0.81760025", "0.79025", "0.78514856", "0.6951732", "0.68796027", "0.6655894", "0.6627976", "0.6626696", "0.6514308", "0.6488908", "0.64174515", "0.6388856", "0.6288324", "0.6256715", "0.62535447", "0.6218235", "0.62176466", "0.6196544", "0.6182686", "0.6182686", "0.6182686",...
0.63827515
12
Blue(self) > byte Returns the blue intensity.
def Blue(*args, **kwargs): return _gdi_.Colour_Blue(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def blue(self) -> float:\n return self._blue", "def GetBlue(self):\n return _itkRGBAPixelPython.itkRGBAPixelUS_GetBlue(self)", "def GetBlue(self):\n return _itkRGBAPixelPython.itkRGBAPixelUC_GetBlue(self)", "def brightness(self):\n return self.get_value('bri')", "def red(self) -...
[ "0.8360991", "0.7828259", "0.7804095", "0.715824", "0.70967966", "0.7013391", "0.67761195", "0.66233706", "0.6564048", "0.6564048", "0.6564048", "0.6553123", "0.65057445", "0.6501531", "0.6494562", "0.64891136", "0.64711106", "0.647068", "0.6453906", "0.6440137", "0.6440137",...
0.67454803
7
Alpha(self) > byte Returns the Alpha value.
def Alpha(*args, **kwargs): return _gdi_.Colour_Alpha(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Alpha(self):\r\n return self._alpha", "def alpha(self):\n return self._alpha", "def alpha(self):\n return self._alpha", "def alpha(self):\n return self._alpha", "def alpha(self) -> float:\n return self._alpha", "def alpha(self):\r\n return self.unif[17]", "def ...
[ "0.75611216", "0.74258167", "0.74258167", "0.74258167", "0.7183002", "0.6880723", "0.68146104", "0.6781412", "0.66782963", "0.6608341", "0.66038847", "0.65611136", "0.64354295", "0.63395745", "0.6332305", "0.632867", "0.6283668", "0.6079907", "0.6073131", "0.6004454", "0.5996...
0.59792006
22
IsOk(self) > bool Returns True if the colour object is valid (the colour has been initialised with RGB values).
def IsOk(*args, **kwargs): return _gdi_.Colour_IsOk(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsOk(*args, **kwargs):\n return _gdi_.Brush_IsOk(*args, **kwargs)", "def rgb(self) -> bool:\n return self.image_shape[2] == 3", "def test_is_valid_rgb_color(self):\n self.assertTrue(is_valid_rgb_color('rgb(12,23,5)'))\n self.assertTrue(is_valid_rgb_color('rgb(12, 223, 225)'))\n ...
[ "0.6876855", "0.6758176", "0.6754378", "0.65324205", "0.6523505", "0.64940333", "0.6406349", "0.63958144", "0.63725483", "0.63427854", "0.6336074", "0.6316362", "0.62981033", "0.62848824", "0.62828475", "0.6279045", "0.6268882", "0.618127", "0.61620384", "0.6102551", "0.60988...
0.80903614
0
GetRGBA(self) > unsigned int
def GetRGBA(*args, **kwargs): return _gdi_.Colour_GetRGBA(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def color(self):\n return self._rgba", "def color(self):\n return self._rgba", "def get_rgba(self):\n\n return \"#%02X%02X%02X%02X\" % (self.r, self.g, self.b, self.a)", "def get_rgba(self, index):\n return self._rgba_list[index]", "def opacity(self):\n return self._rgba[...
[ "0.6924718", "0.6924718", "0.68817943", "0.67397", "0.65392005", "0.6519654", "0.6504644", "0.6394937", "0.63619524", "0.629188", "0.6199209", "0.61631554", "0.61416894", "0.60746866", "0.60315526", "0.59896207", "0.5985414", "0.59735626", "0.596307", "0.5927172", "0.5911945"...
0.76160216
0
__eq__(self, PyObject other) > bool Compare colours for equality.
def __eq__(*args, **kwargs): return _gdi_.Colour___eq__(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return self.is_red() == other.is_red()", "def __eq__(self, other):\n return type(other) is type(self) and other.color == self.color", "def __eq__(self, other):\n return (\n self.bg_color == other.bg_color and\n self.width == other.width and\...
[ "0.82676995", "0.8139281", "0.78097165", "0.75846905", "0.74298155", "0.7105221", "0.7054447", "0.6922469", "0.6885329", "0.6695798", "0.6667374", "0.6666543", "0.6663763", "0.66339964", "0.66192347", "0.6588205", "0.6578885", "0.65663296", "0.6562701", "0.6562701", "0.655945...
0.7879324
2
__ne__(self, PyObject other) > bool Compare colours for inequality.
def __ne__(*args, **kwargs): return _gdi_.Colour___ne__(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other):\n return bool(self != other)", "def __ne__(self, other):\n return self.x != other.x or self.y != other.y", "def __ne__(self, other):\r\n return not self == other", "def __ne__(self, other):\r\n return not self == other", "def __ne__(self, other):\r\n ...
[ "0.75597334", "0.751513", "0.7507814", "0.7507814", "0.7493127", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "0.7480812", "...
0.0
-1
NamedColour(String colourName) > Colour Constructs a colour object using a colour name listed in ``wx.TheColourDatabase``, or any string format supported by the wxColour typemaps.
def NamedColour(*args, **kwargs): val = _gdi_.new_NamedColour(*args, **kwargs) return val
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_name (name_str):\n if name_str in colour_names:\n return Colour(*colour_names[name_str])\n raise KeyError(\"'%s' is not a recognized colour name\"%name_str)", "def SetFromString(self, colourName):\n c = wx.NamedColour(colourName)\n self.Set(c.red, c.green, c.blue, c.alpha)", ...
[ "0.72774285", "0.71628475", "0.6177496", "0.5771097", "0.5688058", "0.5661082", "0.5630128", "0.5615744", "0.5597888", "0.55686986", "0.5516458", "0.5435619", "0.54257756", "0.54202664", "0.5400199", "0.53235954", "0.5322593", "0.5309801", "0.52484065", "0.5241951", "0.523712...
0.7677154
0
__eq__(self, Pen other) > bool
def __eq__(*args, **kwargs): return _gdi_.Pen___eq__(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return self.is_red() == other.is_red()", "def __eq__(self, other):\n result = False\n if isinstance(other, Shape) and (self.area == other.area):\n return True\n else:\n return False", "def __eq__(self, other):\n return type(oth...
[ "0.78648907", "0.7734359", "0.7655563", "0.76111764", "0.76056176", "0.76056176", "0.7568113", "0.7537957", "0.74997926", "0.7490624", "0.7483562", "0.7483562", "0.7471575", "0.7470777", "0.74596655", "0.7428628", "0.7418744", "0.7415011", "0.7409507", "0.74067384", "0.740568...
0.7506087
8
__ne__(self, Pen other) > bool
def __ne__(*args, **kwargs): return _gdi_.Pen___ne__(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other):\n return self.point != other.point", "def __ne__(self, other):\n return bool(self != other)", "def __ne__(self, other):\n return self.x != other.x or self.y != other.y", "def __ne__(self: _TT, other: object) -> bool:\n return self.ne(other) # type: ignore...
[ "0.8078264", "0.80067253", "0.7948071", "0.7916113", "0.79153347", "0.78729916", "0.787184", "0.78698087", "0.78698087", "0.78698087", "0.78665113", "0.78665113", "0.7863369", "0.7863369", "0.7863369", "0.7863369", "0.7863369", "0.7863369", "0.7863369", "0.7863369", "0.786336...
0.0
-1
SetColour(self, Colour col) Set the brush's `wx.Colour`.
def SetColour(*args, **kwargs): return _gdi_.Brush_SetColour(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setColour(self, col):\n\t\tself.colour = col", "def SetColour(self, colour):\r\n\r\n self._colour = colour\r\n return self", "def SetBackgroundColour(self, colBack):\r\n \r\n self._colBack = colBack", "def setPenColor( self, color ):\n self._penColor = QColor(color)\n ...
[ "0.8048862", "0.7054648", "0.6635376", "0.66098154", "0.64419276", "0.64187664", "0.63748777", "0.6275615", "0.6270528", "0.6241375", "0.62110144", "0.6209929", "0.61823326", "0.6168987", "0.61632437", "0.6161342", "0.61604416", "0.6121756", "0.6073037", "0.6054079", "0.60343...
0.7555037
1
GetStipple(self) > Bitmap Returns the stiple `wx.Bitmap` of the brush. If the brush does not have a wx.STIPPLE style, then the return value may be nonNone but an uninitialised bitmap (`wx.Bitmap.Ok` returns False).
def GetStipple(*args, **kwargs): return _gdi_.Brush_GetStipple(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PaneCreateStippleBitmap():\r\n\r\n data = [0, 0, 0, 192, 192, 192, 192, 192, 192, 0, 0, 0]\r\n img = wx.EmptyImage(2, 2)\r\n counter = 0\r\n \r\n for ii in xrange(2):\r\n for jj in xrange(2):\r\n img.SetRGB(ii, jj, data[counter], data[counter+1], data[counter+2])\r\n ...
[ "0.67806125", "0.64842", "0.61410284", "0.6021668", "0.5848265", "0.5820336", "0.5598087", "0.55719906", "0.55142915", "0.5505591", "0.53995776", "0.53440714", "0.5331159", "0.5287365", "0.52762973", "0.5154474", "0.5144719", "0.5106981", "0.50257784", "0.49986795", "0.497664...
0.76203763
0
IsOk(self) > bool Returns True if the brush is initialised and valid.
def IsOk(*args, **kwargs): return _gdi_.Brush_IsOk(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsOk(self):\r\n \r\n return self.window != None", "def IsOk(self):\r\n \r\n return True", "def IsOk(*args, **kwargs):\n return _gdi_.Colour_IsOk(*args, **kwargs)", "def is_brush(self) -> bool:\n return len(self.solids) > 0", "def valid(self) -> bool:\n p...
[ "0.70515454", "0.6956906", "0.68219525", "0.67729735", "0.6763273", "0.6647551", "0.664633", "0.6606386", "0.65801877", "0.6491887", "0.6479505", "0.6476512", "0.64426225", "0.64426225", "0.64242995", "0.64103407", "0.6350292", "0.63286513", "0.631022", "0.6290608", "0.628882...
0.7974967
0
BrushFromBitmap(Bitmap stippleBitmap) > Brush Constructs a stippled brush using a bitmap.
def BrushFromBitmap(*args, **kwargs): val = _gdi_.new_BrushFromBitmap(*args, **kwargs) return val
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetStipple(*args, **kwargs):\n return _gdi_.Brush_SetStipple(*args, **kwargs)", "def PaneCreateStippleBitmap():\r\n\r\n data = [0, 0, 0, 192, 192, 192, 192, 192, 192, 0, 0, 0]\r\n img = wx.EmptyImage(2, 2)\r\n counter = 0\r\n \r\n for ii in xrange(2):\r\n for jj in xrange(2):\r\n...
[ "0.64376104", "0.61592376", "0.6014531", "0.5758842", "0.5620219", "0.5344383", "0.5287982", "0.52606094", "0.5164921", "0.5136527", "0.5125119", "0.5107796", "0.5097363", "0.5091848", "0.4872215", "0.48566565", "0.48028538", "0.47844753", "0.47700003", "0.47232684", "0.47123...
0.7732359
0
GetWidth(self) > int Gets the width of the bitmap in pixels.
def GetWidth(*args, **kwargs): return _gdi_.Bitmap_GetWidth(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def width(self) -> int:\n return self._image_data.width", "def getWidth(self):\n return _tkCall(self.image.width)", "def getWidth(self):\n return self._image.width()", "def getWidth(self) -> int:\n ...", "def getWidth(self):\n return self.width", "def getWidth(self):\n ...
[ "0.8079931", "0.8033149", "0.789915", "0.7689316", "0.7645315", "0.7645315", "0.7620828", "0.7596558", "0.7545207", "0.75346327", "0.75022703", "0.7453529", "0.7453529", "0.7453529", "0.7446264", "0.74311316", "0.7396919", "0.73814934", "0.7375884", "0.7375884", "0.7375884", ...
0.7807338
3
SetMask(self, Mask mask) Sets the mask for this bitmap.
def SetMask(*args, **kwargs): return _gdi_.Bitmap_SetMask(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setMask(self, mask):\n self.mask = mask", "def set_mask(self, mask):\n self.mask = mask", "def mask(self, mask):\n\n self._mask = mask", "def mask(self, mask):\n\n self._mask = mask", "def set_mask(self, mask):\n self.mask = self._image_to_vector(mask)\n\n # PC...
[ "0.84236276", "0.8164809", "0.7762064", "0.7762064", "0.7280294", "0.67731804", "0.66524476", "0.65826935", "0.6562874", "0.6529224", "0.6339412", "0.629984", "0.6246021", "0.6238461", "0.61695683", "0.6158018", "0.6096771", "0.58663183", "0.5719435", "0.5639755", "0.5575068"...
0.80040294
2
SetMaskColour(self, Colour colour) Create a Mask based on a specified colour in the Bitmap.
def SetMaskColour(*args, **kwargs): return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetMask(*args, **kwargs):\n return _gdi_.Bitmap_SetMask(*args, **kwargs)", "def set_color(mask: int, position: int, color: int):\n return mask | (color << (position << 1))", "def setMask(self, mask):\n self.mask = mask", "def set_mask(self, mask):\n self.mask = mask", "d...
[ "0.7112309", "0.6748335", "0.6342155", "0.6330602", "0.62169594", "0.5956002", "0.5956002", "0.57333094", "0.55756867", "0.5564996", "0.54423314", "0.54279685", "0.5405677", "0.53333783", "0.5309479", "0.5265764", "0.525834", "0.52348965", "0.52335083", "0.52270615", "0.52098...
0.8239239
0
Copy data from a RGBA buffer object to replace the bitmap pixel data. This method is now just a compatibility wrapper around CopyFromBuffer.
def CopyFromBufferRGBA(self, buffer): self.CopyFromBuffer(buffer, wx.BitmapBufferFormat_RGBA)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BitmapFromBufferRGBA(width, height, dataBuffer):\n return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)", "def _BitmapFromBufferRGBA(*args, **kwargs):\n return _gdi_._BitmapFromBufferRGBA(*args, **kwargs)", "def CopyFromBuffer(*args, **kwargs):\n return _gdi_.Bitmap_CopyFromBuffer(*args...
[ "0.7381187", "0.71780235", "0.7085007", "0.6738986", "0.65923333", "0.6477102", "0.6151017", "0.56326365", "0.5416035", "0.5376735", "0.5375446", "0.5372396", "0.5256919", "0.52019227", "0.5142026", "0.50957084", "0.50822353", "0.5066097", "0.50261796", "0.501141", "0.5006464...
0.7962538
0
__eq__(self, Bitmap other) > bool
def __eq__(*args, **kwargs): return _gdi_.Bitmap___eq__(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return (\n self.bleed == other.bleed and\n self.width == other.width and\n self.height == other.height\n )", "def __eq__(self, other):\n if not isinstance(other, ImageInfo):\n return False\n\n return self.__dict__ ...
[ "0.7730994", "0.76399964", "0.7496171", "0.740459", "0.736399", "0.73470855", "0.73205304", "0.72873366", "0.72483397", "0.72476393", "0.72476393", "0.72228634", "0.7198883", "0.7166543", "0.71434087", "0.71414435", "0.71171105", "0.71131706", "0.7108498", "0.71039474", "0.71...
0.8237517
0