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 a list of posts made by the given user
def get_queryset(self): user = get_object_or_404(User, username=self.kwargs.get('username')) return Post.objects.filter(author=user).order_by('-date_posted')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_posts(self):\n return Post.select().where (Post.user == self)", "def getMyPosts():\n \n cur, user_id = initialise(3)\n cur.execute(\"SELECT username FROM users WHERE id = ?\", [user_id])\n name = cur.fetchall()[0][0]\n cur.execute(\"SELECT * FROM posts WHERE name = ?\", [name])\n ...
[ "0.74276805", "0.74138856", "0.71518", "0.7113569", "0.70440966", "0.70332205", "0.70004547", "0.6925941", "0.69233906", "0.68500084", "0.6765446", "0.669995", "0.65760636", "0.6556414", "0.65247357", "0.6399641", "0.63081104", "0.6294303", "0.62922156", "0.6284003", "0.62785...
0.78169346
0
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def plot_confusion_matrix(save_name, y_true, y_pred, normalize=False, title=None, cmap=plt.cm.Blues): if not title: if normalize: title = 'Normalized confusion matrix' else: title = 'Confusion matrix, without normalization' # Compute confusion matrix cm = confusion_m...
{ "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.81943494", "0.80950284", "0.8029028", "0.8018638", "0.79939085", "0.7990765", "0.79800814", "0.797508", "0.79603964", "0.7956491", "0.7937033", "0.7934199", "0.79338384", "0.7930749", "0.7926003", "0.79238", "0.7923391", "0.7922832", "0.7922392", "0.7921617", "0.79173195",...
0.0
-1
Get web site configuration information.
def GetWebSiteInfo(): if len(AppSettings.objects.filter(name='WebSiteName')) > 0: WebSiteInfo.WebSiteName = AppSettings.objects.filter(name='WebSiteName')[0].value if len(AppSettings.objects.filter(name='ICP')) > 0: WebSiteInfo.ICP = AppSettings.objects.filter(name='ICP')[0].value if len(App...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config(site='self'):\n path='/sites/%s/configuration' % (site)\n return _api_request('GET', path)", "def get_website_configuration(self, headers=None):\r\n response = self.connection.make_request('GET', self.name,\r\n query_args='website', headers=headers)\r\n body = re...
[ "0.782403", "0.7089138", "0.6760721", "0.67382216", "0.6611355", "0.6606866", "0.6449757", "0.6434882", "0.6422375", "0.6346699", "0.63179183", "0.63166636", "0.62570465", "0.6245358", "0.6218919", "0.6218919", "0.6218919", "0.6218919", "0.6218919", "0.6218919", "0.6218919", ...
0.6281905
12
User must be logged in to edit their own review. Only superusers have the ability to edit any review.
def edit_review(request, review_id): user_profile = get_object_or_404(UserProfile, user=request.user) review = get_object_or_404(UserReview, id=review_id) review_form = ReviewForm(instance=review) if request.user == user_profile.user: if request.method == 'POST': review_form = Revie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_review_permitted(self, user):\n if user.is_authenticated or settings.OSCAR_ALLOW_ANON_REVIEWS:\n return not self.has_review_by(user)\n else:\n return False", "def test_should_render_user_with_can_edit_reviewrequest(self) -> None:\n self.assertTrue(self.action.sho...
[ "0.7303014", "0.6921672", "0.6744844", "0.6695743", "0.6689655", "0.666926", "0.64535314", "0.6386515", "0.6340936", "0.6329691", "0.6329286", "0.6327895", "0.629506", "0.6270095", "0.62655145", "0.62620115", "0.6217369", "0.62145746", "0.6193873", "0.6186564", "0.6137807", ...
0.66009635
6
find unsimilar word from words.
def doesnt_match(self, words: [str], top_n=1, metric='cosine') -> str: # if len(words) > 31: # words = words[:31] # combi = [words for _ in range(len(words))] # for x in NumpyUtil.combinations(combi): # print(x) sim_list = [] for word in words: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_duplicate_words(words):\n clean_words = []\n state = np.ones(len(words))\n while state.any():\n base_idx = state.nonzero()[0][0]\n for idx in range(len(words)):\n base_word = words[base_idx]\n new_word = words[idx]\n\n ...
[ "0.6620776", "0.6529438", "0.6450554", "0.6447418", "0.64363", "0.63563377", "0.61264944", "0.60969174", "0.6067228", "0.606659", "0.6062653", "0.6043481", "0.6041695", "0.60187453", "0.59979624", "0.5979615", "0.5965758", "0.59520376", "0.5941525", "0.59407514", "0.59073895"...
0.6627213
0
Return an iterator which iterates through integers represented in the given string.
def rangestr( src: str, lower: Optional[int] = None, upper: Optional[int] = None, delimiter: str = parsers.DEFAULT_DELIMITER, implicit_inclusion: bool = False, ) -> Iterator[int]: ranges = parsers.parse_ranges(src, lower, upper, delimiter, implicit_inclusion) return _chain.from_iterable(map(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stringToInts(string):\r\n ints=[];\r\n for char in string:\r\n ints.append(charToInt(char));\r\n return ints;", "def question_11(int_string: str) -> int:\n counter = 0\n for i in int_string:\n if i.isdigit():\n counter += 1\n else:\n continue\n ret...
[ "0.70124155", "0.627964", "0.6081573", "0.6049855", "0.5933867", "0.59130436", "0.5784164", "0.57793856", "0.57793856", "0.574674", "0.5727071", "0.5721899", "0.56717926", "0.56574875", "0.5641424", "0.5628631", "0.5613366", "0.56037545", "0.558539", "0.5563251", "0.5556323",...
0.5126753
62
Prepend value `n` times.
def prepend_1d_nb(a, n, value): out = np.empty(a.shape[0] + n, dtype=np.float_) out[:n] = value out[n:] = a return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prepend_nb(a, n, value):\n out = np.empty((a.shape[0] + n, a.shape[1]), dtype=np.float_)\n out[:n, :] = value\n out[n:, :] = a\n return out", "def incr_id(id, n):\n return id[:-1] + (id[-1] + n,)", "def prepend(self, x):\n self.insert(0, x)", "def incr(self, n=1):\n return _e...
[ "0.7218454", "0.6491921", "0.64344865", "0.629837", "0.62804776", "0.6252701", "0.622496", "0.6161432", "0.6144249", "0.6126113", "0.6068163", "0.60619265", "0.60440457", "0.6041927", "0.60337424", "0.6015176", "0.59991455", "0.59910494", "0.5948322", "0.588554", "0.5869516",...
0.69722444
1
2dim version of `fillna_1d_nb`.
def fillna_nb(a, value): return set_by_mask_nb(a, np.isnan(a), value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fillna_1d_nb(a, value):\n return set_by_mask_1d_nb(a, np.isnan(a), value)", "def ffill_1d_nb(a):\n out = np.empty_like(a, dtype=np.float_)\n lastval = a[0]\n for i in range(a.shape[0]):\n if np.isnan(a[i]):\n out[i] = lastval\n else:\n lastval = out[i] = a[i]\n...
[ "0.72720593", "0.717081", "0.70902824", "0.631059", "0.6058871", "0.6023809", "0.59859455", "0.58863217", "0.5797776", "0.5753979", "0.573436", "0.5713148", "0.5665259", "0.5607945", "0.5589509", "0.5578525", "0.5563066", "0.55603606", "0.5560158", "0.55532974", "0.5538657", ...
0.6776408
3
Shift backward by `n` positions. Numba equivalent to `pd.Series(a).shift(value)`. !!! warning May introduce lookahead bias.
def bshift_1d_nb(a, n): out = np.empty_like(a, dtype=np.float_) out[-n:] = np.nan out[:-n] = a[n:] return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shift(a, n=1):\n return a[n:] + a[:n]", "def bshift_nb(a, n):\n return bshift_1d_nb(a, n)", "def fshift_nb(a, n):\n return fshift_1d_nb(a, n)", "def vec_shift_right_n(x, n):\n return jnp.zeros_like(x).at[n:].set(x[:-n])", "def lrshift(val, n) -> np.int64:\n return (val % (1 << 64)) >> n"...
[ "0.7595383", "0.7368425", "0.7238008", "0.6974989", "0.6940687", "0.6857303", "0.6824538", "0.680014", "0.66681165", "0.66355175", "0.65260804", "0.65260804", "0.64641047", "0.6444674", "0.6159615", "0.61064994", "0.6071635", "0.5935243", "0.5896018", "0.5864935", "0.57536346...
0.7261811
2
Shift forward by `n` positions. Numba equivalent to `pd.Series(a).shift(value)`.
def fshift_1d_nb(a, n): out = np.empty_like(a, dtype=np.float_) out[:n] = np.nan out[n:] = a[:-n] return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shift(a, n=1):\n return a[n:] + a[:n]", "def fshift_nb(a, n):\n return fshift_1d_nb(a, n)", "def bshift_1d_nb(a, n):\n out = np.empty_like(a, dtype=np.float_)\n out[-n:] = np.nan\n out[:-n] = a[n:]\n return out", "def vec_shift_left_n(x, n):\n return jnp.zeros_like(x).at[0:-n].set(x[...
[ "0.74893206", "0.7350207", "0.7157721", "0.7116559", "0.7095816", "0.69352496", "0.6929468", "0.6855099", "0.67273456", "0.668642", "0.64743", "0.64743", "0.64493626", "0.6418545", "0.63317853", "0.61815524", "0.61227137", "0.6107207", "0.609312", "0.60402787", "0.6036679", ...
0.7079044
5
Fill NaNs by propagating last valid observation forward. Numba equivalent to `pd.Series(a).fillna(method='ffill')`.
def ffill_1d_nb(a): out = np.empty_like(a, dtype=np.float_) lastval = a[0] for i in range(a.shape[0]): if np.isnan(a[i]): out[i] = lastval else: lastval = out[i] = a[i] return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fill_forward(df):\n df = df.fillna(method='ffill')\n df = df.fillna(method='bfill').fillna(0)\n return df", "def ffill_nans(df):\n return df.fillna(method='ffill', axis=0)", "def fillna(df, col: str, forward: bool):\n na_prev = len(df)\n report = f'fillna(\"{col}\") ' + ('forward' if forw...
[ "0.72520655", "0.7179293", "0.682089", "0.6702821", "0.6475909", "0.64667165", "0.6398211", "0.63589644", "0.63528156", "0.62584347", "0.62095916", "0.6166042", "0.5965659", "0.59180915", "0.5907828", "0.5853081", "0.58448815", "0.5775503", "0.5749707", "0.573146", "0.5726099...
0.7465342
0
2dim version of `ffill_1d_nb`.
def ffill_nb(a): out = np.empty_like(a, dtype=np.float_) for col in range(a.shape[1]): out[:, col] = ffill_1d_nb(a[:, col]) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ffill_1d_nb(a):\n out = np.empty_like(a, dtype=np.float_)\n lastval = a[0]\n for i in range(a.shape[0]):\n if np.isnan(a[i]):\n out[i] = lastval\n else:\n lastval = out[i] = a[i]\n return out", "def fshift_1d_nb(a, n):\n out = np.empty_like(a, dtype=np.float...
[ "0.5882496", "0.5856799", "0.5845009", "0.57291883", "0.5685546", "0.5651168", "0.5548395", "0.5343363", "0.5322655", "0.5297623", "0.5285086", "0.5265126", "0.52508646", "0.5250704", "0.5213853", "0.51769495", "0.51745164", "0.5145978", "0.5092866", "0.50727105", "0.5066917"...
0.55802375
6
Return cumulative sum. Numba equivalent to `pd.Series(a).cumsum()`.
def cumsum_1d_nb(a): out = np.empty_like(a, dtype=np.float_) cumsum = 0 for i in range(a.shape[0]): if ~np.isnan(a[i]): cumsum += a[i] out[i] = cumsum else: out[i] = np.nan return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cumsum_nb(a):\n out = np.empty_like(a, dtype=np.float_)\n for col in range(a.shape[1]):\n out[:, col] = cumsum_1d_nb(a[:, col])\n return out", "def cumulative_sum(array):\n res = []\n val = 0\n for elem in array:\n val += elem\n res.append(val)\n return res", "def ...
[ "0.729441", "0.7118105", "0.6927193", "0.6921833", "0.6921833", "0.6921833", "0.6842381", "0.68385166", "0.67951196", "0.66733295", "0.6627982", "0.6627982", "0.6627982", "0.65124744", "0.6508066", "0.649074", "0.64254117", "0.6392353", "0.6287734", "0.62747025", "0.62640893"...
0.72638595
1
2dim version of `cumsum_1d_nb`.
def cumsum_nb(a): out = np.empty_like(a, dtype=np.float_) for col in range(a.shape[1]): out[:, col] = cumsum_1d_nb(a[:, col]) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cumsum_1d_nb(a):\n out = np.empty_like(a, dtype=np.float_)\n cumsum = 0\n for i in range(a.shape[0]):\n if ~np.isnan(a[i]):\n cumsum += a[i]\n out[i] = cumsum\n else:\n out[i] = np.nan\n return out", "def multidim_cumsum(a):\n out = a.cumsum(-1)\n...
[ "0.70260257", "0.6668995", "0.64561933", "0.6431258", "0.6190682", "0.6190682", "0.6190682", "0.6141298", "0.61243916", "0.60144854", "0.5971277", "0.5971277", "0.5971277", "0.5963875", "0.5806423", "0.5695392", "0.5657826", "0.5608475", "0.5578742", "0.5571719", "0.55624425"...
0.7805969
0
Return cumulative product. Numba equivalent to `pd.Series(a).cumprod()`.
def cumprod_1d_nb(a): out = np.empty_like(a, dtype=np.float_) cumprod = 1 for i in range(a.shape[0]): if ~np.isnan(a[i]): cumprod *= a[i] out[i] = cumprod else: out[i] = np.nan return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cumprod_nb(a):\n out = np.empty_like(a, dtype=np.float_)\n for col in range(a.shape[1]):\n out[:, col] = cumprod_1d_nb(a[:, col])\n return out", "def cumprod(a, axis=None, dtype=None, out=None):\n a = astensor(a)\n if dtype is None:\n dtype = np.empty((1,), dtype=a.dtype).cumprod...
[ "0.7848516", "0.7404866", "0.7280517", "0.7270639", "0.6985397", "0.6985397", "0.6985397", "0.6798534", "0.6707382", "0.6703669", "0.6639374", "0.66227746", "0.66227746", "0.66227746", "0.63983387", "0.62444353", "0.59865916", "0.59727186", "0.5826212", "0.57823074", "0.57476...
0.7197466
4
Compute sum while ignoring NaNs.
def nansum_nb(a): out = np.empty(a.shape[1], dtype=np.float_) for col in range(a.shape[1]): out[col] = np.nansum(a[:, col]) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_sum(self):\r\n try:\r\n return self._sum\r\n except AttributeError:\r\n self._sum = self.no_nan.sum()\r\n # The following 2 lines are needede as in Python 3.3 with NumPy\r\n # 1.7.1, numpy.ndarray and numpy.memmap aren't hashable.\r\n if...
[ "0.75137854", "0.7415695", "0.67734337", "0.67505515", "0.6728286", "0.65484893", "0.63748986", "0.6366432", "0.63555986", "0.63446826", "0.6302369", "0.62613815", "0.6163738", "0.6158994", "0.6141497", "0.6141497", "0.61073536", "0.61012983", "0.6053531", "0.60525596", "0.60...
0.0
-1
Compute minimum while ignoring NaNs.
def nanmin_nb(a): out = np.empty(a.shape[1], dtype=np.float_) for col in range(a.shape[1]): out[col] = np.nanmin(a[:, col]) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nanmin(a, axis=None):\n y = array(a,subok=True)\n if not issubclass(y.dtype.type, _nx.integer):\n y[isnan(a)] = _nx.inf\n return y.min(axis)", "def min(*x, na_rm: bool = False) -> Any:\n fun = numpy.nanmin if na_rm else numpy.min\n x = Collection(*x) # flatten\n return fun(x)", "de...
[ "0.776101", "0.7638634", "0.7177369", "0.7100268", "0.7027564", "0.69668174", "0.6920701", "0.69047225", "0.68549204", "0.68549204", "0.68139726", "0.6799718", "0.6788962", "0.67788374", "0.67781055", "0.67675817", "0.67490923", "0.673655", "0.6735178", "0.6734176", "0.672313...
0.68829256
8
2dim version of `rolling_min_1d_nb`.
def rolling_min_nb(a, window, minp=None): out = np.empty_like(a, dtype=np.float_) for col in range(a.shape[1]): out[:, col] = rolling_min_1d_nb(a[:, col], window, minp=minp) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rolling_min_1d_nb(a, window, minp=None):\n if minp is None:\n minp = window\n if minp > window:\n raise ValueError(\"minp must be <= window\")\n out = np.empty_like(a, dtype=np.float_)\n for i in range(a.shape[0]):\n minv = a[i]\n cnt = 0\n for j in range(max(i - ...
[ "0.78115547", "0.6897796", "0.6882793", "0.6635305", "0.6569399", "0.6468482", "0.63661027", "0.63655484", "0.6358146", "0.63500434", "0.6315761", "0.62980354", "0.60597724", "0.59865475", "0.5861142", "0.58517003", "0.5803009", "0.57654744", "0.5556256", "0.5529269", "0.5523...
0.8241624
0
2dim version of `rolling_max_1d_nb`.
def rolling_max_nb(a, window, minp=None): out = np.empty_like(a, dtype=np.float_) for col in range(a.shape[1]): out[:, col] = rolling_max_1d_nb(a[:, col], window, minp=minp) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rolling_max_1d_nb(a, window, minp=None):\n if minp is None:\n minp = window\n if minp > window:\n raise ValueError(\"minp must be <= window\")\n out = np.empty_like(a, dtype=np.float_)\n for i in range(a.shape[0]):\n maxv = a[i]\n cnt = 0\n for j in range(max(i - ...
[ "0.7357959", "0.64673924", "0.64285994", "0.6265381", "0.61391354", "0.6136891", "0.61321187", "0.60364306", "0.603252", "0.59495854", "0.5926848", "0.5924983", "0.5888799", "0.5806172", "0.58005863", "0.57539153", "0.5729621", "0.5706541", "0.5704524", "0.57016724", "0.56742...
0.8122988
0
Return rolling mean. Numba equivalent to `pd.Series(a).rolling(window, min_periods=minp).mean()`.
def rolling_mean_1d_nb(a, window, minp=None): if minp is None: minp = window if minp > window: raise ValueError("minp must be <= window") out = np.empty_like(a, dtype=np.float_) cumsum_arr = np.zeros_like(a) cumsum = 0 nancnt_arr = np.zeros_like(a) nancnt = 0 for i in ran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rolling_mean_nb(a, window, minp=None):\n out = np.empty_like(a, dtype=np.float_)\n for col in range(a.shape[1]):\n out[:, col] = rolling_mean_1d_nb(a[:, col], window, minp=minp)\n return out", "def get_rolling_mean(values, window):\r\n return pd.rolling_mean(values, window=window)", "def...
[ "0.83220303", "0.73943835", "0.7295715", "0.72440356", "0.72184867", "0.7179865", "0.7138452", "0.7081786", "0.6894818", "0.6835533", "0.66783994", "0.6536668", "0.65203977", "0.6497578", "0.6462237", "0.6439569", "0.64278597", "0.63949335", "0.63870025", "0.6383495", "0.6378...
0.79132164
1
2dim version of `rolling_mean_1d_nb`.
def rolling_mean_nb(a, window, minp=None): out = np.empty_like(a, dtype=np.float_) for col in range(a.shape[1]): out[:, col] = rolling_mean_1d_nb(a[:, col], window, minp=minp) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rolling_mean_1d_nb(a, window, minp=None):\n if minp is None:\n minp = window\n if minp > window:\n raise ValueError(\"minp must be <= window\")\n out = np.empty_like(a, dtype=np.float_)\n cumsum_arr = np.zeros_like(a)\n cumsum = 0\n nancnt_arr = np.zeros_like(a)\n nancnt = 0\...
[ "0.72724813", "0.7177004", "0.6717779", "0.6577347", "0.65658695", "0.6505137", "0.645798", "0.6333078", "0.6294583", "0.62138", "0.6146726", "0.61288553", "0.6093237", "0.6076656", "0.6066089", "0.6060677", "0.6031283", "0.60178477", "0.6002906", "0.594279", "0.5864693", "...
0.7941128
0
2dim version of `expanding_max_1d_nb`.
def expanding_max_nb(a, minp=1): out = np.empty_like(a, dtype=np.float_) for col in range(a.shape[1]): out[:, col] = expanding_max_1d_nb(a[:, col], minp=minp) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expanding_max_1d_nb(a, minp=1):\n out = np.empty_like(a, dtype=np.float_)\n maxv = a[0]\n cnt = 0\n for i in range(a.shape[0]):\n if np.isnan(maxv) or a[i] > maxv:\n maxv = a[i]\n if ~np.isnan(a[i]):\n cnt += 1\n if cnt < minp:\n out[i] = np.nan...
[ "0.66165686", "0.63758975", "0.6279379", "0.6068424", "0.60672396", "0.5987952", "0.59416264", "0.59416264", "0.59416264", "0.5934097", "0.5927108", "0.59209627", "0.59209627", "0.58489984", "0.58253676", "0.58158976", "0.5802326", "0.5798868", "0.5729575", "0.56618136", "0.5...
0.74369216
0
2dim version of `expanding_std_1d_nb`.
def expanding_std_nb(a, minp=1, ddof=0): return rolling_std_nb(a, a.shape[0], minp=minp, ddof=ddof)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expanding_std_1d_nb(a, minp=1, ddof=0):\n return rolling_std_1d_nb(a, a.shape[0], minp=minp, ddof=ddof)", "def ewm_std_nb(a, span, minp=None, adjust=False, ddof=0):\n out = np.empty_like(a, dtype=np.float_)\n for col in range(a.shape[1]):\n out[:, col] = ewm_std_1d_nb(a[:, col], span, minp=mi...
[ "0.70600325", "0.6527576", "0.6485103", "0.6385772", "0.6307852", "0.5999371", "0.587445", "0.5581555", "0.5560771", "0.5442349", "0.54413056", "0.53957534", "0.5343081", "0.5287992", "0.527121", "0.5262225", "0.5214403", "0.5209217", "0.52025557", "0.5151612", "0.5139974", ...
0.6696952
1
`rolling_apply_nb` with `apply_func_nb` being applied on all columns at once. `apply_func_nb` should accept index of the row, the 2dim array, and `args`. Should return a single value or an array of shape `a.shape[1]`.
def rolling_apply_matrix_nb(a, window, apply_func_nb, *args): out = np.empty_like(a, dtype=np.float_) for i in range(a.shape[0]): window_a = a[max(0, i + 1 - window):i + 1, :] out[i, :] = apply_func_nb(i, window_a, *args) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rolling_apply_nb(a, window, apply_func_nb, *args):\n out = np.empty_like(a, dtype=np.float_)\n for col in range(a.shape[1]):\n for i in range(a.shape[0]):\n window_a = a[max(0, i + 1 - window):i + 1, col]\n out[i, col] = apply_func_nb(i, col, window_a, *args)\n return out"...
[ "0.87804973", "0.8421338", "0.8008593", "0.7876035", "0.78163284", "0.7780585", "0.7130206", "0.6657945", "0.6631884", "0.65617424", "0.6536945", "0.6360081", "0.5976281", "0.5975402", "0.5893036", "0.5823174", "0.58160067", "0.57674617", "0.57185954", "0.5688779", "0.5641189...
0.8360744
2
Expanding version of `rolling_apply_nb`.
def expanding_apply_nb(a, apply_func_nb, *args): return rolling_apply_nb(a, a.shape[0], apply_func_nb, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rolling_apply_nb(a, window, apply_func_nb, *args):\n out = np.empty_like(a, dtype=np.float_)\n for col in range(a.shape[1]):\n for i in range(a.shape[0]):\n window_a = a[max(0, i + 1 - window):i + 1, col]\n out[i, col] = apply_func_nb(i, col, window_a, *args)\n return out"...
[ "0.8199851", "0.77756727", "0.7604127", "0.6309253", "0.62816423", "0.62750715", "0.6223742", "0.61300874", "0.6118071", "0.61130774", "0.6090748", "0.6090433", "0.6035834", "0.59594023", "0.5949952", "0.5943352", "0.5914892", "0.5854674", "0.5839197", "0.57409954", "0.570012...
0.8394737
0
Apply `apply_func_nb` on each column and reduce into a single value using `reduce_func_nb`. `apply_func_nb` should accept index of the column, the column itself, and `apply_args`. Should return an array. `reduce_func_nb` should accept index of the column, the array of results from `apply_func_nb` for that column, and `...
def apply_and_reduce_nb(a, apply_func_nb, apply_args, reduce_func_nb, reduce_args): out = np.full(a.shape[1], np.nan, dtype=np.float_) for col in range(a.shape[1]): mapped = apply_func_nb(col, a[:, col], *apply_args) out[col] = reduce_func_nb(col, mapped, *reduce_args) return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reduce_nb(a, reduce_func_nb, *args):\n out = np.full(a.shape[1], np.nan, dtype=np.float_)\n\n for col in range(a.shape[1]):\n out[col] = reduce_func_nb(col, a[:, col], *args)\n return out", "def apply_along_0_nb(a, apply_func_nb, *args):\n out = np.empty_like(a, dtype=np.float_)\n for c...
[ "0.790606", "0.72889984", "0.7120107", "0.71171147", "0.66922724", "0.6574183", "0.6430586", "0.637034", "0.6312294", "0.6308867", "0.6172909", "0.6142132", "0.61060613", "0.5933113", "0.57645303", "0.57246864", "0.5682301", "0.5630973", "0.5544581", "0.55071765", "0.54087436...
0.85531735
0
Reduce each column into an array of values using `reduce_func_nb`. `reduce_func_nb` same as for `reduce_nb` but should return an array. !!! note Output of `reduce_func_nb` should be strictly homogeneous.
def reduce_to_array_nb(a, reduce_func_nb, *args): out_inited = False for col in range(a.shape[1]): col_out = reduce_func_nb(col, a[:, col], *args) if not out_inited: out = np.full((col_out.shape[0], a.shape[1]), np.nan, dtype=np.float_) out_inited = True out[:, co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reduce_nb(a, reduce_func_nb, *args):\n out = np.full(a.shape[1], np.nan, dtype=np.float_)\n\n for col in range(a.shape[1]):\n out[col] = reduce_func_nb(col, a[:, col], *args)\n return out", "def apply_and_reduce_nb(a, apply_func_nb, apply_args, reduce_func_nb, reduce_args):\n out = np.full...
[ "0.8171574", "0.7219686", "0.667881", "0.6515728", "0.64682776", "0.6446922", "0.62384856", "0.61375034", "0.60661936", "0.6064691", "0.5884276", "0.5845595", "0.5840709", "0.5813509", "0.5790044", "0.57245135", "0.5657533", "0.55831814", "0.55553824", "0.554208", "0.547044",...
0.80463344
1
Squeeze each group of columns into a single column using `reduce_func_nb`. `reduce_func_nb` should accept index of the row, index of the group, the array, and `args`. Should return a single value.
def squeeze_grouped_nb(a, group_lens, reduce_func_nb, *args): out = np.empty((a.shape[0], len(group_lens)), dtype=np.float_) from_col = 0 for group in range(len(group_lens)): to_col = from_col + group_lens[group] for i in range(a.shape[0]): out[i, group] = reduce_func_nb(i, group...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reduce_nb(a, reduce_func_nb, *args):\n out = np.full(a.shape[1], np.nan, dtype=np.float_)\n\n for col in range(a.shape[1]):\n out[col] = reduce_func_nb(col, a[:, col], *args)\n return out", "def apply_and_reduce_nb(a, apply_func_nb, apply_args, reduce_func_nb, reduce_args):\n out = np.full...
[ "0.765576", "0.7159413", "0.7097519", "0.69539857", "0.68771464", "0.66874593", "0.6635441", "0.6440793", "0.64305043", "0.6168663", "0.61510545", "0.6071603", "0.598479", "0.5906788", "0.58901197", "0.58599883", "0.58065486", "0.5737186", "0.5524302", "0.5514421", "0.545181"...
0.72938776
1
Return min (ignores NaNs).
def min_reduce_nb(col, a, *args): return np.nanmin(a)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def min(self):\n return self._reduce_for_stat_function(F.min, only_numeric=False)", "def nanmin(a, axis=None):\n y = array(a,subok=True)\n if not issubclass(y.dtype.type, _nx.integer):\n y[isnan(a)] = _nx.inf\n return y.min(axis)", "def find_min(self):\n return self.min", "def f...
[ "0.818509", "0.7700785", "0.7694642", "0.7694642", "0.7647146", "0.76172185", "0.76172185", "0.7573655", "0.7573655", "0.75588876", "0.7463606", "0.7454334", "0.7449177", "0.744844", "0.7437854", "0.74364007", "0.74225664", "0.73983765", "0.739828", "0.7381866", "0.734339", ...
0.0
-1
Return max (ignores NaNs).
def max_reduce_nb(col, a, *args): return np.nanmax(a)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def maximum(x):\n return np.maximum(x, 0)", "def max(self):\n # skipna == True\n return self._summarize(lambda c: c.max)", "def max(self):\n return self._reduce_for_stat_function(F.max, only_numeric=False)", "def nanmax(a, axis=None):\n y = array(a, subok=True)\n if not issubcla...
[ "0.78311163", "0.78293115", "0.7792085", "0.7704792", "0.76747066", "0.7601327", "0.749361", "0.7475772", "0.7445212", "0.7390238", "0.7365124", "0.7300378", "0.72808844", "0.72396713", "0.7226069", "0.7200039", "0.71865714", "0.7186207", "0.7182148", "0.71559256", "0.7144005...
0.67442745
80
Return median (ignores NaNs).
def median_reduce_nb(col, a, *args): return np.nanmedian(a)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def median(self):\n # TO DO\n pass", "def median(self):\n return self._lift(\"median\")", "def median(self) -> Union[int, float]:\n return self._data.median()", "def median(self):\n self.data.sort()\n\n if len(self.data) % 2 == 1:\n median = self.data[int(...
[ "0.803035", "0.78703016", "0.7836865", "0.77522236", "0.7743472", "0.7739", "0.76979", "0.7658855", "0.76323164", "0.7631114", "0.7625402", "0.7575635", "0.7561642", "0.75584155", "0.7556121", "0.75471663", "0.7527818", "0.74997187", "0.7484937", "0.74691457", "0.74666107", ...
0.7176591
48
Return sum (ignores NaNs).
def sum_reduce_nb(col, a, *args): return np.nansum(a)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_sum(self):\r\n try:\r\n return self._sum\r\n except AttributeError:\r\n self._sum = self.no_nan.sum()\r\n # The following 2 lines are needede as in Python 3.3 with NumPy\r\n # 1.7.1, numpy.ndarray and numpy.memmap aren't hashable.\r\n if...
[ "0.81278396", "0.79884547", "0.7448403", "0.73951423", "0.71912146", "0.7136143", "0.70350057", "0.69905025", "0.69905025", "0.6981821", "0.6868841", "0.68629724", "0.6812627", "0.67874086", "0.6746636", "0.67187256", "0.6639768", "0.66243935", "0.66006225", "0.6594511", "0.6...
0.6019934
64
Return position of min.
def argmin_reduce_nb(col, a, *args): a = np.copy(a) mask = np.isnan(a) if np.all(mask): raise ValueError("All-NaN slice encountered") a[mask] = np.inf return np.argmin(a)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def min_position(self):\n raise NotImplementedError", "def get_min_position(self):\n raise NotImplementedError()", "def find_min(self):\n return self.min", "def find_min(self):\n return self.min", "def min(self):\n return self._min_coords", "def imin(self):\n ret...
[ "0.8499343", "0.8485304", "0.81408", "0.81408", "0.7933797", "0.7764021", "0.756247", "0.75451374", "0.75133", "0.75087506", "0.7506107", "0.74865085", "0.7470659", "0.74699706", "0.74699706", "0.74607205", "0.7442961", "0.74411064", "0.74411064", "0.7425916", "0.74016213", ...
0.0
-1
Get perspective transformation of box bottom center
def get_pt_box_info(box_info, pt_obj): if type(box_info) is dict: pt_box_info = {} for elem in box_info: box_list, frame_list = zip(*box_info[elem]['list']) center_box_list = get_box_center(box_list) pt_box_list = pt_obj.get_pred_transform(center_box_list) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def perspective_transform():\n src = np.float32([(220,720), (1110, 720), (570, 470), (722, 470)]) # Manually get these numbers from plot\n dst = np.float32([[320, 720], [920, 720], [320, 1], [920, 1]])\n M = cv2.getPerspectiveTransform(src, dst)\n Minv = cv2.getPerspectiveTransform(dst, src)\n\n re...
[ "0.6773212", "0.66862184", "0.6311832", "0.62636185", "0.6255078", "0.6119014", "0.6109989", "0.6053006", "0.6053006", "0.5986453", "0.59195083", "0.5919031", "0.5898265", "0.5870824", "0.583474", "0.5830994", "0.5821053", "0.58060884", "0.5777797", "0.57735324", "0.576591", ...
0.0
-1
r"""Returns a number representing complexity of this charclass. items is a list of either categories (like '\s'), literals (numeric), or 2tuples representing a range (which is assumed of homogeneous class.
def charclass_score(items, negated=False): if isinstance(items, CharClass): # This is for testing -- given a parsed CharClass, returns the length of # the string inside [] return items.end - items.start - 2 return len(build_output(items)) + (negated and 1 or 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def complexity(self) -> str:\n return pulumi.get(self, \"complexity\")", "def complexity(self):\n raise NotImplementedError()", "def len_special(self):\n return sum(self.count(term_chars) * len(term_chars) for term_chars in termcolor.values())", "def complexity(self):\n from kinba...
[ "0.5609531", "0.5482491", "0.52248716", "0.5054934", "0.48603004", "0.48528475", "0.48457083", "0.47844338", "0.47798455", "0.47781646", "0.4746956", "0.4742149", "0.474034", "0.4716559", "0.47017053", "0.4689266", "0.46859598", "0.46822575", "0.4678112", "0.46629584", "0.463...
0.7295002
0
Get LoD input data whose instance size is 0. All sequence related OP unittests should call this function to contain the case of instance size is 0.
def get_sequence_instance_size_0_input(self, lod=None, shape=None): if lod is None: lod = [[0, 0, 4, 0, 3, 0, 0, 5, 0, 0]] if shape is None: shape = [12, 10] assert len(lod[0]) >= 8 assert ( lod[0][0] == 0 and lod[0][1] == 0 and...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_missing(data):\n return type(data)._from_sequence([None, data[0]])", "def zeros_target(size):\n data = torch.zeros(size, 1)\n return data", "def test_slice_of_length_zero(self):\n for i, shape in enumerate([(3,), (2, 2,), (2, 1, 5)]):\n dset = self.f.create_dataset('x%d'%i,...
[ "0.5917716", "0.57628274", "0.57343227", "0.56707036", "0.5645138", "0.560106", "0.5556385", "0.5531468", "0.5502699", "0.54714304", "0.5409338", "0.5360544", "0.53487426", "0.53484756", "0.5346826", "0.5341189", "0.5318439", "0.5307024", "0.53022236", "0.52827996", "0.528170...
0.69211954
0
Generate grad_feed_map for grad_program. since we don`t really check gradient accuracy, but check the consistency when using and not using inplace, we use fwd outs (also inputs sometimes) to construct grad inputs.
def _construct_grad_feed_map_from_forward( self, place, fwd_res, grad_op_desc, op_grad_to_var ): ( fwd_outs, fwd_fetch_list, fwd_feed_map, fwd_program, fwd_op_desc, ) = fwd_res p = core.Place() p.set_place(place) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _populate_grad_dict(var_to_app_to_idx, grad_dict, wrt, cost_name=None):\n # build a dict mapping node to the terms node contributes to each of\n # its inputs' gradients\n term_dict = {}\n\n def access_term_cache(node):\n \"\"\"Populates term_dict[node] and returns it\"\"\"\n\n if node...
[ "0.6196562", "0.6155632", "0.6106871", "0.6087333", "0.6076358", "0.5939158", "0.59305316", "0.58825815", "0.5825469", "0.5796223", "0.579376", "0.57896477", "0.5786154", "0.5775554", "0.5772361", "0.57712424", "0.5757668", "0.57354116", "0.5727737", "0.5721268", "0.5716752",...
0.68448097
0
Calculate grad_output for given grad_op_desc. since we don`t really check gradient accuracy, but check the consistency when using and not using inplace, we use fwd outs (also inputs sometimes) to construct grad inputs.
def _calc_grad_output( self, place, fwd_res, grad_op_desc, enable_inplace=None ): with paddle.fluid.framework._static_guard(): ( fwd_outs, fwd_fetch_list, fwd_feed_map, fwd_program, fwd_op_desc, )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_gradient(self, grad=None):\n input_value = self.input_nodes[0].output_value\n\n if grad is None:\n grad = backend.ones_like(self.output_value)\n return grad * backend.multiply(2.0, input_value)", "def gradient(self, node, output_grad):\r\n return [auto_sum_op(ou...
[ "0.7191848", "0.71614903", "0.6994278", "0.6993808", "0.6974252", "0.69682276", "0.6911322", "0.69027734", "0.68975836", "0.68824446", "0.6869781", "0.68320847", "0.6828969", "0.6824793", "0.681061", "0.6738231", "0.67337245", "0.6721449", "0.6711873", "0.67108184", "0.671081...
0.8038229
0
Return a list of indices of the nondominated points in the set `Z`.
def nondom(Z, axis=1): nondominated = [] for n, z in enumerate(Z): # Count the number of points that dominate `z`. ndominators = \ np.sum(np.all(Z <= z, axis=axis) & np.any(Z < z, axis=axis)) # If `z` doesn't have any dominators, then it must be non-dominated! ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nondominated_points(self):\n return self._nondominated_points", "def define_neighbors(x: int, y: int, z: int) -> list:\n diffs = range(-1, 2)\n coords = []\n # might need to add some if guards (if x > 0) (if x < len(blah) etc)\n xdiffs = (x + diff for diff in diffs)\n ydiffs = (y + diff...
[ "0.6452077", "0.62637794", "0.61285937", "0.5992533", "0.5992533", "0.59214395", "0.5840288", "0.58023125", "0.57962894", "0.57961994", "0.57892466", "0.57892466", "0.57892466", "0.57786334", "0.57429737", "0.5670526", "0.56362724", "0.5586435", "0.55779535", "0.5554876", "0....
0.7864081
0
Add a line at axis and value.
def add_line(self, axis, value): if axis == 'x': self.axes.axvline(value) elif axis == 'y': self.axes.axhline(value) else: raise ValueError("Axis must be one of X or Y.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def line(self, x, y):\n self.call('line', x, y)", "def line(\n self, x: Hashable | None = None, y: Hashable | None = None, **kwargs\n ) -> PlotAccessor:\n return self(kind=\"line\", x=x, y=y, **kwargs)", "def vline(self, value, zorder=1):\n self.ax.axvline(x=value, color=self.col...
[ "0.70121545", "0.67916757", "0.672158", "0.6556058", "0.65418917", "0.650084", "0.64919055", "0.63209814", "0.63136846", "0.62398636", "0.62380767", "0.6195234", "0.6151647", "0.61504924", "0.61337596", "0.6114267", "0.61086804", "0.60983306", "0.60873616", "0.6045331", "0.60...
0.87071544
0
Name of simulation output files.
def filename(N, Dr, g, launch): return 'N%s_R%s_G%s_E%s.datR' % tuple(map(float_to_letters, (N, Dr, g, launch)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def output_files(self):\n # Output file for Moller generation\n if 'moller' in self.name:\n return ['moller.stdhep']\n # Output file for beam generation\n return ['beam.stdhep']", "def outfile(self):\n\n return f\"{self.name}.run.out\"", "def full_name(self):\n ...
[ "0.78144985", "0.72868776", "0.68119735", "0.68096364", "0.66997063", "0.6684574", "0.66707873", "0.65300953", "0.6453661", "0.6453661", "0.6453661", "0.6453661", "0.643955", "0.64336705", "0.6426606", "0.6363488", "0.63617104", "0.63265705", "0.6320594", "0.62604064", "0.623...
0.0
-1
Generates a random string as the log message. The string comes with a given size and character collection.
def _random_string(self, size, chars=None): return ''.join(random.choice(chars or _DEFAULT_CHARS) for _ in range(size))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stringGen(size, chars=string.ascii_uppercase + string.digits):\n\treturn ''.join(random.choice(chars) for _ in range(size))", "def generate_rnd_msg() -> str:\n\n char_num = random.randint(8,20)\n i = 0\n s = \"\"\n for n in range(char_num):\n if i == char_num:\n break\n r...
[ "0.7690786", "0.75509864", "0.7317855", "0.73016554", "0.70865256", "0.70783573", "0.70671386", "0.69451886", "0.689651", "0.6875334", "0.68627197", "0.68624705", "0.6835396", "0.6826095", "0.6797516", "0.67968255", "0.67942363", "0.67898315", "0.67850584", "0.6774534", "0.67...
0.7783902
0
Constructor for a node action object.
def __init__(self, target, action, context, **kwargs): super(NodeAction, self).__init__(target, action, context, **kwargs) try: self.entity = node_mod.Node.load(self.context, node_id=self.target) except Exception: self.entity = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, action=0):\n self.action = action", "def __init__(self, name=None):\n from uuid import uuid4\n self.inputs = []\n self.uuid = uuid4()\n self.name = name\n\n # RootAction will return new instance only \n # for first node in module\n se...
[ "0.77015305", "0.71742094", "0.7100722", "0.6889977", "0.6889977", "0.687277", "0.67427766", "0.66879296", "0.6652974", "0.6649353", "0.6642204", "0.66000247", "0.6558428", "0.65571535", "0.65188605", "0.64979774", "0.64721036", "0.64317834", "0.64038146", "0.63258815", "0.62...
0.7408976
1
Impute the missing values. Note that leaving y=None can lead to inconsistencies in data length between X and y if rows are dropped during the transformation.
def transform( self, X: FEATURES, y: TARGET | None = None, ) -> PANDAS | tuple[DATAFRAME, PANDAS]: check_is_fitted(self) X, y = self._prepare_input(X, y, columns=self.feature_names_in_) self.log("Imputing missing values...", 1) # Replace all missing values w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def impute(data):\n for column in data:\n column_data = data[column]\n if column_data.dtype in (np.int, np.float):\n fill_value = column_data.mean()\n else:\n fill_value = column_data.mode()[0]\n\n data[column] = data[column].fillna(fill_value)\n\n return dat...
[ "0.7157411", "0.6694081", "0.6675296", "0.6591954", "0.6495997", "0.62413144", "0.62397134", "0.6222104", "0.62152004", "0.61486304", "0.6126565", "0.6099314", "0.6044103", "0.60293037", "0.60141855", "0.60096467", "0.5988358", "0.59847057", "0.59582746", "0.5952547", "0.5920...
0.6400653
5
Return all Workflow Collection Subscriptions for the current user.
def get(self, request): serializer = WorkflowCollectionSubscriptionSummarySerializer( WorkflowCollectionSubscription.objects.filter(user=request.user), many=True, context={"request": request}, ) return Response(data=serializer.data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_subscriptions(self):\n return self.subscriptions.all()", "def subscriptions(self):\r\n return subs.AccountSubscriptions(self)", "def getAllSubscriptions(self):\n return self.request(\n \"getAllSubscriptions\",\n )", "def get_subscriptions(self):\n url = '...
[ "0.7495568", "0.7080598", "0.7036358", "0.7011966", "0.69711804", "0.6932357", "0.69141114", "0.68824154", "0.68109185", "0.6776058", "0.6721384", "0.6682816", "0.66797316", "0.6627956", "0.66110873", "0.6549383", "0.6528373", "0.6506206", "0.65005016", "0.6497788", "0.648369...
0.64947987
20
Retrieve a WorkflowCollectionSubscription representation.
def get(self, request, id): workflow_collection_subscription = get_object_or_404( WorkflowCollectionSubscription, id=id, user=request.user.id, ) serializer = WorkflowCollectionSubscriptionSummarySerializer( workflow_collection_subscription, conte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self, request):\n serializer = WorkflowCollectionSubscriptionSummarySerializer(\n WorkflowCollectionSubscription.objects.filter(user=request.user),\n many=True,\n context={\"request\": request},\n )\n\n return Response(data=serializer.data)", "def get...
[ "0.68150395", "0.60592496", "0.5958709", "0.58372164", "0.57599586", "0.57599586", "0.56552786", "0.56495273", "0.5541688", "0.5524879", "0.54604775", "0.5419766", "0.5385091", "0.5349031", "0.534462", "0.534462", "0.5266469", "0.51904345", "0.51701355", "0.51673067", "0.5155...
0.64709157
1
liefert die vorhandenen Gruppen der Organisation org_id
def get_groups(org_id, primary_only=False): groups = get_groups_by_org_id(org_id) ret = [] for group in groups: if not primary_only or group.is_primary: ret.append( { 'id': group.id, 'description': group.description, 'is_primary': group.is_primary} ) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"org_id\")", "def test_retrieve_l_organization(self):\n pass", "def org_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"org_id\")", "def org_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(s...
[ "0.60829526", "0.6081244", "0.6022286", "0.6003161", "0.59705824", "0.59683555", "0.59033537", "0.58925307", "0.5887167", "0.5880952", "0.5875457", "0.58674335", "0.5862764", "0.5849434", "0.58493876", "0.58443016", "0.58416104", "0.58307415", "0.58233196", "0.58163786", "0.5...
0.0
-1
Decorator used to mark a function as required. It works in a similar way to abc.abstractmethod.
def requiredtransformer(fn) -> Callable: @functools.wraps(fn) def wrapper(*args, **kwargs): return fn(*args, **kwargs) setattr(wrapper, '__isrequiredtransformer__', True) return wrapper
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def required(f):\n f.__required__ = True\n return f", "def require_arguments(required):\n\n def decorator(func):\n def wrapper(request):\n request_params = get_dict_from_request(request)\n for param in required:\n if param not in request_params:\n ...
[ "0.79770494", "0.67077154", "0.66911197", "0.6540572", "0.6528319", "0.6475199", "0.6472224", "0.63043344", "0.62267274", "0.617868", "0.61511064", "0.60863245", "0.6034542", "0.6031916", "0.6007255", "0.600242", "0.5998451", "0.59980655", "0.59678215", "0.595898", "0.5941912...
0.68569547
1
BERT initialization using normal distribution.
def init_params_bert(module, std): if isinstance(module, (nn.Linear, nn.Embedding)): if module.weight.requires_grad: nn.init.normal_(module.weight, std=std) if isinstance(module, nn.Embedding): if module.padding_idx is not None: with torch.no_grad(): modu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_bert_params(module):\n\n if isinstance(module, nn.Linear):\n module.weight.data.normal_(mean=0.0, std=0.02)\n if module.bias is not None:\n module.bias.data.zero_()\n if isinstance(module, nn.Embedding):\n module.weight.data.normal_(mean=0.0, std=0.02)\n if mod...
[ "0.6467017", "0.63909435", "0.6351772", "0.634881", "0.6332692", "0.63236904", "0.6309077", "0.6280044", "0.62780696", "0.6267155", "0.6265197", "0.6235092", "0.6209818", "0.62048286", "0.62048286", "0.6202254", "0.6176575", "0.61215436", "0.61142755", "0.60981375", "0.608509...
0.6722125
0
Init the ship and its starting position.
def __init__(self, screen, ai_settings): super().__init__() self.screen = screen self.ai_settings = ai_settings # Load ship image and get rect self.image = pygame.image.load('images/ship.bmp') self.rect = self.image.get_rect() self.screen_rect = self.screen.get_r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self):\r\n global ship_image\r\n self.spaceshipgame = SpaceShipGame()\r\n self.spaceshipgame.init()\r\n pos = [1,1]\r\n vel = [1,1]\r\n angle = 0\r\n image = ship_image\r\n\r\n center = [1,1]\r\n size = 1\r\n info = ImageInfo(center, s...
[ "0.74576086", "0.74576086", "0.7332738", "0.7311934", "0.72143805", "0.71281826", "0.71056193", "0.70999765", "0.7033766", "0.70321774", "0.70139015", "0.7001222", "0.6907115", "0.6900508", "0.6884731", "0.6872771", "0.6867547", "0.68376464", "0.6713174", "0.670112", "0.66404...
0.7111028
6
Returns the price of the product.
def getPrice(self): priceElem = self.driver.find_element_by_xpath(self.priceXPath) price = priceElem.text.replace("€", "").replace(" ", "").replace(",", ".") return float(price)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_product_price(product):\n return latest_product_version(product).price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self._price", "def _product_pr...
[ "0.8343824", "0.8261418", "0.8261418", "0.8261418", "0.8234173", "0.8166634", "0.8152286", "0.8108449", "0.80931693", "0.80035686", "0.7998883", "0.7998883", "0.7959676", "0.7893183", "0.78499883", "0.78336424", "0.7749273", "0.7660093", "0.7656379", "0.76368773", "0.753536",...
0.72214264
24
Gets the availability_domain of this Subnet. The subnet's Availability Domain.
def availability_domain(self): return self._availability_domain
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnet(self) -> Optional['outputs.ApiEntityReferenceResponse']:\n return pulumi.get(self, \"subnet\")", "def getSubdomain(self):\n\t\treturn self.Subdomain", "def subnet(self) -> pulumi.Output[Optional['outputs.ResourceIdResponse']]:\n return pulumi.get(self, \"subnet\")", "def GetDomainNam...
[ "0.57429343", "0.5721107", "0.5678309", "0.56571245", "0.55985427", "0.5554405", "0.5530795", "0.5526809", "0.55059624", "0.54984164", "0.5498295", "0.5490662", "0.5379296", "0.53618103", "0.5351397", "0.5351397", "0.5351397", "0.53427327", "0.53342164", "0.53089964", "0.5284...
0.74148744
0
Gets the cidr_block of this Subnet. The subnet's CIDR block.
def cidr_block(self): return self._cidr_block
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cidr_block(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"cidr_block\")", "def cidr(self):\n return self._cidr", "def source_cidr_block(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"source_cidr_block\")", "def cidr(self) -> pulumi.Output[str]:\n r...
[ "0.77194315", "0.6940006", "0.67109865", "0.6687913", "0.6687913", "0.6683693", "0.65239567", "0.64982593", "0.64982593", "0.6478836", "0.64579535", "0.64312685", "0.64312685", "0.63237476", "0.62697816", "0.62536216", "0.60551983", "0.60244095", "0.5983313", "0.5884546", "0....
0.84616166
0
Sets the cidr_block of this Subnet. The subnet's CIDR block.
def cidr_block(self, cidr_block): self._cidr_block = cidr_block
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cidr(self, cidr):\n \n self._cidr = cidr", "def cidr_block(self):\n return self._cidr_block", "def subnet_id(self, subnet_id):\n self._subnet_id = subnet_id", "def _set_block(self, pos, block_):\n _get_mc().setBlock(pos, block_)", "def cidr_block(self) -> Optional[pul...
[ "0.6683341", "0.60274535", "0.5634196", "0.55609953", "0.5508131", "0.54329014", "0.5327674", "0.52692175", "0.5229687", "0.5212357", "0.51460224", "0.5118722", "0.5098186", "0.50402516", "0.5023805", "0.49570805", "0.4927227", "0.49222007", "0.4916448", "0.49008206", "0.4893...
0.8527764
0
Gets the compartment_id of this Subnet. The OCID of the compartment containing the subnet.
def compartment_id(self): return self._compartment_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getCompartmentId(self):\n return _libsbml.CompartmentGlyph_getCompartmentId(self)", "def getId(self):\n return _libsbml.Compartment_getId(self)", "def getId(self):\n return _libsbml.CompartmentReference_getId(self)", "def getId(self):\n return _libsbml.CompartmentType_getId(se...
[ "0.77255243", "0.7629769", "0.7176998", "0.6960446", "0.68992937", "0.6776311", "0.6768573", "0.6540192", "0.64285314", "0.62635505", "0.621313", "0.621313", "0.61942434", "0.6095225", "0.60635924", "0.60551155", "0.60551155", "0.6035237", "0.60317105", "0.6009789", "0.596174...
0.7666477
2
Sets the compartment_id of this Subnet. The OCID of the compartment containing the subnet.
def compartment_id(self, compartment_id): self._compartment_id = compartment_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setCompartmentId(self, *args):\n return _libsbml.CompartmentGlyph_setCompartmentId(self, *args)", "def subnet_id(self, subnet_id):\n self._subnet_id = subnet_id", "def setCompartment(self, *args):\n return _libsbml.CompartmentReference_setCompartment(self, *args)", "def setCompartmen...
[ "0.7309232", "0.66291314", "0.63501763", "0.6246915", "0.60334647", "0.5949833", "0.5949833", "0.5831516", "0.5812783", "0.573233", "0.5667217", "0.55878204", "0.5525265", "0.5488898", "0.54368204", "0.5426248", "0.5411904", "0.5336397", "0.53084904", "0.5285301", "0.52287453...
0.7550095
1
Gets the dhcp_options_id of this Subnet. The OCID of the set of DHCP options associated with the subnet.
def dhcp_options_id(self): return self._dhcp_options_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dhcp_options_id(self, dhcp_options_id):\n self._dhcp_options_id = dhcp_options_id", "def subnet_id(self):\n return self._subnet_id", "def subnet_id(self) -> str:\n return pulumi.get(self, \"subnet_id\")", "def subnet_id(self) -> Optional[str]:\n return pulumi.get(self, \"subne...
[ "0.6008407", "0.59734553", "0.57906556", "0.55500674", "0.5265545", "0.5255307", "0.52354133", "0.52354133", "0.51794493", "0.5111329", "0.5107082", "0.49855602", "0.49519846", "0.49512023", "0.4947952", "0.48495397", "0.48495397", "0.47657058", "0.47656733", "0.47330344", "0...
0.8039769
0
Gets the display_name of this Subnet. A userfriendly name. Does not have to be unique, and it's changeable.
def display_name(self): return self._display_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_display_name(self):\n\n return self._display_name", "def get_display_name(self):\n return self.display_name", "def get_real_name(self):\n return self.get_display_name()", "def display_name(self):\n answer = self._call('display_name')\n return answer.display_name", ...
[ "0.7651339", "0.7625042", "0.7582165", "0.7506971", "0.75005555", "0.74916595", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.7451298", "0.74207366", "0.73874956", "0.7345412",...
0.7333868
24
Sets the display_name of this Subnet. A userfriendly name. Does not have to be unique, and it's changeable.
def display_name(self, display_name): self._display_name = display_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_display_name(self, display_name):\n self._call('set_display_name', display_name=display_name)", "def display_name(self, display_name: str):\n\n self._display_name = display_name", "def display_name(self, display_name):\n\n self._display_name = display_name", "def display_name(sel...
[ "0.7619994", "0.75317913", "0.7412147", "0.7412147", "0.7412147", "0.7412147", "0.7412147", "0.7412147", "0.6957798", "0.67458034", "0.65953934", "0.63671225", "0.6149132", "0.6062988", "0.60518914", "0.59971154", "0.5978899", "0.59749925", "0.596604", "0.59432083", "0.593620...
0.74183935
5
Gets the id of this Subnet. The subnet's Oracle ID (OCID).
def id(self): return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnet_id(self) -> str:\n return pulumi.get(self, \"subnet_id\")", "def subnet_id(self):\n return self._subnet_id", "def subnet_id(self) -> Optional[str]:\n return pulumi.get(self, \"subnet_id\")", "def subnet_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, ...
[ "0.78982145", "0.776951", "0.74499744", "0.7168039", "0.7168039", "0.711136", "0.680597", "0.680597", "0.6786851", "0.6709313", "0.63067", "0.6306683", "0.62734115", "0.61265", "0.61053514", "0.6073471", "0.60331225", "0.59985155", "0.5986469", "0.59638214", "0.5945064", "0...
0.0
-1
Sets the id of this Subnet. The subnet's Oracle ID (OCID).
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnet_id(self, subnet_id):\n self._subnet_id = subnet_id", "def subnet_id(self):\n return self._subnet_id", "def subnet_id(self) -> str:\n return pulumi.get(self, \"subnet_id\")", "def setID(self, idNb):\n self._id = idNb", "def __init__(__self__, *,\n subne...
[ "0.7503195", "0.6453998", "0.64424294", "0.6309343", "0.6023205", "0.60153186", "0.5841312", "0.5821663", "0.5801349", "0.5798412", "0.57887673", "0.57887673", "0.57807714", "0.57396066", "0.57333106", "0.57271254", "0.57074404", "0.5674831", "0.5674831", "0.5674831", "0.5674...
0.5451751
72
Gets the lifecycle_state of this Subnet. The subnet's current state.
def lifecycle_state(self): return self._lifecycle_state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lifecycle_state(self) -> str:\n return self._lifecycle_state", "def getState(self):\n return self._state", "def getState(self):\n return self._state", "def getState(self):\n return self.state", "def getState(self):\n return self.state", "def getState(self):\n ...
[ "0.6689477", "0.6174274", "0.6174274", "0.6136494", "0.6136494", "0.6136494", "0.6101643", "0.6101643", "0.6101643", "0.6101643", "0.6101643", "0.60953784", "0.6063127", "0.6063127", "0.6053046", "0.59943205", "0.5976201", "0.5946867", "0.59428996", "0.59260267", "0.5919402",...
0.70795083
4
Gets the route_table_id of this Subnet. The OCID of the route table the subnet is using.
def route_table_id(self): return self._route_table_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transit_router_route_table_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"transit_router_route_table_id\")", "def transit_router_route_table_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"transit_router_route_table_id\")", "def transit_router_route_table_id(...
[ "0.7209103", "0.6994437", "0.6994437", "0.6404419", "0.6400753", "0.6378458", "0.60562295", "0.60400075", "0.6013927", "0.59870183", "0.5984156", "0.59589547", "0.58376616", "0.58063066", "0.57987607", "0.57987607", "0.57184064", "0.56833446", "0.5625783", "0.5565632", "0.555...
0.80384195
0
Gets the security_list_ids of this Subnet. OCIDs for the security lists to use for VNICs in this subnet.
def security_list_ids(self): return self._security_list_ids
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def security_identities(self):\n return self._security_identities", "def security_group_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:\n return pulumi.get(self, \"security_group_ids\")", "def securities(self) -> List[Security]:\n return self.session.get_securities(self.account_id)...
[ "0.6972368", "0.6421069", "0.64186424", "0.6345579", "0.6345579", "0.6345579", "0.62939775", "0.62939775", "0.62939775", "0.6285963", "0.6264038", "0.62618697", "0.62612677", "0.6241268", "0.6191058", "0.617737", "0.61503977", "0.61458606", "0.61458606", "0.61458606", "0.6054...
0.8163963
0
Sets the security_list_ids of this Subnet. OCIDs for the security lists to use for VNICs in this subnet.
def security_list_ids(self, security_list_ids): self._security_list_ids = security_list_ids
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def security_list_ids(self):\n return self._security_list_ids", "def _set_security_group(client, instance_id_list, security_groups):\n logging.info('Setting the security group of instances.')\n for instance_id in instance_id_list:\n client.modify_instance_attribute(InstanceId=instance_id, Gro...
[ "0.6546427", "0.64365536", "0.615604", "0.55132294", "0.5509209", "0.54309744", "0.5275689", "0.5077458", "0.50312436", "0.4987988", "0.49669695", "0.4903537", "0.4902172", "0.4877372", "0.48688635", "0.4824649", "0.48186883", "0.48186883", "0.48186883", "0.47867867", "0.4779...
0.82660985
0
Gets the time_created of this Subnet. The date and time the subnet was created, in the format defined by RFC3339.
def time_created(self): return self._time_created
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created_time_utc(self) -> str:\n return pulumi.get(self, \"created_time_utc\")", "def create_time(self):\n return self._create_time", "def create_time(self):\n return self._create_time", "def create_time(self):\n return self._create_time", "def created_date_time(self) -> str...
[ "0.7294834", "0.72565144", "0.72565144", "0.72565144", "0.72512585", "0.7212196", "0.7212196", "0.7204089", "0.7204089", "0.7204089", "0.71446264", "0.71446264", "0.71446264", "0.70853657", "0.70853657", "0.70853657", "0.70853657", "0.70853657", "0.70853657", "0.70853657", "0...
0.7010189
39
Gets the vcn_id of this Subnet. The OCID of the VCN the subnet is in.
def vcn_id(self): return self._vcn_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def virtual_network_subnet_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"virtual_network_subnet_id\")", "def subnet_id(self) -> str:\n return pulumi.get(self, \"subnet_id\")", "def subnet_id(self):\n return self._subnet_id", "def get_vnet_subnet_id(self) -> Union[...
[ "0.71283567", "0.70858115", "0.694457", "0.6851533", "0.6760558", "0.6760558", "0.66333205", "0.6512495", "0.65119773", "0.6429416", "0.6429416", "0.6178885", "0.6129535", "0.6101181", "0.6098605", "0.6036219", "0.59903085", "0.5917233", "0.5892917", "0.58402675", "0.5837416"...
0.79887563
0
Sets the vcn_id of this Subnet. The OCID of the VCN the subnet is in.
def vcn_id(self, vcn_id): self._vcn_id = vcn_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnet_id(self, subnet_id):\n self._subnet_id = subnet_id", "def set_virtual_network_id(self, sNewVirtualNetworkId):\n\t\tcall_sdk_function('PrlVmDevNet_SetVirtualNetworkId', self.handle, sNewVirtualNetworkId)", "def vcn_id(self):\n return self._vcn_id", "def set_network_id(self, sNetworkId...
[ "0.6614857", "0.6025524", "0.5991053", "0.5781278", "0.5670045", "0.5667303", "0.56549877", "0.56549877", "0.5594793", "0.55176085", "0.5391462", "0.53466266", "0.530293", "0.52816015", "0.5275101", "0.5158119", "0.5106097", "0.5090554", "0.5049413", "0.5037284", "0.50181097"...
0.79385823
0
Sets the virtual_router_ip of this Subnet. The IP address of the virtual router.
def virtual_router_ip(self, virtual_router_ip): self._virtual_router_ip = virtual_router_ip
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def virtual_router_mac(self, virtual_router_mac):\n self._virtual_router_mac = virtual_router_mac", "def virtual_router_ip(self):\n return self._virtual_router_ip", "def vip(self, vip):\n\n self._vip = vip", "def set_host_ipaddress(self, sHostIPAddress):\n\t\tcall_sdk_function('PrlVirtNe...
[ "0.69684446", "0.69348335", "0.6027103", "0.5914469", "0.5765016", "0.5696547", "0.5673127", "0.5656169", "0.55509007", "0.5535321", "0.5494987", "0.5464312", "0.5425603", "0.5420574", "0.5397642", "0.5397642", "0.5353284", "0.5319636", "0.5318615", "0.5304744", "0.5304279", ...
0.88241446
0
Gets the virtual_router_mac of this Subnet. The MAC address of the virtual router.
def virtual_router_mac(self): return self._virtual_router_mac
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_probable_router_mac(self):\n return self.probable_router_mac", "def get_mac_address(self):\n\t\treturn call_sdk_function('PrlVmDevNet_GetMacAddress', self.handle)", "def virtual_router_mac(self, virtual_router_mac):\n self._virtual_router_mac = virtual_router_mac", "def get_mac_address(...
[ "0.738792", "0.7061052", "0.6942476", "0.68969566", "0.6804613", "0.6585088", "0.6465132", "0.64619774", "0.6411119", "0.6362911", "0.6349969", "0.628275", "0.6260783", "0.6260783", "0.61609936", "0.61069787", "0.6104704", "0.6097838", "0.60933733", "0.606453", "0.60596985", ...
0.8546398
0
Remove sensor motion from apparent target velocity.
def main(data, setup): # input check varnames = ('vm_raw', 'vm_raw_theo') for varname in varnames: if varname not in data.keys(): raise LookupError('data must contain variable %s.' %s) # display info message chrono = setup['chrono'] chrono.issue('target velocity: correct fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def targeting(self):\r\n self.temp = PVector.sub(self.pos, self.target)\r\n self.temp.normalize()\r\n self.acceleration.sub(self.temp.setMag(1))", "def reduce_velocity(self):\n if self.controls[\"make_velocity_0\"]:\n # print(self.controls[\"bar_move_velocity\"])\n ...
[ "0.664291", "0.6590486", "0.6033646", "0.6033646", "0.5892171", "0.58916503", "0.5813152", "0.5797147", "0.5762475", "0.5738159", "0.5603118", "0.5597383", "0.55848557", "0.55407774", "0.5523761", "0.5509328", "0.5488379", "0.5477976", "0.54469585", "0.5417092", "0.5363876", ...
0.0
-1
Computes the Loperator applied to `f` with respect to `wrt` at `eval_points`. Mathematically this stands for the Jacobian of `f` with respect to `wrt` left muliplied by the `eval_points`.
def Lop( f: Union[Variable, Sequence[Variable]], wrt: Union[Variable, Sequence[Variable]], eval_points: Union[Variable, Sequence[Variable]], consider_constant: Optional[Sequence[Variable]] = None, disconnected_inputs: Literal["ignore", "warn", "raise"] = "raise", ) -> Union[Optional[Variable], Seque...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lop(f, wrt, eval_points, consider_constant=None,\r\n disconnected_inputs='raise'):\r\n if type(eval_points) not in (list, tuple):\r\n eval_points = [eval_points]\r\n\r\n using_list = isinstance(wrt, list)\r\n using_tuple = isinstance(wrt, tuple)\r\n\r\n if not isinstance(f, (list, tup...
[ "0.67578655", "0.63883525", "0.5857266", "0.56447464", "0.56066364", "0.55147946", "0.5442885", "0.54372007", "0.5365043", "0.53591126", "0.5320239", "0.5285197", "0.52638125", "0.5217766", "0.5200155", "0.51849115", "0.5184332", "0.5165345", "0.51401854", "0.5132074", "0.512...
0.65454984
1
Return absolute and relative error between a and b. The relative error is a small number when a and b are close, relative to how big they are.
def abs_rel_err(a, b): abs_err = abs(a - b) # 1e-8 is to prevent division by zeros. # [] is to make sure that if a and b are float16, 1e-8 don't get # dowcasted to float16 as that give 0! This would add back the # division by zero rel_err = abs_err / np.maximum(abs(a) + a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def abs_rel_err(a, b, eps=1.0e-10):\r\n return abs(a - b) / (abs(a) + abs(b) + eps)", "def abs_rel_err(a, b, eps=1.0e-10):\r\n return abs(a - b) / (abs(a) + abs(b) + eps)", "def abs_rel_err(a, b):\r\n abs_err = abs(a - b)\r\n rel_err = abs_err / numpy.maximum(abs(a) + abs(b), 1e-8)\...
[ "0.8438685", "0.8438685", "0.8350297", "0.80188286", "0.7709892", "0.7498451", "0.7469983", "0.67994225", "0.6696004", "0.65373963", "0.64462304", "0.6323104", "0.6194176", "0.61048824", "0.61048824", "0.60879016", "0.605292", "0.6048057", "0.60153437", "0.60126036", "0.60126...
0.8415317
2
Find the biggest error between g_pt and self.gf. What is measured is the violation of relative and absolute errors, wrt the provided tolerances (abs_tol, rel_tol). A value > 1 means both tolerances are exceeded. Return the argmax of min(abs_err / abs_tol, rel_err / rel_tol) over g_pt, as well as abs_err and rel_err at ...
def max_err(self, g_pt, abs_tol, rel_tol): pos = [] errs = [] abs_errs = [] rel_errs = [] abs_rel_errs = self.abs_rel_errors(g_pt) for abs_err, rel_err in abs_rel_errs: if not np.all(np.isfinite(abs_err)): raise ValueError("abs_err not finite"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_err(self, g_pt, abs_tol, rel_tol):\r\n pos = []\r\n errs = []\r\n abs_errs = []\r\n rel_errs = []\r\n\r\n abs_rel_errs = self.abs_rel_errors(g_pt)\r\n for abs_err, rel_err in abs_rel_errs:\r\n if not numpy.all(numpy.isfinite(abs_err)):\r\n ...
[ "0.86653954", "0.76457554", "0.7643577", "0.66606873", "0.66414267", "0.62660533", "0.5841225", "0.57833487", "0.57311314", "0.57311314", "0.5642066", "0.56083065", "0.5587311", "0.55508715", "0.5512899", "0.5491361", "0.54248416", "0.54186666", "0.5409431", "0.5398673", "0.5...
0.87039596
0
Returns 'yes', 'no', or 'maybe' indicating whether x is always 0. 'maybe' means that x is an expression that is complicated enough that we can't tell that it simplifies to 0.
def _is_zero(x): if not hasattr(x, "type"): return np.all(x == 0.0) if isinstance(x.type, NullType): return "no" if isinstance(x.type, DisconnectedType): return "yes" no_constant_value = True try: constant_value = aesara.get_scalar_constant_value(x) no_consta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_zero(x):\r\n if not hasattr(x, 'type'):\r\n return np.all(x == 0.)\r\n if isinstance(x.type, NullType):\r\n return 'no'\r\n if isinstance(x.type, DisconnectedType):\r\n return 'yes'\r\n\r\n no_constant_value = True\r\n try:\r\n constant_value = theano.get_scalar_c...
[ "0.7232675", "0.6683557", "0.6348444", "0.6110046", "0.6049335", "0.60240376", "0.5994879", "0.59787714", "0.59570104", "0.5952624", "0.5932506", "0.59047055", "0.5770736", "0.57624334", "0.5739421", "0.571727", "0.571727", "0.5699635", "0.56741655", "0.5663268", "0.56542045"...
0.7054155
1
This op do a view in the forward, but clip the gradient. This is an elemwise operation.
def grad_clip(x, lower_bound, upper_bound): return GradClip(lower_bound, upper_bound)(x)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clip_gradient(model):\n totalnorm = 0\n for p in model.parameters():\n p.grad.data.clamp_(-5, 5)", "def non_avi_zero_grad_hook(grad):\n grad_clone = grad.clone()\n grad_clone[not_avi_idx] = 0\n return grad_clone", "def clip_gradient(self, grad_clip):\n for group in self.optimiz...
[ "0.65571314", "0.6267188", "0.6140368", "0.60448235", "0.6007295", "0.6007295", "0.6007295", "0.6007295", "0.6007295", "0.5992941", "0.5982094", "0.597406", "0.5928928", "0.58784735", "0.5875932", "0.58704466", "0.5868909", "0.5844928", "0.5844928", "0.5843775", "0.5820655", ...
0.54176444
71
This op scale or inverse the gradient in the backpropagation.
def grad_scale(x, multiplier): return GradScale(multiplier)(x)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gradient(self):\n return ScalingOperator(self.domain, 2.0)", "def backprop(self, loss: torch.FloatTensor):\n if self.scaler is not None:\n self.scaler.scale(loss).backward()\n self.scaler.step(self.optimizer)\n self.scaler.update()\n else:\n lo...
[ "0.6993506", "0.694881", "0.6695629", "0.66688436", "0.6515359", "0.6493764", "0.6493764", "0.6432049", "0.62673676", "0.6226073", "0.6226073", "0.61977565", "0.6168414", "0.6167406", "0.6161143", "0.6155412", "0.6153983", "0.61486447", "0.61173373", "0.611346", "0.6111224", ...
0.5698793
83
Builds a set that contains the vocab. Filters infrequent tokens.
def build_vocab(data, min_token_instances, verbose=True): token_counter = Counter() print('Building vocab...') pbar = mmcv.ProgressBar(len(data)) for img in data: for region in img['relationships']: if region['tokens'] is not None: token_counter.update(region['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build(corpus: List[List[str]], size=5000, freq_cutoff=5):\n vocab = VocabEntry()\n word2freq = Counter(chain(*corpus))\n word2freq = {word: freq for word, freq in word2freq.items() if freq > freq_cutoff}\n words_selected = sorted(word2freq.keys(), key=lambda w: word2freq[w], reverse...
[ "0.6907821", "0.67388505", "0.67365634", "0.6689142", "0.66355854", "0.6581807", "0.6562827", "0.65577656", "0.6537025", "0.6530714", "0.6492254", "0.6362705", "0.63501096", "0.6330492", "0.6318034", "0.6311548", "0.62922525", "0.62303495", "0.622275", "0.62127024", "0.618963...
0.64348954
11
take a string and construct a suffix array
def __init__(self, string): self.root = Node(-1, -1, -1, -1) self.string = string self.array = [] for i in range(256): self.array.append(0) current = self.root for i in range(len(self.string)): self.ukkonen(i)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_suffix_array(s):\n pairs = list()\n for i in range(len(s)):\n pairs.append( (s[i:],i) ) \n sa = list()\n for p in sorted(pairs):\n sa.append(p[1])\n return sa", "def get_suffix_array(s):\n a = ['']*len(s)\n for i in range(len(s)):\n a[i] = s[i:]\n sa = np.argsor...
[ "0.7794506", "0.7414367", "0.7179831", "0.6942842", "0.6650764", "0.61187667", "0.6061598", "0.60521543", "0.60468334", "0.5975026", "0.59747225", "0.594576", "0.59229726", "0.59074575", "0.59010804", "0.5895763", "0.5814204", "0.57774186", "0.57293653", "0.5725256", "0.57090...
0.0
-1
gets a value from cache if exists, otherwise None
def get(self, key, lock): raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self, key):\n if key:\n return self.cache_data.get(key)\n else:\n return None", "def get(self, key):\n if key and key in self.cache_data:\n return self.cache_data[key]\n return None", "def get(self, key):\n if key and key in self.cache...
[ "0.8035472", "0.80248445", "0.80235875", "0.80235875", "0.78143406", "0.7703503", "0.7605939", "0.75344783", "0.74728", "0.74550563", "0.738739", "0.73574346", "0.7277067", "0.7274233", "0.7271264", "0.7160956", "0.71112466", "0.70875615", "0.7080913", "0.70771843", "0.704297...
0.0
-1
read a yaml file
def readyml(filename): with open(filename, 'r') as f: return yaml.load(f.read())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_yaml(file):\n with open(file, mode='r') as stream:\n out = yaml.load(stream)\n\n return out", "def read_yaml(yaml_path):\n with open(yaml_path) as f:\n yaml_data = yaml.load(f, Loader=yaml.FullLoader)\n\n return yaml_data", "def read_yaml_file(yaml_file):\n with open(yaml_...
[ "0.7887891", "0.78657186", "0.7797688", "0.75731343", "0.7553485", "0.7509552", "0.7502491", "0.7474192", "0.74712265", "0.7457696", "0.7423515", "0.7418064", "0.7401986", "0.7384184", "0.7343977", "0.73390585", "0.73331016", "0.7324606", "0.7262488", "0.7254954", "0.72445875...
0.6737052
61
Return prettyformatted Hrepresentation of polytope.
def __str__(self): A, b = self.A, self.b A_rows = str(A).split('\n') n_rows = len(A_rows) # column vector from `b`, if not already one b_col = b.reshape(b.shape[0], 1) if len(b.shape) == 1 else b b_rows = str(b_col).split('\n') # place an "x" somewhere near the mi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def polytope2str(p, name):\n k = p.A.shape[0]\n l = p.A.shape[1]\n # pik=k\n s = \"idxint \"+name+\"k = \"+str(k)+\";\\n\"\n # pil=l\n s = s+\"idxint \"+name+\"l = \"+str(l)+\";\\n\"\n # piA = [A11,A21,...,Ak1,A12,...,Ak2,...,A1l,...,Akl];\n s = s+\"pfloat \"+name+\"A[] = {\"+matrix2str(-1*...
[ "0.6137169", "0.5879708", "0.587873", "0.5760549", "0.5726377", "0.5665335", "0.5644919", "0.56293297", "0.56281507", "0.5558931", "0.55373037", "0.5534277", "0.5489574", "0.54672056", "0.54403704", "0.5432765", "0.5423382", "0.54040295", "0.539637", "0.53748226", "0.53691864...
0.60234874
1
Return Boolean array of whether each point in `self`. Any point that satisfies all inequalities is contained in `self`. A tolerance is added, and strict inequality checked (<). Pass `abs_tol=0` to exclude the boundary.
def contains(self, points, abs_tol=ABS_TOL): test = self.A.dot(points) - self.b[:, np.newaxis] < abs_tol return np.all(test, axis=0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contains(self, points, abs_tol=ABS_TOL):\n if not isinstance(points, np.ndarray):\n points = np.array(points)\n if points.shape[0] != self.dim:\n raise ValueError('points should be column vectors')\n contained = np.full(points.shape[1], False, dtype=bool)\n for...
[ "0.6868966", "0.6841395", "0.644671", "0.6314227", "0.629613", "0.6039121", "0.6012732", "0.59245837", "0.58889514", "0.58889514", "0.58889514", "0.58803964", "0.58700454", "0.586809", "0.5862737", "0.5838514", "0.5801661", "0.5757404", "0.5753408", "0.5751138", "0.5732278", ...
0.7545686
0
Returns a rotated copy of C{self}. Describe the plane of rotation and the angle of rotation (in radians) with i, j, and theta. i and j are the indices 0..N1 of two of the identity basis vectors, and theta is the angle of rotation. Consult L{polytope.polytope._rotate} for more detail.
def rotation(self, i=None, j=None, theta=None): newpoly = self.copy() _rotate(newpoly, i=i, j=j, theta=theta) return newpoly
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotation(self, i=None, j=None, theta=None):\n newreg = self.copy()\n _rotate(newreg, i=i, j=j, theta=theta)\n return newreg", "def rotate(self, angle):\n perp = TwoDV(-self[1], self[0])\n angle = angle * math.pi / 180.0\n c, s = math.cos(angle), math.sin(angle)\n ...
[ "0.7875776", "0.7453781", "0.7286072", "0.72763324", "0.7217076", "0.71950406", "0.7138455", "0.71354884", "0.70675635", "0.7066175", "0.69637454", "0.68515605", "0.68250746", "0.6805517", "0.6756011", "0.67404974", "0.6734598", "0.67314076", "0.6713196", "0.66956633", "0.668...
0.79012686
0
Return copy of this Polytope.
def copy(self): return self.__copy__()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __copy__(self):\n return Region(list_poly=self.list_poly[:],\n props=self.props.copy())", "def copy(self):\n copy = self.__class__()\n copy.a = self.a\n copy.b = self.b\n copy.peak = self.peak\n copy.orientation = self.orientation\n copy.i...
[ "0.75520843", "0.7343629", "0.7199802", "0.7195239", "0.7189217", "0.7167625", "0.7154782", "0.7143852", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", "0.7075179", ...
0.7063183
26
Returns a rotated copy of C{self}. Describe the plane of rotation and the angle of rotation (in radians) with i, j, and theta. i and j are the indices 0..N1 of two of the identity basis vectors, and theta is the angle of rotation. Consult L{polytope.polytope._rotate} for more detail.
def rotation(self, i=None, j=None, theta=None): newreg = self.copy() _rotate(newreg, i=i, j=j, theta=theta) return newreg
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotation(self, i=None, j=None, theta=None):\n newpoly = self.copy()\n _rotate(newpoly, i=i, j=j, theta=theta)\n return newpoly", "def rotate(self, angle):\n perp = TwoDV(-self[1], self[0])\n angle = angle * math.pi / 180.0\n c, s = math.cos(angle), math.sin(angle)\n ...
[ "0.7900719", "0.74539834", "0.72860026", "0.7276229", "0.7216881", "0.71948874", "0.7138183", "0.7134059", "0.7066593", "0.7065454", "0.6962563", "0.68513614", "0.68243015", "0.6805273", "0.6756336", "0.67392737", "0.67340887", "0.67310804", "0.67129964", "0.66942376", "0.668...
0.7874402
1
Return copy of this Region.
def __copy__(self): return Region(list_poly=self.list_poly[:], props=self.props.copy())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy(self):\n return self.__copy__()", "def copy(self):\n return self.__copy__()", "def copy(self):\n return self.__copy__()", "def copy(self):\n return self.__copy__()", "def copy(self):\n return copy.copy(self)", "def copy(self):\n return copy.copy(self)", ...
[ "0.737094", "0.737094", "0.737094", "0.737094", "0.7272236", "0.7272236", "0.7272236", "0.7269269", "0.7269269", "0.7235891", "0.7235891", "0.7235891", "0.7219708", "0.7212977", "0.7201654", "0.7201654", "0.7201654", "0.7201654", "0.7201654", "0.7201654", "0.7201654", "0.72...
0.8352057
0
Return copy of this Region.
def copy(self): return self.__copy__()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __copy__(self):\n return Region(list_poly=self.list_poly[:],\n props=self.props.copy())", "def copy(self):\n return copy.copy(self)", "def copy(self):\n return copy.copy(self)", "def copy(self):\n return copy.copy(self)", "def copy(self):\n return...
[ "0.8351136", "0.7271323", "0.7271323", "0.7271323", "0.72682285", "0.72682285", "0.7234599", "0.7234599", "0.7234599", "0.72187644", "0.7211759", "0.72004473", "0.72004473", "0.72004473", "0.72004473", "0.72004473", "0.72004473", "0.72004473", "0.72004473", "0.72004473", "0.7...
0.7370035
2
Check if a region is convex.
def is_convex(reg, abs_tol=ABS_TOL): if not is_fulldim(reg): return True if len(reg) == 0: return True outer = envelope(reg) if is_empty(outer): # Probably because input polytopes were so small and ugly.. return False, None Pl, Pu = reg.bounding_box Ol, Ou = outer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convex(self):\n # Convex has positive curvature (2nd derivative)\n # f\"(x) = 2a, so a > 0 corresponds to convex\n return (self.a > 0)", "def __IsConvex(self, contour):\r\n return cv2.isContourConvex(contour)", "def convex(self, *args, **kwargs) -> Any:\n pass", "def co...
[ "0.73286796", "0.7167159", "0.67105293", "0.6535656", "0.649388", "0.63178295", "0.62752557", "0.6070198", "0.60207677", "0.59930634", "0.58969027", "0.5873933", "0.5857747", "0.58352613", "0.580286", "0.5727382", "0.5724148", "0.5706679", "0.56739676", "0.5662918", "0.564664...
0.58049214
14
Return True if r1 is strictly in the interior of r0. Checks if r1 enlarged by abs_tol is a subset of r0.
def is_interior(r0, r1, abs_tol=ABS_TOL): if isinstance(r0, Polytope): r0 = Region([r0]) if isinstance(r1, Polytope): r1 = Region([r1]) for p in r1: A = p.A.copy() b = p.b.copy() + abs_tol dummy = Polytope(A, b) if not dummy <= r0: return True ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_absolutely_monotonic(self,r,tol):\n s=len(self)\n K=np.vstack([self.A.astype(float),self.b.astype(float)])\n K=np.hstack([K,np.zeros([s+1,1])])\n X=np.eye(s+1)+r*K\n if abs(np.linalg.det(X))<tol: return 0\n beta_r=np.linalg.solve(X,K)\n v_r_sum = np.dot(np.e...
[ "0.64986616", "0.6050229", "0.59816396", "0.588666", "0.58590245", "0.5845602", "0.58263654", "0.5794202", "0.5785075", "0.5783477", "0.57383615", "0.57218254", "0.57143056", "0.57112765", "0.5703733", "0.5694053", "0.56761587", "0.5667466", "0.5657017", "0.560602", "0.560494...
0.78494143
0
List of extensions.ActionExtension extension objects. Actions are verbs callable from the API.
def get_actions(self): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_list_of_actions(self):\n return self.actions", "def actions(self):\n return self._action_list", "def actions(self):\n actions = []\n\n for name, item in self._definition.get('actions', {}).items():\n name = self._get_name('action', name)\n actions.appen...
[ "0.74256605", "0.7354206", "0.72791487", "0.7210032", "0.7189119", "0.70798844", "0.70798844", "0.7066613", "0.69400805", "0.69288987", "0.69130456", "0.69130456", "0.68946457", "0.6862119", "0.68283105", "0.67568135", "0.67507625", "0.6748679", "0.6714847", "0.67015445", "0....
0.7357131
1
List of extensions.RequestExtension extension objects. Request extensions are used to handle custom request data.
def get_request_extensions(self): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_extensions(self, ext_type=None):\n ext_attrs = [a for a in self.get_attributes()\n if a['attrType'] == OID_extensionRequest]\n if len(ext_attrs) == 0:\n return []\n else:\n exts_der = ext_attrs[0]['attrValues'][0].asOctets()\n exts =...
[ "0.73663735", "0.68800056", "0.67052966", "0.6581341", "0.6563785", "0.6409745", "0.6409745", "0.6380122", "0.6373796", "0.63425344", "0.6236705", "0.62265104", "0.6111435", "0.6098927", "0.60702455", "0.6016621", "0.596228", "0.59372497", "0.58693284", "0.58693284", "0.58693...
0.8597388
0
Returns a list of extensions to be processed before this one.
def get_required_extensions(self): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extensions(self, global_step):\n return []", "def extensions(self, global_step):\n return []", "def get_optional_extensions(self):\n return []", "def get_request_extensions(self):\n return []", "def get_loaded_extensions():\n raise NotImplementedError()", "def iter_exte...
[ "0.7503841", "0.7503841", "0.6896675", "0.6887114", "0.67317265", "0.66892785", "0.6628494", "0.6614989", "0.66124004", "0.6600451", "0.6582357", "0.657784", "0.657784", "0.6487326", "0.64763767", "0.64763767", "0.6469139", "0.63381904", "0.62630457", "0.6204702", "0.61775273...
0.7540317
0
Update attributes map for this extension. This is default method for extending an extension's attributes map. An extension can use this method and supplying its own resource attribute map in extension_attrs_map argument to extend all its attributes that needs to be extended. If an extension does not implement update_at...
def update_attributes_map(self, extended_attributes, extension_attrs_map=None): if not extension_attrs_map: return for resource, attrs in extension_attrs_map.items(): extended_attrs = extended_attributes.get(resource) if extended_attrs: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extension_attributes(self, extension_attributes):\n\n self._extension_attributes = extension_attributes", "def extension_attributes(self, extension_attributes):\n\n self._extension_attributes = extension_attributes", "def extend(self, **attributes: t.Any) -> None:\n for key, value in a...
[ "0.5981527", "0.5981527", "0.58731705", "0.5698103", "0.5624948", "0.5507168", "0.5371744", "0.53105557", "0.53063214", "0.5299773", "0.52611786", "0.52310765", "0.5222504", "0.5222504", "0.5199444", "0.5196644", "0.51937836", "0.51937836", "0.51937836", "0.5182549", "0.51659...
0.8448982
0
List of PecanResourceExtension extension objects. Resources define new nouns, and are accessible through URLs. The controllers associated with each instance of extensions.ResourceExtension should be a subclass of neutron.pecan_wsgi.controllers.utils.NeutronPecanController. If a resource is defined in both get_resources...
def get_pecan_resources(self): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extensions(self):\n return self.properties.get('extensions',\n EntityCollection(self.context, Extension,\n ResourcePath(\"extensions\", self.resource_path)))", "def list_extensions(self, **_params):\r\n return ...
[ "0.6653951", "0.6333897", "0.6126832", "0.612126", "0.59271103", "0.58994436", "0.58994436", "0.58994436", "0.58322173", "0.5829422", "0.5728292", "0.5710274", "0.5662129", "0.5628689", "0.5628689", "0.5626798", "0.5605371", "0.5595379", "0.55916166", "0.5468813", "0.54549015...
0.69103277
0
Gets the id of this CatalogDataCategoryTreeInterface.
def id(self) -> int: return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tree_id(self):\n if self.is_root:\n return 0\n elif self._link is not None:\n return self._link.tree_id\n else:\n return self._tree_id", "def get_catalog_hierarchy_id(self):\n # Implemented from kitosid template for -\n # osid.resource.BinHi...
[ "0.65848804", "0.6456996", "0.6192431", "0.6047453", "0.60136026", "0.60124236", "0.59565336", "0.59521544", "0.5920715", "0.5920715", "0.59110475", "0.5902108", "0.5900378", "0.589334", "0.5893016", "0.58857805", "0.58737874", "0.5866102", "0.5862098", "0.58572125", "0.58568...
0.5880231
21
Sets the id of this CatalogDataCategoryTreeInterface.
def id(self, id: int): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def categories_id(self, categories_id):\n\n self._categories_id = categories_id", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id):\n self.__id = id", "def set_id(self, id_):\n\n self.id_ = id_", "def category_id(self, category_id):\n\n self._category...
[ "0.65976834", "0.65477383", "0.6547642", "0.6503406", "0.6464301", "0.6449642", "0.642827", "0.63635653", "0.63635653", "0.63635653", "0.63635653", "0.63635653", "0.63635653", "0.6362391", "0.6362391", "0.6362391", "0.6362391", "0.6362391", "0.6362391", "0.62614393", "0.62096...
0.0
-1
Gets the parent_id of this CatalogDataCategoryTreeInterface. Parent category ID
def parent_id(self) -> int: return self._parent_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_parent_id(self):\n return self._parent_id", "def parent_id(self):\n return self._parent_id", "def parent_id(self):\n return self._parent_id", "def parent_id(self) -> str:\n return self._db_data.parent_id", "def parent_id(self) -> Optional[pulumi.Input[int]]:\n ret...
[ "0.7937658", "0.7724465", "0.7724465", "0.7522119", "0.7236867", "0.7236867", "0.7188705", "0.6988944", "0.68819064", "0.68257576", "0.6783668", "0.6739894", "0.6689521", "0.6678299", "0.66643757", "0.6636736", "0.6636736", "0.6636736", "0.6636736", "0.6634322", "0.658113", ...
0.76991475
3
Gets the name of this CatalogDataCategoryTreeInterface. Category name
def name(self) -> str: return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_name(self):\n return self.category_name", "def category_name(self):\n return self.category.name", "def category_name(self):\n try:\n category = self.proto.category.parent\n return f'{category.name} - {self.proto.category.name}'\n except AttributeError:\...
[ "0.82098174", "0.8139699", "0.8076596", "0.7955717", "0.78785276", "0.7136392", "0.701887", "0.68682516", "0.6734277", "0.67340076", "0.6690062", "0.6684565", "0.6684565", "0.6656781", "0.6550827", "0.65266126", "0.65104246", "0.64952636", "0.64583945", "0.64576274", "0.64182...
0.0
-1
Sets the name of this CatalogDataCategoryTreeInterface. Category name
def name(self, name: str): if name is None: raise ValueError("Invalid value for `name`, must not be `None`") self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rider_category_name(self, rider_category_name):\n\n self._rider_category_name = rider_category_name", "def set_name(self, name):\n self.name = name\n self.labels.change_name(name)", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name =...
[ "0.6713893", "0.66863954", "0.64065593", "0.64065593", "0.64065593", "0.64065593", "0.64065593", "0.6343951", "0.63154936", "0.6307297", "0.62949455", "0.6284712", "0.6284712", "0.6283288", "0.626455", "0.6260004", "0.6253924", "0.6235174", "0.6211983", "0.6205362", "0.619099...
0.0
-1