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 operator for the polarizer grid. | def get_polarizer_operator(self):
return BlockDiagonalOperator(
[self.instrument.get_polarizer_operator(
self.sampling[b], self.scene) for b in self.block], axisin=1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_operator(self):\n if len(self) == 1:\n return self[0].get_operator()\n op = np.array(self._get_array_of_operators())\n return np.sum(op, axis=0)",
"def my_operator(self):\n return self._my_operator",
"def operator(self):\n return self.__operator",
"def op... | [
"0.70430475",
"0.68891877",
"0.67827016",
"0.678073",
"0.678073",
"0.66216",
"0.6613094",
"0.6610686",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0.6591329",
"0... | 0.68363917 | 2 |
Return a BlockRowOperator of subacquisition operators In polychromatic mode it is only applied to produce the TOD To reconstruct maps one should use the get_operator function | def get_operator_to_make_TOD(self):
if len(self) == 1:
return self.get_operator()
op = self._get_array_of_operators()
return BlockRowOperator(op, new_axisin=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_operator(self):\n\n Operator = []\n\n '''\n print('Create H - 150 & 220 GHz')\n ope=[]\n for i in range(self.nfreqs):\n ope.append(self.H150.operands[i])\n for i in range(self.nfreqs):\n ope.append(self.H220.operands[i])\n ... | [
"0.6582323",
"0.5664098",
"0.5497829",
"0.54656965",
"0.5418189",
"0.53835905",
"0.5380627",
"0.5343691",
"0.53428006",
"0.5341749",
"0.5302856",
"0.5300078",
"0.52490175",
"0.51784503",
"0.51574665",
"0.51479876",
"0.5144163",
"0.51077867",
"0.5062911",
"0.5054761",
"0.50000... | 0.6700118 | 0 |
Return fusion observation as a sum of monochromatic fusion TODs | def get_observation(self, m=None, convolution=True, noiseless=False):
H = self.get_operator()
if convolution and m is None:
raise ValueError('Define the map, if you want to use convolution option')
p = self.planck
if m is None:
m = p._true_sky
tod_shape ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fruit_ms(x):\r\n return sum([Feature(y, 'fruit') for y in metamer(x) if Feature(y, 'fruit')])",
"def fruit_ram_ms(x):\r\n return sum([fruit_ms(y) for y in Sons(x)])",
"def tf1(self, collection_stats, tf, df, doclen):\r\n return np.sum(tf, axis=0)",
"def _sum_ft(tensor):\n return tensor.sum(di... | [
"0.58524275",
"0.57378066",
"0.5402836",
"0.5347862",
"0.5317468",
"0.53142583",
"0.52878153",
"0.5237219",
"0.5227384",
"0.5219688",
"0.5216914",
"0.5175463",
"0.51387465",
"0.5118143",
"0.50832486",
"0.5065385",
"0.5032975",
"0.503121",
"0.5016331",
"0.50079954",
"0.4976499... | 0.0 | -1 |
r"""User friendly representation of the object. | def to_string(self):
return FeatureSelectionAlgorithm.to_string(self).format(
name=self.Name,
args=self._parameters_to_string(self.__select_k_best.get_params()),
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__(self):\n return str(self.__dict__['_obj'])",
"def __str__(self):\n return str(self.obj)",
"def __str__(self):\n return \"<%s: %s>\" % (self.__class__, self.describe())",
"def __str__(self):\n return str(self.__dict__)",
"def __str__(self):\n return str... | [
"0.82825255",
"0.81912386",
"0.810611",
"0.80742675",
"0.80742675",
"0.80413765",
"0.78911436",
"0.78572714",
"0.78572714",
"0.78572714",
"0.78572714",
"0.78572714",
"0.7837256",
"0.7837256",
"0.7837256",
"0.7837256",
"0.7837256",
"0.78282624",
"0.78249973",
"0.78185266",
"0.... | 0.0 | -1 |
Return a string of yyyymmdd | def get_hundred_days_end_date():
days = timedelta(days=100)
return str(start_100days + days) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def date_string(date):\n day = date.day\n month = date.month\n year = date.year\n formatted_string = str(month) + \"/\"\n formatted_string += str(day) + \"/\"\n formatted_string += str(year)\n return formatted_string",
"def string_date(mnthDay, year):\n return(mnthDay + '/' + str(year))",... | [
"0.7528554",
"0.75284827",
"0.74983245",
"0.7497909",
"0.7497909",
"0.72311854",
"0.71115863",
"0.70839596",
"0.708211",
"0.7054959",
"0.70416725",
"0.70331466",
"0.70206845",
"0.70001286",
"0.69369537",
"0.6928049",
"0.6860247",
"0.68497235",
"0.68336797",
"0.6806661",
"0.68... | 0.0 | -1 |
Return the int number of days | def get_days_between_pb_start_first_joint_pycon():
deltadays = pycon_date - pybites_founded
return deltadays.days | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_number_days(self):\r\n return 1",
"def days(self):\n return int(self.hours / 24)",
"def get_number_days(self):\r\n raise NotImplementedError",
"def days(self) -> Optional[int]:\n return pulumi.get(self, \"days\")",
"def calculate_days(time):\n return int(time / 86400)... | [
"0.8572998",
"0.79770666",
"0.78697264",
"0.7768571",
"0.77367055",
"0.7435355",
"0.7410059",
"0.73998773",
"0.7327887",
"0.7300378",
"0.7300378",
"0.722814",
"0.7210647",
"0.71758914",
"0.7134838",
"0.7130534",
"0.7106202",
"0.7003841",
"0.6971776",
"0.6958325",
"0.6902935",... | 0.0 | -1 |
calculates a sigmoid function | def sigmoid(self, x):
return 1 / (1 + np.exp(-x)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sigmoid(x):\n return 1 / (1 + math.exp(-x))",
"def sigmoid(x):\n\treturn 1 / (1 + m.exp(-x))",
"def sigmoid(x):\n return 1 / (1 + exp(-x))",
"def sigmoid(x):\n return 1 / (1 + exp(-x))",
"def sigmoid(x):\n return 1 / (1 + math.exp(-x))",
"def sigmoid(x):\n\n return 1 / (1 + math.exp(-x))... | [
"0.8646641",
"0.86406386",
"0.86378765",
"0.86378765",
"0.8597351",
"0.85938567",
"0.85938567",
"0.8583322",
"0.8556888",
"0.85318637",
"0.85318637",
"0.85318637",
"0.85318637",
"0.85318637",
"0.85318637",
"0.8509241",
"0.8507188",
"0.8505707",
"0.84993243",
"0.8494487",
"0.8... | 0.8091329 | 65 |
Get styles out of a formatter, where everything has the correct prefix. | def _get_styles(formatter: HtmlFormatter, *, prefix: str) -> Iterator[str]:
for line in formatter.get_linenos_style_defs():
yield f"{prefix} {line}"
yield from formatter.get_background_style_defs(prefix)
yield from formatter.get_token_style_defs(prefix) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_formatter(style):\n if style == 'authoryear':\n return AuthorYearFormatter\n return AuthorYearFormatter",
"def _get_format_from_style(self, token, style):\n result = QtGui.QTextCharFormat()\n for key, value in style.style_for_token(token).items():\n if value:\n ... | [
"0.6696193",
"0.6405997",
"0.6034949",
"0.59751546",
"0.58583164",
"0.5829511",
"0.5816382",
"0.57358086",
"0.57266366",
"0.5668462",
"0.5643592",
"0.55237997",
"0.5517571",
"0.54743475",
"0.54478335",
"0.5434788",
"0.54086673",
"0.5315717",
"0.5301493",
"0.5300177",
"0.52940... | 0.7778675 | 0 |
Point the camera at the centre of the cell. | def setCameraToCell(self):
ref = self.getRefState()
if ref is None:
return
dims = ref.cellDims
# set camera to lattice
campos = [0] * 3
if dims[1] > dims[2]:
campos[0] = -3.0 * dims[1]
else:
campos[0] = -3.0 * dims[2]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def centerCamera(self):\n self.camera = (self.width / 2, self.height / 2)",
"def center_mario(self):\n self.rect.midbottom = self.screen_rect.midbottom\n self.x, self.y = float(self.rect.x), float(self.rect.y)",
"def center(self):\n if self.pos != 0.0:\n self.pos = 0.0",
... | [
"0.780753",
"0.732937",
"0.72850996",
"0.7146421",
"0.70230055",
"0.6959775",
"0.67622346",
"0.67622346",
"0.6737572",
"0.67267084",
"0.67267084",
"0.67267084",
"0.67206216",
"0.6703538",
"0.669342",
"0.6666944",
"0.665443",
"0.66465384",
"0.6641531",
"0.6618657",
"0.66151196... | 0.7355215 | 1 |
Point the camera at the centre of mass. | def setCameraToCOM(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def centerCamera(self):\n self.camera = (self.width / 2, self.height / 2)",
"def center(self, center_mass=False):\n if center_mass:\n com = self.center_of_mass\n self.xyz -= com\n else:\n self.xyz -= self.xyz.mean(0)",
"def center_of_mass(self, matrix):\n ... | [
"0.7743229",
"0.7141701",
"0.70155215",
"0.6980621",
"0.685814",
"0.6846284",
"0.6844954",
"0.6709921",
"0.66710997",
"0.66628367",
"0.66584766",
"0.6655692",
"0.66074437",
"0.6564448",
"0.6562138",
"0.65004236",
"0.64958143",
"0.6489465",
"0.64490277",
"0.64442885",
"0.64273... | 0.0 | -1 |
raising a number to exponenn | def raises(number, exponent):
if exponent == 0:
return 1
else:
return number * raises(number, exponent - 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Exp(num):\n return math.exp(float(num))",
"def exponential(value):\n return math.exp(value)",
"def exp(x):\n raise NotImplementedError",
"def inverse_exponential(x):\n return math.exp(-x)",
"def fastexp( a, n ):\n if n == 0: return 1\n elif n % 2 == 1: return a*fastexp(a,n... | [
"0.78280216",
"0.76482785",
"0.75788146",
"0.71114165",
"0.7061411",
"0.7031399",
"0.68287295",
"0.6822484",
"0.68212783",
"0.6796499",
"0.67596805",
"0.67539984",
"0.66970176",
"0.6651049",
"0.66305697",
"0.65602416",
"0.6544009",
"0.6529421",
"0.65166837",
"0.6483637",
"0.6... | 0.63276863 | 27 |
Split train dataset into X and y by passing list of desired columns | def Xy_split_list(self, y_metric, col_list):
# create the X variable based on column list
self.X = self.data[col_list]
# create the y variable based on input metric, if it exists
if y_metric in self.data.columns:
self.y = self.data[y_metric]
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def perform_data_split(X, y, training_idxs, test_idxs, val_idxs):\n X_train = X[training_idxs]\n X_test = X[test_idxs]\n #X_val = X[val_idxs]\n\n y_train = y[training_idxs]\n y_test = y[test_idxs]\n #y_val = y[val_idxs]\n\n return X_train, X_test, y_train, y_test,",
"def data_split(X, y):\n ... | [
"0.7198157",
"0.713138",
"0.7038712",
"0.69158757",
"0.68984556",
"0.6842339",
"0.6835195",
"0.6789707",
"0.67878646",
"0.6786712",
"0.6779915",
"0.6711501",
"0.66950774",
"0.66950774",
"0.665502",
"0.6649239",
"0.6612558",
"0.6581828",
"0.65677565",
"0.654051",
"0.65145755",... | 0.65377545 | 20 |
Compute the covariance function for a powerlaw Result is in units of (sec)^2. | def PL_covfunc(tau, amp, alpha=-2.0/3.0, fL=1.0/(year*20)):
fL = fL * year
x = 2 * np.pi * fL * np.abs(tau) / year
cf = ss.gamma(-2+2*alpha) * np.cos(np.pi*alpha)
power = cf * x**(2-2*alpha)
ksum = ss.hyp1f2(alpha-1,0.5,alpha,-0.25*x**2)[0]/(2*alpha-2)
corr = -(year**2 * fL**(-2+2*alpha)) / (12 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cov(self):\n cov_ = np.dot(self.weights * self.demeaned.T, self.demeaned)\n cov_ /= self.sum_weights - self.ddof\n return cov_",
"def cov(self):\n E_x = Sample.mean(self)\n Std_x = Sample.std(self)\n cov = Std_x/E_x\n return(cov)",
"def estimateCovariance(df... | [
"0.67396116",
"0.6646332",
"0.6444474",
"0.6416092",
"0.6403369",
"0.6310863",
"0.6298212",
"0.62839377",
"0.628191",
"0.62602764",
"0.62505424",
"0.6237298",
"0.6230949",
"0.6224735",
"0.6186808",
"0.61808866",
"0.6166202",
"0.61642665",
"0.6158584",
"0.61526877",
"0.6122950... | 0.6151613 | 20 |
Reads stderr file content or the error state field. | def get_stderr(self):
_ = self.get() # force finished wait
if self._stderr is not None:
if wait_until_exists(self._stderr):
with open(self._stderr) as f:
self._err = f.read()
return self._err | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __readStderr(self):\n if self.process is not None:\n self.errorGroup.show()\n s = str(self.process.readAllStandardError(),\n Preferences.getSystem(\"IOEncoding\"),\n 'replace')\n self.errors.insertPlainText(s)\n self.error... | [
"0.7099433",
"0.6235756",
"0.6108125",
"0.6089673",
"0.6088537",
"0.59939826",
"0.5943536",
"0.5916594",
"0.5828104",
"0.57771593",
"0.57298183",
"0.57228494",
"0.57031417",
"0.56854063",
"0.56671053",
"0.56650126",
"0.5602677",
"0.5568929",
"0.55351883",
"0.55087775",
"0.549... | 0.64709383 | 1 |
Create a Finite Random Variable given a dict representing the density. Returns a RandomSymbol. >>> from sympy.stats import FiniteRV, P, E | def FiniteRV(density, symbol=None):
return SingleFinitePSpace.fromdict(density, symbol).value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RandomVar(shape, name=None):\n return variable_v1.VariableV1(\n random_ops.random_uniform(shape), dtype=dtypes.float32, name=name)",
"def DiscreteUniform(items, symbol=None):\n return DiscreteUniformPSpace(items, symbol).value",
"def from_dict(p: GenoDistribDict) -> GenoDistrib:\n keys = [\"a\"... | [
"0.5599292",
"0.54055536",
"0.5352963",
"0.5304359",
"0.53008205",
"0.52228403",
"0.5219061",
"0.5173755",
"0.51504135",
"0.50974834",
"0.50945467",
"0.5079576",
"0.5078375",
"0.50674886",
"0.5042596",
"0.503078",
"0.50178754",
"0.50127965",
"0.49684697",
"0.49653086",
"0.493... | 0.6947287 | 0 |
Create a Finite Random Variable representing a hypergeometric distribution. Returns a RandomSymbol. Examples ======== >>> from sympy.stats import Hypergeometric, Density >>> from sympy import S >>> X = Hypergeometric(10, 5, 3) 10 marbles, 5 white (success), 3 draws >>> Density(X) | def Hypergeometric(N, m, n, symbol=None):
return HypergeometricPSpace(N, m, n, symbol).value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def define_variable(alpha=0., beta=1., shape=None, rand_gen=None,\n dtype=None, ctx=None):\n dist = Gamma(alpha=alpha, beta=beta, rand_gen=rand_gen,\n dtype=dtype, ctx=ctx)\n dist._generate_outputs(shape=shape)\n return dist.random_variable",
"def G... | [
"0.6115232",
"0.5981308",
"0.57513463",
"0.542732",
"0.53782386",
"0.5353187",
"0.5326692",
"0.5291",
"0.52800685",
"0.52674705",
"0.5261637",
"0.5244441",
"0.5214276",
"0.52085257",
"0.519458",
"0.5179511",
"0.51769954",
"0.5165592",
"0.5165592",
"0.5146826",
"0.514437",
"... | 0.53618944 | 5 |
Calculate the great circle distance between two points on the earth (specified in decimal degrees) | def haversine(lon1, lat1, lon2, lat2):
# convert decimal degrees to radians
lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])
# haversine formula
dlon = lon2 - lon1
dlat = lat2 - lat1
a = math.sin(dlat/2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon/2)**2
c = 2 * ma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def great_circle(lat_1, long_1, lat_2, long_2):\n long_1 = m.radians(long_1)\n lat_1 = m.radians(lat_1)\n long_2 = m.radians(long_2)\n lat_2 = m.radians(lat_2)\n\n d = 2 * 6367.45 * m.asin(\n m.sqrt(haversine(lat_2 - lat_1)\n + m.cos(lat_1)*m.cos(lat_2) *\n haversine(long... | [
"0.8146851",
"0.78653836",
"0.7633587",
"0.760638",
"0.7597363",
"0.7595882",
"0.7594262",
"0.7571903",
"0.7563977",
"0.7557409",
"0.7529731",
"0.7516804",
"0.7494894",
"0.74672914",
"0.74524754",
"0.7434426",
"0.7391925",
"0.735819",
"0.73490065",
"0.7331919",
"0.73290455",
... | 0.0 | -1 |
Creates a LabeledCData object and makes sure the dimensions are correct. | def test_basic_labeled_cdata(self):
data = array([[1, 0, 0], [0, 1, 0]])
labels = array([1, 0])
lcdata = LabeledCData(data, labels)
self.assertEqual(lcdata.num_features, 3)
self.assertEqual(lcdata.num_samples, 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_basic_labeling(self):\n # data with only 1 feature\n data = array([[-1], [1], [0.5], [0.25], [-0.33], [0]])\n # give 1 if feature value >= 0; otherwise 0\n labels = array([0, 1, 1, 1, 0, 1])\n cdata = LabeledCData(data, labels)\n\n # ensure that labelling is corre... | [
"0.7037753",
"0.64838207",
"0.63272554",
"0.6307101",
"0.6180454",
"0.58087355",
"0.5542757",
"0.54886055",
"0.54873013",
"0.54513514",
"0.5352525",
"0.5338313",
"0.53361464",
"0.52955073",
"0.5285849",
"0.52377427",
"0.523346",
"0.5211097",
"0.52090925",
"0.51976126",
"0.516... | 0.79721266 | 0 |
Tests standardization method of scale_features. | def test_scale_features_standardize(self):
data = array([[0.564, 20.661], [-18.512, 41.168], [-0.009, 20.440]])
cdata = CData(data)
# correct answer computed in Mathematica
# TODO: can we compute the right answer in Python?
answer = array([[0.60355, -0.568043], [-1.1543, 1.15465... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def standard_scale(X_train, X_test):\n preprossor = StandardScaler().fit(X_train)\n X_train = preprossor.transform(X_train)\n X_test = preprossor.transform(X_test)\n return X_train, X_test",
"def standardize(X_train_input, X_test_input):\r\n from sklearn.preprocessing import StandardScaler\r\n ... | [
"0.73794323",
"0.7034011",
"0.7013087",
"0.6970039",
"0.69317853",
"0.69081324",
"0.6865197",
"0.67690766",
"0.67475396",
"0.6725008",
"0.6690181",
"0.6668056",
"0.6665347",
"0.6648154",
"0.664761",
"0.66337186",
"0.66106176",
"0.6592104",
"0.6578315",
"0.65753675",
"0.657395... | 0.8344492 | 0 |
Tests padding vectors of three features with zeros until the vectors have four features. | def test_pad_to_power2(self):
# Define some data with three features
data = array([[1, 2, 3],
[4, 5, 6]])
# Get a CData object
cdata = CData(data)
# Pad it until the dimension is a power of two
cdata.pad_to_power2()
# Define the correct ar... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_pad_one(self):\n # Define some data with three features\n data = array([[1, 2],\n [3, 4]])\n\n # Get a CData object\n cdata = CData(data)\n\n # Pad a zero to each feature vector\n cdata.pad_one()\n\n # Define the correct array\n ... | [
"0.65054876",
"0.6240834",
"0.60526586",
"0.5994951",
"0.59441113",
"0.5924362",
"0.58775795",
"0.586782",
"0.58267987",
"0.58114374",
"0.57860494",
"0.5735148",
"0.57337934",
"0.5724143",
"0.5643416",
"0.5610141",
"0.5588683",
"0.5578492",
"0.55617815",
"0.55547076",
"0.5520... | 0.0 | -1 |
Tests padding with a 33 element feature vector to get to a 64 element feature vector. | def test_to_power2_medium(self):
# Define some data
data = array([[0]*33, [1]*33])
# Get a LabeledCData object
lcdata = LabeledCData(data, labels=[0, 1])
# Pad the data
lcdata.pad_to_power2()
self.assertEqual(lcdata.num_features, 64)
self.assertTrue(all... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pad_to_match(feature, target_length, rank, constant_values):\n padding_list = []\n target_length = tf.maximum(target_length, tf.shape(feature)[1])\n for r in range(rank):\n if r == 1:\n padding_list.append([0, target_length - tf.shape(feature)[1]])\n else:\n ... | [
"0.6233043",
"0.6118274",
"0.6021943",
"0.59728813",
"0.5908438",
"0.5907502",
"0.58958614",
"0.5834198",
"0.5814734",
"0.5811504",
"0.5808066",
"0.5802462",
"0.5781138",
"0.57694",
"0.5764214",
"0.5764064",
"0.5746711",
"0.5746591",
"0.5725205",
"0.5715819",
"0.5713179",
"... | 0.0 | -1 |
The set of arguments for constructing a Container resource. | def __init__(__self__, *,
power: pulumi.Input[str],
scale: pulumi.Input[int],
service_name: pulumi.Input[str],
container_service_deployment: Optional[pulumi.Input['ContainerServiceDeploymentArgs']] = None,
is_disabled: Optional[pulumi.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _create_container_args(kwargs):\n # Copy over kwargs which can be copied directly\n create_kwargs = {}\n for key in copy.copy(kwargs):\n if key in RUN_CREATE_KWARGS:\n create_kwargs[key] = kwargs.pop(key)\n host_config_kwargs = {}\n for key in copy.copy(kwargs):\n if key... | [
"0.6008694",
"0.59124887",
"0.5807097",
"0.5803984",
"0.5803404",
"0.5737139",
"0.5697635",
"0.5657928",
"0.5655926",
"0.5642725",
"0.5619689",
"0.5581132",
"0.55597395",
"0.5546522",
"0.5541862",
"0.554072",
"0.5523639",
"0.5521586",
"0.5521495",
"0.55157614",
"0.5515268",
... | 0.54778403 | 30 |
The name for the container service. | def service_name(self) -> pulumi.Input[str]:
return pulumi.get(self, "service_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def container_name(self):\n prefix = get_service_prefix('core' if self.core else 'service')\n return f'{prefix}{self.data.get(\"name\")}'",
"def service_name(self) -> str:\n return pulumi.get(self, \"service_name\")",
"def service_name(self) -> str:\n return pulumi.get(self, \"servi... | [
"0.8641277",
"0.8303179",
"0.8303179",
"0.8101795",
"0.8067195",
"0.8067195",
"0.8067195",
"0.7907293",
"0.7907293",
"0.7857109",
"0.76276505",
"0.7605207",
"0.7574515",
"0.7574515",
"0.7574515",
"0.7221619",
"0.72057",
"0.7198518",
"0.712527",
"0.7113369",
"0.70488256",
"0... | 0.7888406 | 11 |
A Boolean value to indicate whether the container service is disabled. | def is_disabled(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "is_disabled") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def disabled(self) -> bool:\n return pulumi.get(self, \"disabled\")",
"def disabled(self) -> bool:\n return pulumi.get(self, \"disabled\")",
"def is_disabled(self) -> pulumi.Output[bool]:\n return pulumi.get(self, \"is_disabled\")",
"def disabled(self) -> pulumi.Output[bool]:\n re... | [
"0.7707675",
"0.7707675",
"0.765171",
"0.7630779",
"0.7596883",
"0.75003284",
"0.75003284",
"0.7349516",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7307241",
"0.7230959",
... | 0.7321294 | 8 |
Get an existing Container resource's state with the given name, id, and optional extra properties used to qualify the lookup. | def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'Container':
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = ContainerInitArgs.__new__(ContainerInitArgs)
__props__.__dict__["contai... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None,\n arn: Optional[pulumi.Input[str]] = None,\n auth_mode: Optional[pulumi.Input[str]] = None,\n default_s3_location: Optional[pulumi.Input[str]] = None,\n ... | [
"0.58693206",
"0.58242166",
"0.58010656",
"0.5754036",
"0.5750827",
"0.57258666",
"0.5715481",
"0.56813085",
"0.5670921",
"0.5658399",
"0.56131154",
"0.560579",
"0.5599341",
"0.55664015",
"0.55485296",
"0.5433859",
"0.5419206",
"0.538533",
"0.53802097",
"0.53747153",
"0.53713... | 0.6232067 | 0 |
A Boolean value to indicate whether the container service is disabled. | def is_disabled(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "is_disabled") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def disabled(self) -> bool:\n return pulumi.get(self, \"disabled\")",
"def disabled(self) -> bool:\n return pulumi.get(self, \"disabled\")",
"def is_disabled(self) -> pulumi.Output[bool]:\n return pulumi.get(self, \"is_disabled\")",
"def disabled(self) -> pulumi.Output[bool]:\n re... | [
"0.7710745",
"0.7710745",
"0.7654624",
"0.76339394",
"0.75034314",
"0.75034314",
"0.7352647",
"0.732427",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0.73105407",
"0... | 0.7599763 | 4 |
The name for the container service. | def service_name(self) -> pulumi.Output[str]:
return pulumi.get(self, "service_name") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def container_name(self):\n prefix = get_service_prefix('core' if self.core else 'service')\n return f'{prefix}{self.data.get(\"name\")}'",
"def service_name(self) -> str:\n return pulumi.get(self, \"service_name\")",
"def service_name(self) -> str:\n return pulumi.get(self, \"servi... | [
"0.8641277",
"0.8303179",
"0.8303179",
"0.8101795",
"0.7907293",
"0.7907293",
"0.7888406",
"0.7888406",
"0.7888406",
"0.7857109",
"0.76276505",
"0.7605207",
"0.7574515",
"0.7574515",
"0.7574515",
"0.7221619",
"0.72057",
"0.7198518",
"0.712527",
"0.7113369",
"0.70488256",
"0... | 0.8067195 | 5 |
The publicly accessible URL of the container service. | def url(self) -> pulumi.Output[str]:
return pulumi.get(self, "url") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def underlying_url(self):\n return 'http://{}:{}'.format(names.azure_url(self.dns_name), self.port)",
"def service_url(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_url\")",
"def url(self):\n return urls.Url(\n path=self.serving_path,\n host=self.po... | [
"0.74695873",
"0.74464566",
"0.7335888",
"0.72396886",
"0.71634495",
"0.7161912",
"0.7130349",
"0.70656234",
"0.70322543",
"0.6991827",
"0.6876161",
"0.6876161",
"0.6870469",
"0.6868169",
"0.6851519",
"0.680901",
"0.680901",
"0.67711246",
"0.6766696",
"0.67606187",
"0.6715551... | 0.65281254 | 33 |
Encode a JWT token based on the claims_set and the settings. If available, registry.settings.jwtauth.private_key is used as key. In this case the algorithm must be an RS or EC algorithm. If registry.settings.jwtauth.private_key is not set, registry.settings.jwtauth.master_secret is used. registry.settings.jwtauth.algor... | def encode_jwt(self, claims_set):
key = self.master_secret
private_key = self.private_key
if self.private_key_file is not None:
with open(self.private_key_file, 'r') as rsa_priv_file:
private_key = rsa_priv_file.read()
if private_key is not None:
k... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def encode(self, payload):\n jwt_payload = payload.copy()\n if self.audience is not None:\n jwt_payload['aud'] = self.audience\n if self.issuer is not None:\n jwt_payload['iss'] = self.issuer\n\n token = jwt.encode(jwt_payload, self.signing_key, algorithm=self.algo... | [
"0.650061",
"0.6350542",
"0.6200813",
"0.6180409",
"0.6106039",
"0.6067537",
"0.6019869",
"0.601826",
"0.60124123",
"0.58672774",
"0.5864117",
"0.5860228",
"0.5856986",
"0.58492136",
"0.58479214",
"0.5834721",
"0.58142084",
"0.5789316",
"0.5785754",
"0.5782817",
"0.57801986",... | 0.7591879 | 0 |
Extract the JWT token from the authorisation header of the request. Returns the JWT token or None, if the token cannot be extracted. | def get_jwt(self, request):
auth_header_prefix = self.auth_header_prefix
try:
authorization = request.authorization
except ValueError:
return None
if authorization is None:
return None
authtype, token = authorization
if authtype.lower()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_token():\n # get authorization header:\n auth = request.headers.get('Authorization', None)\n \n # authorization header should be included:\n if auth is None:\n raise JWTError(\n {\n 'code': 'authorization_header_missing',\n 'description': 'Auth... | [
"0.79776436",
"0.78814834",
"0.76305926",
"0.7420968",
"0.7388142",
"0.73852426",
"0.7361624",
"0.7361086",
"0.73201066",
"0.7234565",
"0.70693856",
"0.7063776",
"0.70104265",
"0.699608",
"0.68887264",
"0.68458277",
"0.6711496",
"0.6668676",
"0.66311234",
"0.66129637",
"0.656... | 0.82285297 | 0 |
Test that `PUT`ting the hook w/o giving a token returns HTTP 401 | def test_no_token_auth_required(self, client):
assert_hook_status(client, status=401) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_put_unauthenticated(self):\n\n url = reverse('file')\n\n data = {}\n\n response = self.client.put(url, data)\n\n self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)",
"def test_update_movie_not_authenticated(self):\n data = {'title': 'The Mask 2'}\n ... | [
"0.7614157",
"0.6983062",
"0.69768745",
"0.6965982",
"0.69511545",
"0.6883869",
"0.68660444",
"0.6850732",
"0.6814594",
"0.67821604",
"0.6762128",
"0.67476153",
"0.67030406",
"0.6677111",
"0.66695327",
"0.66435814",
"0.6567107",
"0.651708",
"0.65093154",
"0.64977294",
"0.6469... | 0.64483434 | 22 |
Test that using a wrong token gets you a HTTP 403 | def test_wrong_token_permission_denied(self, client, token):
with disable_logs(logging.WARNING):
assert_hook_status(client, status=403, token=f"{token}wrong") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_forbidden(self):\n self._error_test(fitbit_exceptions.HTTPForbidden)",
"def test_fail_token(client, request):\n res = client.get('/token?uid=1')\n\n assert res.status_code == 400\n assert 'User does not exist' in res.data.decode('utf-8')",
"def test_unauthorized_request(self):\n ... | [
"0.77414316",
"0.7644356",
"0.75742555",
"0.75406635",
"0.74868166",
"0.747868",
"0.74540323",
"0.740259",
"0.7385596",
"0.7369364",
"0.7330583",
"0.7323837",
"0.73222136",
"0.73161465",
"0.7312763",
"0.72986066",
"0.72986066",
"0.72986066",
"0.72986066",
"0.7266291",
"0.7248... | 0.8365224 | 0 |
End the current sub path, but don't close it. You must call either pen.closePath() or pen.endPath() after each sub path. | def endPath(self) -> None:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _endPath(self):\n self._closePath()\n self._lastCommand = None\n self._lastX = self._lastY = None",
"def _endPath(self):\n #self._closePath()\n self._lastCommand = None\n self._lastX = self._lastY = None",
"def CloseSubpath(*args, **kwargs):\n return _gdi_.G... | [
"0.77831084",
"0.767169",
"0.6443608",
"0.6426933",
"0.63578784",
"0.6333978",
"0.6103484",
"0.6023114",
"0.57907265",
"0.5772074",
"0.5732014",
"0.5681774",
"0.5681774",
"0.5681774",
"0.5609714",
"0.5534267",
"0.55181485",
"0.55099857",
"0.5451709",
"0.54143703",
"0.54037136... | 0.6305541 | 6 |
Add a sub glyph. The 'transformation' argument must be a 6tuple containing an affine transformation, or a Transform object from the | def addComponent(
self,
glyphName: str,
transformation: Tuple[float, float, float, float, float, float],
) -> None:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def addSubGlyph(self, *args):\n return _libsbml.GeneralGlyph_addSubGlyph(self, *args)",
"def addComponent(self, glyphName, transformation):\n from fontTools.pens.transformPen import TransformPen\n\n try:\n glyph = self.glyphSet[glyphName]\n except KeyError:\n if ... | [
"0.74049675",
"0.6154543",
"0.5947581",
"0.58673483",
"0.58494484",
"0.584397",
"0.5730147",
"0.5690391",
"0.56657517",
"0.53792554",
"0.5329161",
"0.5236526",
"0.5205371",
"0.5160498",
"0.51134753",
"0.5086787",
"0.50656265",
"0.5058172",
"0.50202644",
"0.49818704",
"0.49341... | 0.6845593 | 1 |
Gets the version of the Firmware | def getFirmwareVersion(self, board=0):
return self.callModule('admin', board, 0, 'getVersion') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def firmware_version(self):\n return self._get_system_status()[\"firmware\"]",
"def firmware_version(self):\n return self.data.get('fw_ver')",
"def firmware_version(self):\n return self._read(MX_FIRMWARE_VERSION)",
"def get_firmware_version(self):\n cmd = protocol.GET_FIRMWARE_VERSION... | [
"0.8729755",
"0.861756",
"0.84705865",
"0.8358496",
"0.8311532",
"0.8248412",
"0.82446265",
"0.82379824",
"0.82270193",
"0.8128544",
"0.787059",
"0.78259426",
"0.7822249",
"0.77134866",
"0.7683404",
"0.7658978",
"0.76476514",
"0.76112366",
"0.75901604",
"0.75759476",
"0.75367... | 0.81850815 | 9 |
Visualizes and labels the clusters resulting from an analysis. | def visualize_clustering_results(cluster_points: list, labels: list) -> None:
# First, split out the point tuples by label.
points_by_label = defaultdict(list)
for idx, point in enumerate(cluster_points):
points_by_label[labels[idx]].append(point)
# Next, stack the points for each label into a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plot_clusters(self):\n pass",
"def plotClusters(self):\n fig = plt.figure()\n ax = fig.add_subplot(111, projection='3d')\n fig.set_size_inches(18.5, 9.5)\n ax.set_title('Identification of Cluster Particles with Voronoi Volumes', fontsize=22)\n ax.set_xlabel('x [m]', ... | [
"0.7799528",
"0.75204456",
"0.74653286",
"0.72559804",
"0.7111731",
"0.6990109",
"0.69228536",
"0.68576485",
"0.681407",
"0.6761228",
"0.6754532",
"0.6745738",
"0.67130995",
"0.67125785",
"0.6689355",
"0.6623977",
"0.6593363",
"0.65782076",
"0.65100485",
"0.65028924",
"0.6456... | 0.68990695 | 7 |
V is the matrix with the initial velocities in x,y,z direction which have been put to zero. Input | def particle_initial_velocity(fignr,N,D,T,m,dim,kb):
V = np.zeros((3,N))
V[0:dim,:] = np.random.normal(0, kb*T/m, (dim,N))# / np.sqrt(T/(kb*m))
plotfunctions.velocity(fignr,N,V)
# Typical speed for particles
return V | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vel_inicial(x): #Velocidad inicial como un vector de ceros\r\n return np.zeros_like(x)",
"def velocity(self, X, Y):\n self.u = self.Vinf * np.ones_like(X)\n self.v = np.zeros_like(X)",
"def set_zero_vector(self):\n self.vector = np.zeros(self.dimension, dtype = float... | [
"0.75194025",
"0.69482017",
"0.6942899",
"0.6662728",
"0.6579907",
"0.6468008",
"0.64418656",
"0.642287",
"0.6392057",
"0.6379031",
"0.6267738",
"0.6177522",
"0.6172975",
"0.61086875",
"0.6092055",
"0.6073753",
"0.60692114",
"0.60401547",
"0.6020821",
"0.60029495",
"0.5995065... | 0.57713723 | 39 |
V is the matrix with the velocities of the particles, in x,y,z. The V matrix is created using time evolution. | def particle_velocityV(V,F,dt,Rv,sigma,epsilon,D,N):
V += dt/2*(particle_forceV(Rv[-1], N, sigma, epsilon, D) + particle_forceV(Rv[-2], N, sigma, epsilon, D))
return V | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def particle_positionV(R,V,dt,F,D):\n R += (dt*V+dt**2/2*F) \n p = 1\n mn = 0\n R = check_bc(R, D, p, mn)\n return R",
"def fv(X,Y,dx,dy,r2,i,append,L,N,U,dt,close_list,Nlist,vel_verlet_on,R,menu,submenu,n1,grid,G,wallcount,X2):\r\n\r\n \"\"\"JV: append is a boolean. If it's true, adds the ener... | [
"0.6850313",
"0.66610783",
"0.6659849",
"0.6612491",
"0.64220613",
"0.63896286",
"0.6388782",
"0.63752335",
"0.63628525",
"0.6344411",
"0.6313022",
"0.63051414",
"0.6277831",
"0.6267249",
"0.62422824",
"0.61897475",
"0.6153272",
"0.61461395",
"0.6125604",
"0.6107061",
"0.6103... | 0.7404511 | 0 |
The identity block is the block that has no conv layer at shortcut. | def identity_block(input_tensor, kernel_size, filters, stage, block):
filters0, filters1, filters2 = filters
conv_name_base = 'res' + str(stage) + block
bn_name_base = 'bn' + str(stage) + block
add_name = 'add' + str(stage) + "_" + block
relu_name = 'relu' + str(stage) + "_" + block
# Tensors
input_tenso... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identity_block(self, input_tensor, filters, activation, stage, block, start_with_batch_norm = True):\n\n # Set the naming convention\n conv_name_base = 'res' + str(stage) + block + '_branch'\n batch_norm_name_base = 'batch_norm' + str(stage) + block + '_branch'\n\n x_shortcut = inpu... | [
"0.6863723",
"0.6613831",
"0.65261513",
"0.64593554",
"0.64359504",
"0.6433214",
"0.638604",
"0.6383168",
"0.6336141",
"0.63211936",
"0.63197666",
"0.62679076",
"0.62557864",
"0.624875",
"0.62460726",
"0.6225587",
"0.62168217",
"0.61974704",
"0.61882806",
"0.61882806",
"0.612... | 0.60630095 | 26 |
A block that has a conv layer at shortcut. Note that from stage 3, the second conv layer at main path is with strides=(2, 2) And the shortcut should have strides=(2, 2) as well | def conv_block(
input_tensor, kernel_size, filters, stage, block, strides=(2, 2)):
filters0, filters1, filters2 = filters
conv_name_base = 'res' + str(stage) + block
bn_name_base = 'bn' + str(stage) + block
add_name = 'add' + str(stage) + "_" + block
relu_name = 'relu' + str(stage) + "_" + block
# sg.T... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def conv_block(input_tensor, kernel_size, filters, stage, block, strides=(1, 1)):\n # retriving filters\n F1, F2, F3 = filters\n\n # defining name basis\n conv_name_base = 'res' + str(stage) + block + '_branch'\n bn_name_base = 'bn' + str(stage) + block + '_branch'\n\n x_shortcut = input_tensor\n... | [
"0.76759034",
"0.7538227",
"0.74632853",
"0.74268186",
"0.7417754",
"0.74028534",
"0.7355719",
"0.733809",
"0.7316824",
"0.72838753",
"0.72356284",
"0.72352505",
"0.7217274",
"0.7209",
"0.71385396",
"0.71041006",
"0.70639545",
"0.70394063",
"0.7031946",
"0.70305365",
"0.70305... | 0.68165886 | 35 |
Set up sensor entities for the sensors in the tub. | async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
controller = hass.data[DOMAIN][entry.entry_id][SMARTTUB_CONTROLLER]
entities = []
for spa in controller.spas:
entities.extend(
[
SmartTubSensor(c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setup_sensors(self, settings):\n\n for sensor in settings.sensors: # for each sensor listed in yaml file\n s = Sensor(sensor, settings.sensors, settings, self.tiny_image,\n self.send_q)\n self.sensors.append(s) # add it to the list of sensors",
"def setup_... | [
"0.7214077",
"0.70500165",
"0.69763756",
"0.68762535",
"0.6820571",
"0.67822933",
"0.67746687",
"0.6766034",
"0.6686225",
"0.6682069",
"0.6659768",
"0.6610417",
"0.6601996",
"0.6600393",
"0.65962875",
"0.6592374",
"0.6511385",
"0.6467368",
"0.6463674",
"0.6446157",
"0.6419359... | 0.6318377 | 25 |
Return the state attributes. | def extra_state_attributes(self):
return {
ATTR_DURATION: self.cycle.duration,
ATTR_CYCLE_LAST_UPDATED: self.cycle.last_updated.isoformat(),
ATTR_MODE: self.cycle.mode.name.lower(),
ATTR_START_HOUR: self.cycle.start_hour,
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def state_attributes(self):\n return self._attributes",
"def state_attributes(self):\n return self._attributes",
"def device_state_attributes(self):\r\n return self.attributes",
"def device_state_attributes(self):\n return self._state_attrs",
"def device_state_attributes(self):\... | [
"0.8953404",
"0.8953404",
"0.85239846",
"0.8366765",
"0.8366765",
"0.8363429",
"0.83362615",
"0.8334551",
"0.8310377",
"0.8292682",
"0.8289349",
"0.8289349",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.828... | 0.7606334 | 60 |
Return the state attributes. | def extra_state_attributes(self):
return {
ATTR_CYCLE_LAST_UPDATED: self.cycle.last_updated.isoformat(),
ATTR_MODE: self.cycle.mode.name.lower(),
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def state_attributes(self):\n return self._attributes",
"def state_attributes(self):\n return self._attributes",
"def device_state_attributes(self):\r\n return self.attributes",
"def device_state_attributes(self):\n return self._state_attrs",
"def device_state_attributes(self):\... | [
"0.8953404",
"0.8953404",
"0.85239846",
"0.8366765",
"0.8366765",
"0.8363429",
"0.83362615",
"0.8334551",
"0.8310377",
"0.8292682",
"0.8289349",
"0.8289349",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.82871646",
"0.828... | 0.73552984 | 98 |
Warp a 2D image according to a given coordinate transformation. This version of warp integrates across each output pixel area using the QuasiMonte Carlo method. It may produce cleaner results when the warp involves nonlinear stretching. | def warp_qmc(image, inverse_map, map_args={}, output_shape=None, nval=0., n=9, mode='constant', cval=0., preserve_range=False):
#check and sanitize inputs
#if preserve_range:
# image = np.asarray(image, np.double)
#else:
# image = ski.img_as_float(image)
input_shape = np.array(image.shape... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def testTransformBasedWarp(self):\n for interpLength in (0, 1, 2, 4):\n kernelName = \"lanczos3\"\n rtol = 4e-5\n atol = 1e-2\n warpingControl = afwMath.WarpingControl(\n warpingKernelName=kernelName,\n interpLength=interpLength,\n ... | [
"0.6946785",
"0.6825195",
"0.6617307",
"0.660952",
"0.66017884",
"0.6594313",
"0.6499729",
"0.64934295",
"0.6367398",
"0.6328859",
"0.62066585",
"0.61953306",
"0.6187832",
"0.6185922",
"0.6155084",
"0.6125401",
"0.6120831",
"0.6105542",
"0.6105542",
"0.60338104",
"0.60175043"... | 0.60673064 | 19 |
calculates iou between two boxes box1 and box2 | def iou(box1, box2, device):
b1x1, b1y1, b1x2, b1y2 = box1[:,0], box1[:,1], box1[:,2], box1[:,3]
b2x1, b2y1, b2x2, b2y2 = box2[:,0], box2[:,1], box2[:,2], box2[:,3]
inter_x1 = torch.max(b1x1, b2x1)
inter_y1 = torch.max(b1y1, b2y1)
inter_x2 = torch.min(b1x2, b2x2)
inter_y2 = torch.min(b1y2, b2y2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iou(box1, box2):\n\n lr = min(box1[0]+0.5*box1[2], box2[0]+0.5*box2[2]) - \\\n max(box1[0]-0.5*box1[2], box2[0]-0.5*box2[2])\n if lr > 0:\n tb = min(box1[1]+0.5*box1[3], box2[1]+0.5*box2[3]) - \\\n max(box1[1]-0.5*box1[3], box2[1]-0.5*box2[3])\n if tb > 0:\n intersection = tb*lr\n ... | [
"0.85155684",
"0.8487304",
"0.8402957",
"0.8374088",
"0.83300817",
"0.8261204",
"0.82453805",
"0.8203979",
"0.81715965",
"0.81715965",
"0.81616485",
"0.8146204",
"0.81316835",
"0.8052979",
"0.8008135",
"0.80073375",
"0.794081",
"0.79382366",
"0.78954923",
"0.7894293",
"0.7855... | 0.752311 | 29 |
Index of the homepage. | def dashboard(project):
g.selected_tab = "dashboard"
# Check if project argument is correct
project_query = Project.select().where(Project.slug == project).first()
if project_query is None:
flash("invalid project")
return redirect(url_for("projects"))
session["project"] = project_qu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def home():\n\n\treturn render_template('index.html', title='Home Page',\n\t\t\t\t\t\t year=datetime.now().year)",
"def index():\n return render_template('index.html', title='Home')",
"def index():\n\treturn render_template(\"index.html\", title=\"Home\")",
"def homepage():\n return render_templa... | [
"0.8197923",
"0.81506574",
"0.8124489",
"0.8094301",
"0.80736524",
"0.79953974",
"0.79926103",
"0.79546267",
"0.79210836",
"0.7909273",
"0.78858733",
"0.7878424",
"0.7878424",
"0.7878424",
"0.7878424",
"0.7878424",
"0.7878424",
"0.7878424",
"0.7878424",
"0.7878424",
"0.787842... | 0.0 | -1 |
Return the list of children that are themselves nodes. | def _subnode_ids(self):
for ticket in self:
ticket.subnode_ids = self.search([
('parent_id', '=', ticket.id),
('type.has_children', '=', True)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_child_nodes(node):\r\n return list(iter_child_nodes(node))",
"def get_node_children(self, node):\n return node.children",
"def children(self):\n return list(self._children)",
"def get_children(self):\n return [node for node in self._children.values()]",
"def get_children(sel... | [
"0.79776645",
"0.7892044",
"0.7849119",
"0.78167266",
"0.78007185",
"0.7711362",
"0.76936305",
"0.764749",
"0.7612078",
"0.7612078",
"0.7612078",
"0.7606631",
"0.7577797",
"0.75587404",
"0.7555079",
"0.7542785",
"0.7532357",
"0.7522142",
"0.7505171",
"0.74734557",
"0.7438774"... | 0.0 | -1 |
Returns the list of dictionaries, one dictionary per attribute. | def run_attributes (ins, exp, run) :
t0_sec = time()
list_of_dicts = experiment_info.run_attributes(ins, exp, run)
#print 'run_attributes for %s %s run:%d, t(sec) = %f' % (ins, exp, run, time()-t0_sec)
return list_of_dicts | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_dict(self):\n d = {}\n i = 0\n for entry in self.entries:\n d[i] = {}\n attributes = self.get_attribute_list()\n print (attributes)\n for data in attributes:\n d[i][data] = entry.__getattribute__(data)\n i = i + 1\n ... | [
"0.6806483",
"0.6774851",
"0.6704017",
"0.6655863",
"0.66396075",
"0.6561624",
"0.6561624",
"0.6561624",
"0.6454229",
"0.6421544",
"0.6421411",
"0.64098376",
"0.6374124",
"0.6361941",
"0.6344779",
"0.6331047",
"0.6303439",
"0.6301409",
"0.6296278",
"0.62947166",
"0.62664664",... | 0.0 | -1 |
Given a text, return the text with no spaces or punctuation and all lowercased. | def clean_text(text):
text = text.lower()
all_letters = "abcdefghijklmnopqrstuvwxyz"
text_to_keep = ""
for char in text:
if char in all_letters:
text_to_keep += char
return text_to_keep | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def no_caps_and_ponctuation(text):\n return re.sub(r'[^\\w\\s]', '', text).lower()",
"def only_lowercase(text):\n\tnot_allowed = string.punctuation + string.whitespace + string.digits\n\ttext2 = [each for each in text if each not in not_allowed]\n\ttext2 = ''.join(text2)\n\treturn text2.lower()",
"def norma... | [
"0.83795613",
"0.83204526",
"0.82383573",
"0.81987154",
"0.81307024",
"0.8068156",
"0.8015314",
"0.8003856",
"0.79410756",
"0.79233396",
"0.7918988",
"0.78748393",
"0.78047484",
"0.7737332",
"0.7694352",
"0.76641345",
"0.76497144",
"0.76477593",
"0.76310056",
"0.7581861",
"0.... | 0.6947345 | 52 |
Get the work directory for the current iteration. We need to call this function in child processes so it cannot be in an object. | def iter_dir(temp_dir, blast_db, query_name, iteration):
name = '{}_{}_{:02d}'.format(
basename(blast_db), basename(query_name), iteration)
return join(temp_dir, name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def work_dir(self):\n return self._work_dir",
"def workdir(self):\n\n return self._workdir",
"def workdir(self) -> str:\n return self._workdir",
"def get_working_dir(self):\r\n return self.process.get_working_dir()",
"def workDir(self):\n self.debug.printHeader()\n ... | [
"0.82060385",
"0.7767615",
"0.7692267",
"0.7685019",
"0.7473804",
"0.73769414",
"0.73645717",
"0.73282987",
"0.7265627",
"0.7254668",
"0.7212822",
"0.7138452",
"0.6930496",
"0.67864",
"0.674485",
"0.6699786",
"0.6696087",
"0.6695358",
"0.66834766",
"0.6646763",
"0.6636493",
... | 0.0 | -1 |
Display the string representation for this range that has different outputs for singlets vs. ranges | def __repr__(self):
if self.start_measure_num == self.end_measure_num:
return "m. {}".format(self.start_measure_num)
return "mm. {} - {}".format(self.start_measure_num, self.end_measure_num) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __repr__(self):\n return str(self.start) + ' \\t' + str(self.end)",
"def __str__(self) -> str:\n\n return str(tstack([self._domain, self._range]))",
"def __repr__(self):\n if isinstance(self.begin, Number):\n s_begin = str(self.begin)\n s_end = str(self.end)\n ... | [
"0.7564587",
"0.75269395",
"0.7523573",
"0.7430622",
"0.70361346",
"0.7011773",
"0.697294",
"0.6925801",
"0.68996936",
"0.6832773",
"0.6812872",
"0.68115133",
"0.67921054",
"0.6765769",
"0.67415893",
"0.6711125",
"0.6705522",
"0.66996866",
"0.6685044",
"0.66624224",
"0.666201... | 0.0 | -1 |
Sets the revision of this ConnectionEntity. The revision for this request/response. The revision is required for any mutable flow requests and is included in all responses. | def revision(self, revision):
self._revision = revision | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def svn_client_commit_info_t_revision_set(svn_client_commit_info_t_self, svn_revnum_t_revision): # real signature unknown; restored from __doc__\n pass",
"def svn_client_commit_item_t_revision_set(svn_client_commit_item_t_self, svn_revnum_t_revision): # real signature unknown; restored from __doc__\n pass"... | [
"0.6917974",
"0.67692393",
"0.674802",
"0.6565757",
"0.6282638",
"0.6282638",
"0.6083437",
"0.60660917",
"0.59965616",
"0.5952981",
"0.59507406",
"0.5883649",
"0.5879126",
"0.5847831",
"0.58342314",
"0.5828874",
"0.58206844",
"0.5738379",
"0.55126613",
"0.5456829",
"0.5418094... | 0.77200115 | 0 |
Gets the id of this ConnectionEntity. The id of the component. | def id(self):
return self._id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def component_id(self) -> ComponentId:\n return self.configuration.component_id",
"def id(self):\n return id(self._component)",
"def entity_id(self):\n return self._entity_id",
"def entity_id(self):\n return self._entity_id",
"def entity_id(self):\n return self._entity_id... | [
"0.76705676",
"0.76160103",
"0.75298965",
"0.75298965",
"0.75298965",
"0.75298965",
"0.75298965",
"0.74498016",
"0.74498016",
"0.733252",
"0.7310465",
"0.7215575",
"0.7215575",
"0.7192322",
"0.71734476",
"0.71734476",
"0.71734476",
"0.71734476",
"0.71734476",
"0.71734476",
"0... | 0.0 | -1 |
Sets the id of this ConnectionEntity. The id of the component. | def id(self, id):
self._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_id(self, id):\n self.__id = id",
"def set_id(self, id_):\n\n self.id_ = id_",
"def SetId(self, id):\n self.id = int(id)",
"def set_id(self, id):\n self.data['id'] = id",
"def id(self, id):\n \n self._id = id",
"def id(self, id):\n \n self._i... | [
"0.7462041",
"0.72931206",
"0.727262",
"0.7107549",
"0.7042312",
"0.7042312",
"0.7042312",
"0.7042312",
"0.7042312",
"0.7018155",
"0.7018155",
"0.7018155",
"0.7018155",
"0.7018155",
"0.7018155",
"0.7018155",
"0.7018155",
"0.7018155",
"0.7018155",
"0.6991876",
"0.69661677",
... | 0.0 | -1 |
Gets the uri of this ConnectionEntity. The URI for futures requests to the component. | def uri(self):
return self._uri | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_uri(self):\n return self.__uri",
"def uri(self) -> str:\n return self._uri",
"def uri(self) -> Optional[str]: # noqa: D401\n return self._uri",
"def get_uri(self):\n return self.url",
"def get_uri(self):\n if self._uri is None:\n self._uri = \"{0}{1}/{... | [
"0.75690025",
"0.7543656",
"0.74184173",
"0.7418154",
"0.72794",
"0.72481126",
"0.7097343",
"0.70451915",
"0.69960606",
"0.6872308",
"0.67772293",
"0.67532516",
"0.6723831",
"0.670618",
"0.6663469",
"0.6663469",
"0.6663469",
"0.6663469",
"0.6635163",
"0.6620791",
"0.6617668",... | 0.745435 | 7 |
Gets the position of this ConnectionEntity. The position of this component in the UI if applicable. | def position(self):
return self._position | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_position(self):\n return self._pos",
"def get_position(self):\n return self._pos",
"def get_position(self):\n return self._position",
"def get_position(self):\n return self.__position",
"def position(self):\r\n return self._position",
"def get_position(self):\n ... | [
"0.78138846",
"0.78138846",
"0.7771905",
"0.77630633",
"0.77557766",
"0.77446073",
"0.77446073",
"0.7694758",
"0.7694758",
"0.7694758",
"0.76946944",
"0.7667966",
"0.7648146",
"0.7643449",
"0.7635414",
"0.7606924",
"0.7603855",
"0.7593797",
"0.7541962",
"0.7540668",
"0.752632... | 0.7730974 | 18 |
Sets the bulletins of this ConnectionEntity. The bulletins for this component. | def bulletins(self, bulletins):
self._bulletins = bulletins | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bulletins(self):\n return self._bulletins",
"def bullets(self, bullet: str = None):\n ori_bullet = self._bullet\n ori_indent = self._indent\n if self._bullet:\n self._indent = self._indent + \" \"\n self._bullet = self._normalize_bullet(bullet or True)\n ... | [
"0.5911408",
"0.509516",
"0.50478417",
"0.4898042",
"0.48924485",
"0.48892403",
"0.48443344",
"0.47340822",
"0.47022027",
"0.47005236",
"0.46867833",
"0.466879",
"0.466879",
"0.466879",
"0.46510515",
"0.46423334",
"0.46343943",
"0.46308878",
"0.45837072",
"0.45698646",
"0.455... | 0.76680356 | 0 |
Gets the component of this ConnectionEntity. | def component(self):
return self._component | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get(self, entity):\n\t\treturn entity.get_component(self.component_type)",
"def getComponent(self):\n return self.flowComponent",
"def entity(self):\n return self._entity",
"def entity(self):\n return self._entity",
"def GetEntity(self):\n return self.__entity",
"def connect... | [
"0.72167253",
"0.69788116",
"0.6706838",
"0.6706838",
"0.65318334",
"0.6335237",
"0.63278586",
"0.63278586",
"0.63278586",
"0.6324666",
"0.6318077",
"0.6318077",
"0.6286724",
"0.6286724",
"0.6277704",
"0.6224943",
"0.60911745",
"0.6036216",
"0.60313195",
"0.6008424",
"0.59891... | 0.7446691 | 1 |
Sets the component of this ConnectionEntity. | def component(self, component):
self._component = component | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def entity(self, entity):\n\n self._entity = entity",
"def set_part(self, connection_part):\n self.part = connection_part",
"def set(self, v):\n self.components = v.components",
"def set_state(self, state):\n #print(\"ComponentBase.set_state\")\n for k,v in state.items():\n #p... | [
"0.60139614",
"0.59022343",
"0.55617356",
"0.5526616",
"0.54959995",
"0.5492914",
"0.54923886",
"0.5484386",
"0.5333353",
"0.5317362",
"0.5224067",
"0.52110183",
"0.520458",
"0.51485145",
"0.5122646",
"0.5116498",
"0.5087239",
"0.50771314",
"0.5051661",
"0.5018732",
"0.501873... | 0.6293469 | 1 |
Gets the status of this ConnectionEntity. The status of the connection. | def status(self):
return self._status | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_status(self):\n return self._conn_state",
"def connection_status(self):\n return self._connection_status",
"def status(self) -> 'outputs.ConnectionStatusResponse':\n return pulumi.get(self, \"status\")",
"def status(self) -> Optional[pulumi.Input[Union[str, 'ConnectionStatus']]]:... | [
"0.8143861",
"0.8123574",
"0.8044342",
"0.774128",
"0.7340334",
"0.72911435",
"0.7280066",
"0.7220779",
"0.7212225",
"0.718606",
"0.718606",
"0.718606",
"0.7138426",
"0.71283495",
"0.7108237",
"0.7108237",
"0.7108237",
"0.7068817",
"0.70596915",
"0.7055933",
"0.7028312",
"0... | 0.70587337 | 40 |
Sets the status of this ConnectionEntity. The status of the connection. | def status(self, status):
self._status = status | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_connection_status(self, connection_status: Literal[ConnectionState]) -> None:\n self.connection_status = connection_status\n self.publish(self.key_gen(\"connection_status\"), connection_status)",
"def SetConnectionStatus(self, state, info):\n self.connection_state = state\n se... | [
"0.7709721",
"0.76234174",
"0.72343576",
"0.7170294",
"0.71666926",
"0.71666926",
"0.71666926",
"0.7129979",
"0.71172094",
"0.7113621",
"0.69492435",
"0.6886419",
"0.6886419",
"0.6886419",
"0.6886419",
"0.6886419",
"0.6886419",
"0.6886419",
"0.67220205",
"0.671643",
"0.668753... | 0.68860316 | 36 |
Gets the bends of this ConnectionEntity. The bend points on the connection. | def bends(self):
return self._bends | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_bonds(self):\n return self._graph.get_all_links()",
"def bends(self, bends):\n\n self._bends = bends",
"def bends(self, bends):\n\n self._bends = bends",
"def get_path_ends(self):\n\n end1, end2 = self.get_end_vertices()\n\n return Path(end1), Path(end2)",
"def ge... | [
"0.63124466",
"0.62311864",
"0.62311864",
"0.61342794",
"0.60427386",
"0.5861787",
"0.5813159",
"0.57418406",
"0.5741445",
"0.56982213",
"0.5664366",
"0.56096756",
"0.5543615",
"0.5543615",
"0.55430555",
"0.5516967",
"0.55082905",
"0.5476985",
"0.5476985",
"0.5476985",
"0.547... | 0.8231701 | 1 |
Gets the label_index of this ConnectionEntity. The index of the bend point where to place the connection label. | def label_index(self):
return self._label_index | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def labelIndex(self, label):\n for idx, taskDef in enumerate(self):\n if taskDef.label == label:\n return idx\n return -1",
"def labelpos(self):\n return self._labelpos",
"def get_label_id(self) -> int:\n pass",
"def get_index(self, label):\n if la... | [
"0.6874631",
"0.6870494",
"0.6746189",
"0.66549516",
"0.6577527",
"0.6544367",
"0.6421175",
"0.63479936",
"0.629492",
"0.62752604",
"0.6258572",
"0.6235088",
"0.6217171",
"0.6176996",
"0.6176996",
"0.6176996",
"0.6176996",
"0.6176996",
"0.6176996",
"0.6176996",
"0.6176996",
... | 0.81278616 | 1 |
Gets the source_id of this ConnectionEntity. The identifier of the source of this connection. | def source_id(self):
return self._source_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def source_id(self) -> str:\n return self._source_id",
"def source_id(self) -> str:\n return self._source_id",
"def source_id(self) -> Optional[str]:\n return pulumi.get(self, \"source_id\")",
"def source_identifier(self) -> str:\n return pulumi.get(self, \"source_identifier\")",
... | [
"0.79534465",
"0.79534465",
"0.75024366",
"0.74554944",
"0.74554944",
"0.7111263",
"0.7019126",
"0.669585",
"0.669585",
"0.6654277",
"0.6654277",
"0.65622085",
"0.65622085",
"0.6561476",
"0.6513304",
"0.6506018",
"0.6506018",
"0.6501214",
"0.6468592",
"0.64256066",
"0.6399237... | 0.8201575 | 0 |
Sets the source_id of this ConnectionEntity. The identifier of the source of this connection. | def source_id(self, source_id):
self._source_id = source_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def source_id(self, source_id: str):\n\n self._source_id = source_id",
"def source_id(self, source_id):\n if source_id is None:\n raise ValueError(\"Invalid value for `source_id`, must not be `None`\") # noqa: E501\n\n self._source_id = source_id",
"def source_id(self, source_i... | [
"0.82589805",
"0.7962771",
"0.79105514",
"0.7172527",
"0.70835793",
"0.70327055",
"0.6709468",
"0.65106606",
"0.6470963",
"0.6470963",
"0.6404354",
"0.63333565",
"0.62886494",
"0.6148271",
"0.6109233",
"0.6093463",
"0.6048556",
"0.60441846",
"0.6035319",
"0.6031721",
"0.60317... | 0.8244456 | 2 |
Gets the source_group_id of this ConnectionEntity. The identifier of the group of the source of this connection. | def source_group_id(self):
return self._source_group_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GroupId(self):\n\t\treturn self._get_attribute('groupId')",
"def group_id(self):\n return self._group_id",
"def group_id(self):\n return self._group_id",
"def group_id(self):\n return self._group_id",
"def getSourceGroup(self, sourceGroupUri: str):\n ret = self.jsonRequest(\... | [
"0.7061652",
"0.69663566",
"0.69663566",
"0.69663566",
"0.6947813",
"0.68399",
"0.68188775",
"0.66658133",
"0.6590242",
"0.6590242",
"0.6563346",
"0.65620047",
"0.65382844",
"0.6450658",
"0.6365132",
"0.63592273",
"0.6305528",
"0.6264024",
"0.61826307",
"0.61826307",
"0.61826... | 0.8702898 | 0 |
Sets the source_group_id of this ConnectionEntity. The identifier of the group of the source of this connection. | def source_group_id(self, source_group_id):
self._source_group_id = source_group_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def source_group_id(self):\n return self._source_group_id",
"def group_id(self, group_id):\n\n self._group_id = group_id",
"def group_id(self, group_id):\n\n self._group_id = group_id",
"def group_id(self, group_id):\n\n self._group_id = group_id",
"def group_id(self, group_id):... | [
"0.7462498",
"0.69643205",
"0.69643205",
"0.69643205",
"0.69643205",
"0.69643205",
"0.69643205",
"0.67976165",
"0.66073805",
"0.6589923",
"0.65426904",
"0.6497195",
"0.6462199",
"0.6342586",
"0.6186086",
"0.61343706",
"0.6131915",
"0.6112468",
"0.6063832",
"0.6063832",
"0.605... | 0.8659341 | 0 |
Gets the source_type of this ConnectionEntity. The type of component the source connectable is. | def source_type(self):
return self._source_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def source_type(self):\n\n return self._source_type",
"def source_type(self) -> Optional[str]:\n return pulumi.get(self, \"source_type\")",
"def source_entity_type(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"source_entity_type\")",
"def source_entity_type_name(self) -> pulum... | [
"0.7938959",
"0.73658603",
"0.7342359",
"0.6736658",
"0.6673928",
"0.6611221",
"0.63532066",
"0.6316995",
"0.6316995",
"0.6316995",
"0.62514484",
"0.62293565",
"0.62293565",
"0.62127125",
"0.62078434",
"0.62078434",
"0.6072031",
"0.6041372",
"0.59212494",
"0.59212494",
"0.590... | 0.78574264 | 1 |
Sets the source_type of this ConnectionEntity. The type of component the source connectable is. | def source_type(self, source_type):
if source_type is None:
raise ValueError("Invalid value for `source_type`, must not be `None`")
allowed_values = ["PROCESSOR", "REMOTE_INPUT_PORT", "REMOTE_OUTPUT_PORT", "INPUT_PORT", "OUTPUT_PORT", "FUNNEL"]
if source_type not in allowed_values:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def source_type(self, source_type):\n\n self._source_type = source_type",
"def source_type(self):\n\n return self._source_type",
"def source_type(self):\n return self._source_type",
"def source_type(self) -> Optional[str]:\n return pulumi.get(self, \"source_type\")",
"def set_fl... | [
"0.7779256",
"0.65040517",
"0.64406013",
"0.6129758",
"0.6086056",
"0.60019135",
"0.58284324",
"0.5788574",
"0.5788574",
"0.5788574",
"0.5788574",
"0.5788574",
"0.5788574",
"0.5788574",
"0.5771346",
"0.5756744",
"0.56954044",
"0.56689554",
"0.562897",
"0.5602552",
"0.55607384... | 0.72724557 | 1 |
Gets the destination_id of this ConnectionEntity. The identifier of the destination of this connection. | def destination_id(self):
return self._destination_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destination_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"destination_id\")",
"def destination_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"destination_id\")",
"def destination_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"destination_... | [
"0.73724747",
"0.70405096",
"0.7025915",
"0.68753964",
"0.6863252",
"0.68272024",
"0.67722225",
"0.6643893",
"0.6625509",
"0.6500945",
"0.6491211",
"0.64808816",
"0.64808816",
"0.63459647",
"0.62732315",
"0.6194437",
"0.61825633",
"0.61825633",
"0.61706",
"0.61545366",
"0.612... | 0.8142794 | 0 |
Sets the destination_id of this ConnectionEntity. The identifier of the destination of this connection. | def destination_id(self, destination_id):
self._destination_id = destination_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destination_group_id(self, destination_group_id):\n\n self._destination_group_id = destination_group_id",
"def set_data_dest(self, destination_id):\n self.data_dest = destination_id",
"def destination_id(self):\n return self._destination_id",
"def destination(self, destination):\n\n ... | [
"0.7255521",
"0.6831678",
"0.65599686",
"0.64696884",
"0.5820055",
"0.5791351",
"0.5749847",
"0.5668163",
"0.55656487",
"0.5553452",
"0.5535442",
"0.5535442",
"0.55322886",
"0.5454913",
"0.5454481",
"0.544346",
"0.5428916",
"0.54157573",
"0.5413531",
"0.5367064",
"0.5347545",... | 0.81627005 | 0 |
Gets the destination_group_id of this ConnectionEntity. The identifier of the group of the destination of this connection. | def destination_group_id(self):
return self._destination_group_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def group_id(self):\n return self._group_id",
"def group_id(self):\n return self._group_id",
"def group_id(self):\n return self._group_id",
"def GroupId(self):\n\t\treturn self._get_attribute('groupId')",
"def group_id(self):\n return self._id",
"def group_id(self) -> int:\n ... | [
"0.7188537",
"0.7188537",
"0.7188537",
"0.7087557",
"0.7035677",
"0.69587046",
"0.68851644",
"0.68221444",
"0.67290175",
"0.6687171",
"0.66288763",
"0.66288763",
"0.6606044",
"0.64862907",
"0.63396585",
"0.62658364",
"0.6258657",
"0.6257344",
"0.62522835",
"0.62522835",
"0.62... | 0.84760845 | 0 |
Sets the destination_group_id of this ConnectionEntity. The identifier of the group of the destination of this connection. | def destination_group_id(self, destination_group_id):
self._destination_group_id = destination_group_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destination_group_id(self):\n return self._destination_group_id",
"def group_id(self, group_id):\n\n self._group_id = group_id",
"def group_id(self, group_id):\n\n self._group_id = group_id",
"def group_id(self, group_id):\n\n self._group_id = group_id",
"def group_id(self, ... | [
"0.73063064",
"0.71547747",
"0.71547747",
"0.71547747",
"0.71547747",
"0.71547747",
"0.71547747",
"0.6931304",
"0.67282915",
"0.6703023",
"0.6521641",
"0.6440875",
"0.6425941",
"0.6409766",
"0.63181645",
"0.6312952",
"0.62682146",
"0.62682146",
"0.62682146",
"0.62443507",
"0.... | 0.8446568 | 0 |
Gets the destination_type of this ConnectionEntity. The type of component the destination connectable is. | def destination_type(self):
return self._destination_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def data_destination_type(self) -> str:\n return pulumi.get(self, \"data_destination_type\")",
"def data_destination_type(self) -> str:\n return pulumi.get(self, \"data_destination_type\")",
"def get_destination(self):\n return self._destination",
"def getDestination(self):\n retu... | [
"0.6976873",
"0.6976873",
"0.59148884",
"0.5886335",
"0.5874328",
"0.5874328",
"0.587065",
"0.58528703",
"0.5832248",
"0.582125",
"0.58189446",
"0.5793217",
"0.5793217",
"0.5793217",
"0.57808685",
"0.57801783",
"0.57650167",
"0.575283",
"0.575283",
"0.57439625",
"0.57342714",... | 0.80253065 | 0 |
Sets the destination_type of this ConnectionEntity. The type of component the destination connectable is. | def destination_type(self, destination_type):
if destination_type is None:
raise ValueError("Invalid value for `destination_type`, must not be `None`")
allowed_values = ["PROCESSOR", "REMOTE_INPUT_PORT", "REMOTE_OUTPUT_PORT", "INPUT_PORT", "OUTPUT_PORT", "FUNNEL"]
if destination_type... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destination_type(self):\n return self._destination_type",
"def data_destination_type(self) -> str:\n return pulumi.get(self, \"data_destination_type\")",
"def data_destination_type(self) -> str:\n return pulumi.get(self, \"data_destination_type\")",
"def destination(self, destination... | [
"0.6683109",
"0.58475363",
"0.58475363",
"0.56402993",
"0.55343646",
"0.5455566",
"0.5440205",
"0.54209304",
"0.5409285",
"0.5401016",
"0.53972906",
"0.5385517",
"0.5385517",
"0.5361596",
"0.5262504",
"0.5229339",
"0.5229339",
"0.5229339",
"0.5229339",
"0.5229339",
"0.5229339... | 0.7552773 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, ConnectionEntity):
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 |
Returns a copy of data associated with the tensor as a new tensor. Parameters of tensors like is_leaf and grad_fn can be associated with this copy by using appropriate kwargs. | def copy(self, **kwargs):
return Tensor(self.data, **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def copy(tensor):\n raise NotImplementedError",
"def clone(self, **kwargs):\n new_inst = MetaTensor(self.as_tensor().clone(**kwargs))\n new_inst.__dict__ = deepcopy(self.__dict__)\n return new_inst",
"def clone(tensor):\n cloned = tensor.clone()#tensor.detach().clone()\n # clo... | [
"0.64967173",
"0.61112225",
"0.61032385",
"0.5644007",
"0.558004",
"0.54957473",
"0.5466157",
"0.54527473",
"0.5437702",
"0.540821",
"0.5404899",
"0.53963536",
"0.53544754",
"0.5305396",
"0.5301252",
"0.5289433",
"0.5281714",
"0.5216594",
"0.5204738",
"0.5202554",
"0.5181555"... | 0.7277451 | 0 |
Returns the data stored in Tensor as np.array | def numpy(self):
return self.data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_numpy(tensor):\n raise NotImplementedError",
"def numpy(self) -> np.ndarray:\n return self.tensor.numpy()",
"def __array__(self):\n return np.asarray(self.data)",
"def _torch_to_numpy(tensor):\n return tensor.detach().cpu().numpy()",
"def tensor2np(x):\n return x.cpu().num... | [
"0.76318735",
"0.753671",
"0.7351686",
"0.73090476",
"0.7278214",
"0.7198547",
"0.712652",
"0.7123424",
"0.7071936",
"0.7049647",
"0.70295876",
"0.6942614",
"0.690744",
"0.6871691",
"0.68522066",
"0.68216634",
"0.6799086",
"0.6799086",
"0.67435515",
"0.67435026",
"0.67368484"... | 0.69967204 | 11 |
Similar to np.ones(...) PARAMETERS ========== | def ones(shape, **kwargs):
return Tensor(np.ones(shape), **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ones_like(x):\n # Should only be used for small vectors.\n if x.get_shape().is_fully_defined():\n return array_ops.ones(x.get_shape().as_list(), dtype=x.dtype)\n return array_ops.ones_like(x)",
"def ones():\n return Vec2d(1, 1)",
"def ones(shape, dtype=None, order='C'):\n pass",
"def one... | [
"0.79376924",
"0.76244175",
"0.7534923",
"0.7515089",
"0.7509567",
"0.7484279",
"0.7465238",
"0.74008864",
"0.737239",
"0.7337417",
"0.7251567",
"0.72356063",
"0.7226361",
"0.7174657",
"0.707946",
"0.70416594",
"0.70287144",
"0.7008076",
"0.6935272",
"0.6935272",
"0.6934268",... | 0.7357806 | 9 |
Similar to np.zeros(...) PARAMETERS ========== | def zeros(*shape, **kwargs):
return Tensor(np.zeros(shape), **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize_with_zeros(dim):\n\n ### START CODE HERE ### (≈ 1 line of code)\n w = np.zeros(shape=(dim, 1))\n b = 0\n ### END CODE HERE ###\n\n assert (w.shape == (dim, 1))\n assert (isinstance(b, float) or isinstance(b, int))\n\n return w, b",
"def zeros(dim):\n\n return np.zeros(dim, ... | [
"0.77863073",
"0.77077615",
"0.76660645",
"0.7649786",
"0.75945294",
"0.75525427",
"0.753063",
"0.7513476",
"0.74441516",
"0.7442204",
"0.7439459",
"0.7431264",
"0.7418526",
"0.7334528",
"0.7303313",
"0.729762",
"0.72766393",
"0.7273656",
"0.7211108",
"0.7200719",
"0.7173897"... | 0.70277166 | 32 |
Similar to np.random.randn(...) Generates a Tensor filled with ones. PARAMETERS ========== | def randn(*shape, **kwargs):
return Tensor(np.random.randn(*shape), **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ones(shape, **kwargs):\n return Tensor(np.ones(shape), **kwargs)",
"def randn(*args):\n dims = list(args)\n assert type(dims[0]) == int\n return params_func(cmd, \"randn\", params=dims, return_type='FloatTensor')",
"def ones(shape, dtype=np.float32, constant=False):\n return Tensor(np.on... | [
"0.7148251",
"0.6908371",
"0.6900145",
"0.68355936",
"0.67769295",
"0.668367",
"0.6565178",
"0.6526853",
"0.6516446",
"0.6514527",
"0.6489827",
"0.6467619",
"0.6434814",
"0.64236474",
"0.6401731",
"0.6378189",
"0.6336382",
"0.6328824",
"0.6324748",
"0.63184464",
"0.627129",
... | 0.7329159 | 0 |
Similar to np.empty(...) Generates a Tensor with uninitialized data. PARAMETERS ========== | def empty(*shape, **kwargs):
return Tensor(np.empty(shape), **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def empty(shape, dtype=np.float32, constant=False):\n return Tensor(np.empty(shape, dtype), constant=constant)",
"def zeros(*shape, **kwargs):\n return Tensor(np.zeros(shape), **kwargs)",
"def empty_like(other, dtype=None, constant=False):\n if isinstance(other, Tensor):\n other = other.dat... | [
"0.80262846",
"0.75247264",
"0.72961193",
"0.7208099",
"0.70663923",
"0.7048083",
"0.7048083",
"0.7002598",
"0.69856155",
"0.69673944",
"0.6889226",
"0.6869159",
"0.68469876",
"0.6826852",
"0.6815466",
"0.6774665",
"0.6716065",
"0.66886276",
"0.6611717",
"0.65701115",
"0.6551... | 0.8372835 | 0 |
This method is called to initiate the backward pass on the computation graph. This method initiates MLlib.autograd.backward() method which accumulates the gradient(s) to the Leaf Tensors (`is_leaf=True`) with `requires_grad=True` with respect to the root of the computation graph. PARAMETERS ========== | def backward(self, grad_of_output=None):
if grad_of_output is None:
grad_of_output = Tensor.ones(self.shape)
if grad_of_output.shape != self.shape:
# this block will be executed only when graient is supplied
raise Exception('The shape of gradient and variable must ma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def backward(self):\n #initiate the gradients\n #print('')\n \n #print('node {} grad {}'.format(self.id, self.gradient))\n #print('node {} times visited : {}/{}'.format(self.id, self.times_visited, self.times_used))\n\n if self.gradient is None:\n self.gradient=... | [
"0.775168",
"0.7395385",
"0.70558363",
"0.6983561",
"0.6874481",
"0.6822189",
"0.6822189",
"0.6636194",
"0.6620846",
"0.65166324",
"0.6509441",
"0.64982",
"0.64806813",
"0.6477585",
"0.64667493",
"0.6451588",
"0.64295983",
"0.6424239",
"0.6424239",
"0.6423392",
"0.63993573",
... | 0.6249039 | 35 |
Reshapes a tensor to desired shape. | def reshape(self, *shape):
return F.Reshape.apply(self, shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reshape(tensor):\n row = tf.shape(tensor)[0]\n shape_list = [row, -1]\n out = tf.reshape(tensor, shape_list)\n return out",
"def reshape(tensor, newshape):\n raise NotImplementedError",
"def reshape_0(tensor):\n row = tf.shape(tensor)[0]\n og_shape = tensor.get_shape().as_list()\n ... | [
"0.8068795",
"0.7766165",
"0.7438796",
"0.7339447",
"0.7300898",
"0.7190789",
"0.7093374",
"0.7093026",
"0.7081818",
"0.7079914",
"0.70787036",
"0.70407987",
"0.70286363",
"0.6952848",
"0.6895471",
"0.68783164",
"0.68380576",
"0.67788875",
"0.6732922",
"0.6716008",
"0.6666649... | 0.66420114 | 22 |
Vector dot product. PARAMETERS ========== | def dot(self, other):
return F.Dot.apply(self, other) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vector_dot(v1,v2):\n return (v1.x * v2.x) + (v1.y * v2.y) + (v1.z * v2.z)",
"def vec_dot(v1,v2):\r\n \r\n return np.dot(v1,v2)",
"def vec_dot(x, y):\r\n return sum(a * b for a, b in zip(x, y))",
"def dot(vector1, vector2):\n return sum(a1 * a2 for a1, a2 in zip(vector1, vector2))",
"def do... | [
"0.84030294",
"0.8378673",
"0.81122494",
"0.80740005",
"0.80505097",
"0.8043258",
"0.8036128",
"0.8033409",
"0.80047405",
"0.7996097",
"0.79570735",
"0.792644",
"0.79141647",
"0.79105175",
"0.7906579",
"0.7905929",
"0.78892213",
"0.7880943",
"0.7875338",
"0.7871007",
"0.78622... | 0.0 | -1 |
Computes the sum of elements of the Tensor. PARAMETERS ========== | def sum(self, axis=None, keepdims=False):
return F.Sum.apply(self, axis, keepdims) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(tensor, axis=None):\n raise NotImplementedError",
"def tensor_sum(t: Tensor) -> Tensor:\n data = t.data.sum()\n requires_grad = t.requires_grad\n if requires_grad:\n def grad_fn(grad: np.ndarray) -> np.ndarray:\n \"\"\"\n grad is necessarily a 0-tenosr, so eac... | [
"0.7370117",
"0.7241158",
"0.7000835",
"0.6856461",
"0.68053496",
"0.6781917",
"0.6728531",
"0.66968125",
"0.66364837",
"0.66331005",
"0.6575769",
"0.6520266",
"0.651694",
"0.65041417",
"0.644977",
"0.6407349",
"0.64045674",
"0.6404034",
"0.63779426",
"0.63706374",
"0.6341879... | 0.68595433 | 3 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def plot_confusion_matrix(cm, classes,
normalize=False,
title='Confusion matrix',
cmap=plt.cm.Blues):
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.8194586",
"0.8095255",
"0.802963",
"0.80189276",
"0.7994091",
"0.79910594",
"0.798075",
"0.79766196",
"0.79603124",
"0.7957427",
"0.7937533",
"0.7934523",
"0.79342",
"0.7931087",
"0.7926079",
"0.7924241",
"0.79235566",
"0.79232305",
"0.7922709",
"0.7921817",
"0.79173964",
... | 0.7857115 | 41 |
Insert new merchant record into db | def create_merchant(merchant: Merchant) -> Merchant:
# insert into db
res = service.create_merchant(merchant=merchant)
# delete existing cache
cache.delete_merchants()
return res | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def insert(self):\n self.getDbRecord().insert()\n\n return",
"def insert_to_db(self) -> None:\n query = '''INSERT INTO ESLReceipts(Transaction_Number, Date, Description, Memo,\n Amount_Debit, Amount_Credit, Balance, Check_Number, \n ... | [
"0.6827268",
"0.6675301",
"0.63370365",
"0.6206963",
"0.6206266",
"0.61872905",
"0.6176613",
"0.61613727",
"0.6068575",
"0.60498375",
"0.6042949",
"0.6042949",
"0.6042949",
"0.6033795",
"0.59973824",
"0.5991992",
"0.5990832",
"0.59841996",
"0.5959846",
"0.59516543",
"0.590249... | 0.62004185 | 5 |
Removes all illegal chars from a filename | def strip_illegal_chars(filename: str) -> str:
if OPTIONS['download']['ascii']:
return ''.join(i for i in filename if i in FILENAME_ALLOWEDASCII)
else:
return ''.join(i for i in filename if i not in FILENAME_BANNED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def processFilename(filename):\n\n badchars = [\" \", \",\", \"+\", \"$\", \"_\", \"{\", \"}\", \"/\", \"&\"]\n fn = filename\n for bc in badchars:\n fn = fn.replace(bc, \"\")\n return fn",
"def cleanFilename(filename):\n badChars = {ord('?'): None, ord('*'): None, ord('/'): None,\n ... | [
"0.8803714",
"0.8626375",
"0.8530992",
"0.84478223",
"0.84211713",
"0.8198018",
"0.8056484",
"0.79976046",
"0.7953138",
"0.7914864",
"0.79125893",
"0.7872948",
"0.7821496",
"0.77908486",
"0.7767263",
"0.7648618",
"0.76443875",
"0.7627765",
"0.76167405",
"0.7607124",
"0.76048"... | 0.8354843 | 5 |
Gets the id of this ModelApiSerializer. | def id(self):
return self._id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(self):\n return self.raw_resource[\"id\"]",
"def getId(self):\n\n return self.__id",
"def get_id(self):\n return self.get_api_endpoint()",
"def getId(self):\n return _libsbml.Model_getId(self)",
"def get_id(self):\n return self._id",
"def get_id(self):\n r... | [
"0.7318348",
"0.7249195",
"0.7191896",
"0.71849716",
"0.71724355",
"0.71724355",
"0.71724355",
"0.71724355",
"0.71724355",
"0.71724355",
"0.7134885",
"0.7134885",
"0.7134885",
"0.7134885",
"0.7134885",
"0.7134885",
"0.7134885",
"0.7134885",
"0.7134885",
"0.7134885",
"0.713488... | 0.0 | -1 |
Sets the id of this ModelApiSerializer. | def id(self, id):
self._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_id(self, id):\n self.data['id'] = id",
"def SetId(self, id):\n self.id = int(id)",
"def set_id(self, id):\n self.__id = id",
"def set_id(self, id_):\n\n self.id_ = id_",
"def id(self, id: int):\n\n self._id = id",
"def id(self, id: int):\n\n self._id = id... | [
"0.7395003",
"0.73622143",
"0.7357014",
"0.7245669",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71858615",
"0.71611583",
"0.71611583",
"0.71611583",
"0.71611583",
"0.71611583",
"0.71311414",
... | 0.0 | -1 |
Gets the state of this ModelApiSerializer. | def state(self):
return self._state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_state(self) -> Optional[BaseModel]:\n return self.state",
"def get_state(self):\n return self._state",
"def get_state(self):\n return self._state",
"def get_state(self):\n return self._state",
"def get_state(self):\n return self._state",
"def get_state(self):\n ... | [
"0.70922405",
"0.6980978",
"0.6980978",
"0.6980978",
"0.6980978",
"0.6980978",
"0.6955853",
"0.6955853",
"0.6955853",
"0.6948439",
"0.6948439",
"0.693541",
"0.69234943",
"0.69234943",
"0.69215626",
"0.690269",
"0.68585587",
"0.68585587",
"0.68462646",
"0.68462646",
"0.678574"... | 0.683726 | 94 |
Sets the uptime of this ModelApiSerializer. | def uptime(self, uptime):
self._uptime = uptime | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def throttle(self, uptime):\n self.uptime = uptime\n return self",
"def uptime(self):\n if self._uptime is None:\n version_data = self._raw_version_data()\n uptime_full_string = version_data[\"uptime\"]\n self._uptime = self._uptime_to_seconds(uptime_full_str... | [
"0.6795731",
"0.6492891",
"0.6104494",
"0.61004454",
"0.60512024",
"0.5866512",
"0.56981117",
"0.5612036",
"0.53500265",
"0.53422195",
"0.5340962",
"0.5307119",
"0.5189844",
"0.5157014",
"0.50722545",
"0.50611883",
"0.5057098",
"0.5053646",
"0.50496125",
"0.50491875",
"0.5046... | 0.7749305 | 1 |
Gets the last_update of this ModelApiSerializer. | def last_update(self):
return self._last_update | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_last_updated_at(self):\n return self.last_updated",
"def last_updated(self):\n return self._last_updated",
"def last_update(self): # TOFIX model the job and return an object instead of dictionary\n return self._data.get('summary_fields', {}).get('last_update')",
"def last_update... | [
"0.77800673",
"0.7677418",
"0.7611233",
"0.7214801",
"0.7206372",
"0.72038126",
"0.71342474",
"0.70557255",
"0.70540106",
"0.70300376",
"0.70300376",
"0.7018536",
"0.6926437",
"0.6926437",
"0.6926437",
"0.686975",
"0.68608254",
"0.6832431",
"0.6818583",
"0.6788467",
"0.677409... | 0.7659715 | 3 |
Sets the last_update of this ModelApiSerializer. | def last_update(self, last_update):
self._last_update = last_update | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def last_updated(self, last_updated):\n\n self._last_updated = last_updated",
"def last_updated(self, last_updated):\n\n self._last_updated = last_updated",
"def last_updated(self, last_updated):\n\n self._last_updated = last_updated",
"def last_updated(self, last_updated):\n\n se... | [
"0.7098908",
"0.7098908",
"0.7098908",
"0.7098908",
"0.686705",
"0.6755401",
"0.6575713",
"0.6178347",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61034966",
"0.61017644",
"0.6090527",
"0.607... | 0.7099938 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, BeneficiariesQueryRegisterStatus):
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 |
Create a convolutional model and its layers | def make_cloning_model(input_shape=(66, 200, 3)):
# Create the Sequential model
print("input shape", input_shape)
model = Sequential()
model.add(Lambda(lambda x: x / 128. - 1., output_shape=input_shape, input_shape=input_shape))
add_conv_type1(model, 12, input_shape)
add_conv_type1(model, 18)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def modelbuilder():\n model = Sequential()\n # Add a convolution layer with with a sigmoid activation function\n model.add(layers.Conv2D(1, (2, 2), strides=(1, 1), activation='sigmoid', padding='same', input_shape=(256, 256, 3)))\n model.compile(optimizer='adam', loss='mse', metrics=['accuracy'])\n ... | [
"0.7870049",
"0.7841626",
"0.75608236",
"0.74961275",
"0.7474013",
"0.7440766",
"0.7406714",
"0.7385",
"0.7266991",
"0.72428656",
"0.72415006",
"0.72054255",
"0.72009754",
"0.7162498",
"0.7155325",
"0.71028364",
"0.70712095",
"0.70465523",
"0.7045688",
"0.7044643",
"0.7042610... | 0.0 | -1 |
Returns a list of all revoked tokens | def list_revoked_tokens(self):
raise exception.NotImplemented() # pragma: no cover | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_revoked_job_ids():\n return list(inspect().revoked().values())",
"def tokens(self):\n return self.rpc.call(MsfRpcMethod.AuthTokenList)['tokens']",
"def tokens():\n return ['access token', 'refresh token']",
"def revoke_token():\n return server.create_endpoint_response(RevocationEndpoi... | [
"0.6892561",
"0.6793914",
"0.6780324",
"0.62469655",
"0.62344676",
"0.60059965",
"0.5945242",
"0.5907534",
"0.58983266",
"0.58832586",
"0.581192",
"0.57853776",
"0.577999",
"0.57539296",
"0.5719534",
"0.5712603",
"0.5703026",
"0.5639734",
"0.5613311",
"0.560348",
"0.5577446",... | 0.8828374 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.