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
Returns true if the current user has access to this task list.
def current_user_has_access(self): return self.user_has_access(users.get_current_user())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_has_access(self, user):\n if not user: return False\n query = db.Query(TaskListMember)\n query.filter('task_list =', self)\n query.filter('user =', user)\n return query.get()", "def has_access(self, user):\n if user.is_superuser:\n return True\n return self.user_o...
[ "0.80354095", "0.7513532", "0.74461627", "0.74461627", "0.74461627", "0.7356822", "0.7157605", "0.71396905", "0.71170634", "0.7099192", "0.70534813", "0.7044288", "0.7044288", "0.70258206", "0.70187795", "0.69886005", "0.6986884", "0.69855666", "0.6950547", "0.6947478", "0.69...
0.7972631
1
Returns true if the given user has access to this task list.
def user_has_access(self, user): if not user: return False query = db.Query(TaskListMember) query.filter('task_list =', self) query.filter('user =', user) return query.get()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_access(self, user):\n if user.is_superuser:\n return True\n return self.user_objects(user).filter(id=self.id).exists()", "def current_user_has_access(self):\n return self.user_has_access(users.get_current_user())", "def can_be_accessed(self, user):\n if self.shared_wi...
[ "0.77992487", "0.767144", "0.7397464", "0.73840964", "0.736102", "0.7219091", "0.7217974", "0.7157916", "0.70905566", "0.70807564", "0.7016164", "0.70020676", "0.6980205", "0.6980127", "0.69680685", "0.6957774", "0.69334286", "0.6917971", "0.6903163", "0.69011056", "0.6881915...
0.8516061
0
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def plot_confusion_matrix(cm, classes, normalize=False, title='Confusion matrix', cmap=plt.cm.Blues): if normalize: cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis] print("Normalized confusion matrix") else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_confusion_matrix(cm, classes=[0,1], normalize=False, title='Confusion matrix', print_matrix=False):\n\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n...
[ "0.8194862", "0.80949175", "0.8029915", "0.8019153", "0.79941195", "0.7991258", "0.7980955", "0.7976606", "0.79610753", "0.79590565", "0.79378676", "0.7934962", "0.7934504", "0.79313844", "0.7926313", "0.7924577", "0.79241234", "0.7923211", "0.7923023", "0.7921931", "0.791787...
0.7886698
34
list_custom_attributes return a list of all custom attribute names
def list_custom_attributes(cls): custom_attributes = cls.soap_client.service.listCustomAttributes() return custom_attributes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def custom_attributes(self):\n return self._custom_attributes", "def get_attribute_list(self):\n attributes = [attr for attr in vars(self.entries[0]) if not attr.startswith('__')]\n return attributes", "def get_attribute_list(self):\n return self.dp.get_attribute_list()", "def get...
[ "0.74421084", "0.71881956", "0.6880847", "0.67814785", "0.6772581", "0.6658377", "0.6602726", "0.6580463", "0.6558987", "0.65331507", "0.64979947", "0.6494953", "0.6493834", "0.64591634", "0.6443893", "0.6373361", "0.637097", "0.63420486", "0.6319389", "0.6255084", "0.6244332...
0.80911505
0
Sets the image_id of this V1beta1SidecarState.
def image_id(self, image_id): self._image_id = image_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def image_id(self, image_id):\n if image_id is None:\n raise ValueError(\"Invalid value for `image_id`, must not be `None`\") # noqa: E501\n\n self._image_id = image_id", "def picture_id(self, picture_id):\n\n self._picture_id = picture_id", "def vpc_id(self, vpc_id):\n ...
[ "0.6605141", "0.5675217", "0.5243733", "0.50905126", "0.5053194", "0.5021055", "0.50041056", "0.49960893", "0.49825624", "0.49705225", "0.4948178", "0.49459141", "0.49395064", "0.49395064", "0.49059263", "0.4895855", "0.48912314", "0.48912314", "0.48912314", "0.48912314", "0....
0.6845322
1
Sets the name of this V1beta1SidecarState.
def name(self, name): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setName(self, name):\n self._name = name", "def setName(self, name):\n self._name = name", "def setName(self, name):\n self.name = name", "def setName(self, name):\n self.name = name", "def setName(self, name):\n self.name = name", "def setName(self, name):\n ...
[ "0.5956786", "0.5956786", "0.59488845", "0.59488845", "0.59488845", "0.59488845", "0.58582425", "0.58409333", "0.58409333", "0.58409333", "0.58409333", "0.58409333", "0.5837572", "0.58132756", "0.58132756", "0.58126366", "0.5808505", "0.57596695", "0.5758253", "0.57211006", "...
0.0
-1
Sets the terminated of this V1beta1SidecarState.
def terminated(self, terminated): self._terminated = terminated
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def terminated_on(self, terminated_on):\n\n self._terminated_on = terminated_on", "def terminated(self):\n return self._terminated", "def terminated(self):\n return self._terminated", "def terminated_on(self):\n return self._terminated_on", "def terminate(self):\n self.te...
[ "0.5295907", "0.48806447", "0.48806447", "0.47574642", "0.47428632", "0.46943486", "0.46214208", "0.45866185", "0.45526096", "0.4461987", "0.44535047", "0.4396937", "0.43649533", "0.43286994", "0.43230495", "0.4313219", "0.4297859", "0.4265546", "0.4237588", "0.42094213", "0....
0.63428444
1
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, V1beta1SidecarState): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, V1beta1SidecarState): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Renders the home page.
def home(): data = read_data() return render_template( 'index.html', title='Raft Message Implementation: Client', content=data )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_home():\r\n\treturn render_template(\"index.html\")", "def home():\n\n return render_template('home_page.html')", "def home():\n\n return render_template(\"home.html\")", "def home():\n return render_template('home.html')", "def home():\n return render_template('home.html')", "def ...
[ "0.85574406", "0.853399", "0.8351404", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.82762724", "0.827363", "...
0.0
-1
Sets an image's anchor point to its center
def pos_image(image, x,y): image.anchor_x = x image.anchor_y = y
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_anchor_center(img):\n img.anchor_x = int(img.width / 2)\n img.anchor_y = int(img.height / 2)", "def center_image_anchor(image):\n image.anchor_x = image.height/2\n image.anchor_y = image.height/2", "def center_image(image):\r\n image.anchor_x = image.width / 2\r\n image.anchor_y = im...
[ "0.90294266", "0.88902074", "0.84555244", "0.84555244", "0.8374858", "0.6867228", "0.6867228", "0.6867228", "0.6599151", "0.6545185", "0.64940906", "0.6492981", "0.64907575", "0.64504904", "0.64468896", "0.63265204", "0.62879276", "0.626176", "0.62339115", "0.6182414", "0.615...
0.77350885
5
populates a dictionary counting all ngrams in the specified text.
def build_model(self, text): text = '< ' * (self.n - 1) + text.replace(' . ', ' .%s ' % (' <' * (self.n - 1))) + ' >' tokens = self.split(text) self.corpus_len = len(tokens) self.n_grams_by_len = [{} for _ in range(self.n)] for i in range(len(tokens)): # for index in tokens ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_ngrams(self, n):\n\n output = {}\n\n for i in range(len(self.text)-n+1):\n s = ' '.join(self.text[i:i+n])\n # if s is not already in dictionary, set value to 0\n output.setdefault(s, 0)\n output[s] += 1\n return output", "def calculate_ngr...
[ "0.76285636", "0.743605", "0.72238445", "0.7215294", "0.70278937", "0.6968827", "0.6953542", "0.694321", "0.69221735", "0.6906369", "0.6857672", "0.6839784", "0.67987186", "0.67811936", "0.6777076", "0.67605853", "0.67380834", "0.6720923", "0.67070496", "0.65778077", "0.65403...
0.6245485
40
Renders the home page and save preferences
def home(username): path = users_folder_file_path + username inputdate = request.form['inputdate'] inputmiles = request.form['inputmiles'] inputdifficulty = int(request.form['inputdifficulty']) with open(path + '/preferences.txt', 'r+') as json_file: data = json.load(json_file) dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def home():\n return render_template('home.html',\n face=session.get(app.config['SESSION_KEY'], None))", "def get(self):\n if self.logged_in:\n self.render('home.html', {\n 'name': self.current_user.name,\n 'server': self.current_user.server,\n 'faction':...
[ "0.7449259", "0.7285663", "0.7092014", "0.7039953", "0.7016313", "0.6948024", "0.69443333", "0.69111496", "0.68991745", "0.6886655", "0.68556803", "0.6846918", "0.68372905", "0.68372905", "0.68372905", "0.68372905", "0.68372905", "0.68372905", "0.68372905", "0.68372905", "0.6...
0.0
-1
Redirects to home page
def thankyou(username): path = users_folder_file_path + username with open(path + '/preferences.txt', 'r+') as json_file: data = json.load(json_file) data['max_days_per_week'] = int(request.form['max_days_per_week']) json_file.seek(0) # rewind json.dump(data, json_file) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def home_page():\n return redirect(url_for(_DEFAULT_ROUTE, _external=True))", "def homepage():\n return redirect('index.html')", "def start_page():\n if not _home:\n abort(404)\n return redirect(_home)", "def start_page():\n if not _home:\n abort(404)\n return redirect(_home)"...
[ "0.8409207", "0.8258783", "0.8173587", "0.8173587", "0.81720424", "0.81678337", "0.79966474", "0.79153544", "0.79153544", "0.79153544", "0.7905185", "0.7881943", "0.7848833", "0.7668881", "0.7643463", "0.7641178", "0.763278", "0.76186824", "0.7550548", "0.74769175", "0.743941...
0.0
-1
Renders calendar and home page
def foo(username): year = 2018 cal = Calendar(-1) training_list = [] path = users_folder_file_path + username weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] mydate = date.today() list_month = [] for i in range(12): list_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index():\n # return render_template('index.html', events=get_calendar_events_today(CALENDAR_URL))\n return render_template('index.html', events=get_calendar_events_limit(CALENDAR_URL), events_sorted=True)", "def mainpage():\n return render_template('presence_weekday.html')", "def home():\n\n re...
[ "0.7839091", "0.7379102", "0.7306012", "0.71574664", "0.7074548", "0.7067056", "0.6970624", "0.6958481", "0.69441307", "0.6941349", "0.6906201", "0.6906201", "0.6906201", "0.6906201", "0.6906201", "0.6906201", "0.6906201", "0.6906201", "0.6906201", "0.6906201", "0.68968374", ...
0.0
-1
Renders the home page
def redirectmap(username, last_date): if username == 'alex' or username == 'Diane': generate_map(username, str(last_date)) return redirect(url_for('.foo', username=username)) else: return redirect(url_for('.foo', username=username))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_home():\r\n\treturn render_template(\"index.html\")", "def home():\n\n return render_template('home_page.html')", "def home():\n\n return render_template(\"home.html\")", "def home():\n return render_template('home.html')", "def home():\n return render_template('home.html')", "def ...
[ "0.87210435", "0.8709175", "0.8547869", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.84821767", "0.8481701", ...
0.0
-1
Reset game UI to initial state.
def reset(self): self.ids.score.text = '0' self.ids.end_button.text = 'submit' self.ids.end_button.disabled = True self.ids.end_button.opacity = 0 self.time = None board = self.ids.board for item in board.children: if isinstance(item, Space) is True...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n\n game.reset()\n sm.get_screen('game_screen').reset()", "def reset_game(self):\n self._buttons_active = False\n self._laser_label.clear()\n self.add_items_labels()\n self.add_question_marks()\n QtCore.QTimer.singleShot(conf.second_display_durati...
[ "0.8052138", "0.79289716", "0.764434", "0.74008024", "0.72629416", "0.7246861", "0.7199825", "0.7108094", "0.7097444", "0.7028582", "0.69852036", "0.69669294", "0.6924956", "0.68972474", "0.6892807", "0.68591917", "0.6854667", "0.68427634", "0.68342245", "0.6832037", "0.68298...
0.72493833
5
Gets all the information in studenten table
def get_students(self): self.cur = self.conn.cursor(pymysql.cursors.DictCursor) self.cur.execute("SELECT * FROM studenten") self.cur.close() return self.cur.fetchall()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_students(self):\n \n with sqlite3.connect(self.db_path) as conn:\n # conn.row_factory = self.create_student\n conn.row_factory = lambda cursor, row: Student(\n row[1], row[2], row[3], row[5]\n )\n \n \n db_cu...
[ "0.7351206", "0.7298801", "0.7244424", "0.72064805", "0.697984", "0.6935884", "0.67473006", "0.6692048", "0.66648823", "0.66188234", "0.66041", "0.659848", "0.6522665", "0.6498989", "0.64943147", "0.64830095", "0.64132667", "0.6410221", "0.6390693", "0.638036", "0.6380326", ...
0.8222623
0
Specifies the type of group configuration item.
def type(self) -> pulumi.Input[str]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_group_type(self, item_group_type):\n\n self._item_group_type = item_group_type", "def set_type(self, type: int):\r\n self.type = type\r\n self.canvas.itemconfig(self.item, image=self._get_image())", "def setKind(self, *args):\n return _libsbml.Group_setKind(self, *args)", ...
[ "0.7469097", "0.67402536", "0.60996115", "0.5901388", "0.58341694", "0.5790249", "0.57890755", "0.57890755", "0.574758", "0.574758", "0.57422036", "0.5722947", "0.5688035", "0.5672635", "0.5664097", "0.5661921", "0.56315416", "0.5621513", "0.560342", "0.5598092", "0.5501978",...
0.0
-1
A collection of parameters for this group configuration item. See below for details.
def parameters(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['GroupConfigurationParameterArgs']]]]: return pulumi.get(self, "parameters")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameters(self) -> dict:\n return self._config.get('parameters', dict())", "def parameters_config(self) -> dict:\n if not self.params_optional and not self.params_required:\n return {}\n parameters = dict()\n for parameter, parameter_details in self.parameters.items():...
[ "0.71566033", "0.71187526", "0.7072082", "0.6936573", "0.68166643", "0.679456", "0.6791436", "0.6784136", "0.66776663", "0.664917", "0.6633365", "0.6627326", "0.6619778", "0.6585755", "0.6562537", "0.6561838", "0.6532679", "0.65226203", "0.6518344", "0.6518344", "0.6518344", ...
0.7492987
0
The name of the group configuration parameter.
def name(self) -> pulumi.Input[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameter_group_name(self) -> str:\n return pulumi.get(self, \"parameter_group_name\")", "def parameter_group_name(self) -> Optional[str]:\n return pulumi.get(self, \"parameter_group_name\")", "def parameter_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"parameter_...
[ "0.84618104", "0.8149447", "0.80970496", "0.8019664", "0.7974163", "0.7974163", "0.7974163", "0.7974163", "0.738396", "0.73786575", "0.73786575", "0.7124317", "0.7117667", "0.70236707", "0.6988479", "0.6988479", "0.69649214", "0.6932932", "0.68830323", "0.682914", "0.68238133...
0.0
-1
The type of the resource query. Defaults to `TAG_FILTERS_1_0`.
def type(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request_resource_type(self) -> str:\n return pulumi.get(self, \"request_resource_type\")", "def getFilter(self, type: int) -> int:\n ...", "def resource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[pulu...
[ "0.63384354", "0.63327396", "0.6167714", "0.6167714", "0.6167714", "0.6167714", "0.6167714", "0.6133529", "0.6102604", "0.6003001", "0.6003001", "0.59196085", "0.5870327", "0.56979764", "0.56727445", "0.56650084", "0.56239647", "0.56013244", "0.558868", "0.5542241", "0.552385...
0.0
-1
Serializes the given population along with each of their scores
def serialize_pop(population): return [ agent.get_weights() for agent in population ]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_population(self, generation):\r\n pop_checkpoint = {\r\n 'populations' : {name : np.stack(pop.population) for name, pop in self.populations.items()},\r\n 'generation' : generation,\r\n 'mutation_prob' : {name : pop.mutation_prob for name, pop in self.populations.ite...
[ "0.6162666", "0.60748464", "0.60454583", "0.5994366", "0.580655", "0.5764389", "0.5743036", "0.57419753", "0.5710139", "0.56822324", "0.56619614", "0.55532134", "0.5501581", "0.54969233", "0.54903704", "0.54776675", "0.54497343", "0.5435301", "0.54094267", "0.5378043", "0.535...
0.7105028
0
Return the current resident application object.
def active(cls): return cls._GLOBAL
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getCurrentApplication(self):\r\n currentState = self.getCurrentState(refresh=True)\r\n\r\n return self.currentApplication", "def application(self):\n return self._application", "def application(self):\n return self._application", "def app(self):\n if self._application i...
[ "0.77338207", "0.7706205", "0.7706205", "0.76792365", "0.7536308", "0.7389185", "0.73216945", "0.72409433", "0.72348493", "0.7227583", "0.72224146", "0.71220803", "0.70442796", "0.70085466", "0.70037985", "0.69983375", "0.69678354", "0.6958206", "0.6890731", "0.6800741", "0.6...
0.0
-1
Returns a Fileset that combines the lists of files returned by glob.glob for each globspec. File names starting with '.' are not returned unless explicitly globbed. For example, "." matches ".bashrc" but "" does not, mirroring the semantics of 'ls' without 'a'. Walks the current working directory by default, can be ove...
def globs(cls, *globspecs, **kw): root = kw.pop('root', os.curdir) def relative_glob(globspec): for fn in glob.glob(os.path.join(root, globspec)): yield os.path.relpath(fn, root) def combine(files, globspec): return files ^ set(relative_glob(globspec)) return cls(lambda: reduc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rglobs(cls, *globspecs, **kw):\r\n root = kw.pop('root', os.curdir)\r\n\r\n def matcher(path):\r\n for globspec in globspecs:\r\n # Ignore hidden files when globbing wildcards.\r\n if not (globspec.startswith('*') and os.path.basename(path).startswith('.')):\r\n if fnmatch.fnm...
[ "0.6948804", "0.6791965", "0.6736561", "0.6732828", "0.66670316", "0.6619956", "0.6609012", "0.6585804", "0.65688914", "0.65688914", "0.6567638", "0.6567079", "0.65510774", "0.6489575", "0.6470814", "0.6385066", "0.63688725", "0.63674957", "0.6359023", "0.6312736", "0.6311224...
0.76655054
0
Returns a Fileset that contains the union of all files matched by the globspecs applied at each directory beneath the root. By default the root is the current working directory, but can be overridden with the 'root' keyword argument. File names starting with '.' are not returned unless explicitly globbed. For example, ...
def rglobs(cls, *globspecs, **kw): root = kw.pop('root', os.curdir) def matcher(path): for globspec in globspecs: # Ignore hidden files when globbing wildcards. if not (globspec.startswith('*') and os.path.basename(path).startswith('.')): if fnmatch.fnmatch(path, globspec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def globs(cls, *globspecs, **kw):\r\n root = kw.pop('root', os.curdir)\r\n def relative_glob(globspec):\r\n for fn in glob.glob(os.path.join(root, globspec)):\r\n yield os.path.relpath(fn, root)\r\n def combine(files, globspec):\r\n return files ^ set(relative_glob(globspec))\r\n retur...
[ "0.73657954", "0.6595301", "0.65601355", "0.6550997", "0.6544307", "0.64820033", "0.64440954", "0.64440954", "0.6440167", "0.6416224", "0.64140534", "0.6352583", "0.62915266", "0.626711", "0.62152106", "0.62068087", "0.6162798", "0.6125276", "0.60752445", "0.6063371", "0.6039...
0.68814224
1
Returns a Fileset that matches zshstyle globs, including '/' for recursive globbing. By default searches from the current working directory. Can be overridden with the 'root' keyword argument. File names starting with '.' are not returned unless explicitly globbed. For example, "." matches ".bashrc" but "" does not, mi...
def zglobs(cls, *globspecs, **kw): root = kw.pop('root', os.curdir) patterns = [(os.path.basename(spec).startswith('*'), re.compile(fnmatch_translate_extended(spec))) for spec in globspecs] def matcher(path): for no_hidden, pattern in patterns: # Ignore hidden files wh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def globs(cls, *globspecs, **kw):\r\n root = kw.pop('root', os.curdir)\r\n def relative_glob(globspec):\r\n for fn in glob.glob(os.path.join(root, globspec)):\r\n yield os.path.relpath(fn, root)\r\n def combine(files, globspec):\r\n return files ^ set(relative_glob(globspec))\r\n retur...
[ "0.6980822", "0.6934236", "0.67647296", "0.6530341", "0.6530341", "0.6509614", "0.64933544", "0.63713306", "0.636632", "0.6321839", "0.6232033", "0.6225271", "0.62196934", "0.6192249", "0.61408204", "0.6127478", "0.6070183", "0.6068936", "0.60640734", "0.6043977", "0.6035354"...
0.7308294
0
Return the bottle app object associated with this HttpServer instance.
def app(self): return self._app
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wsgi_app():\n return bottle.default_app()", "def wsgi_app():\n return bottle.default_app()", "def app(self):\n return self._app", "def app(self):\n if self._application is None:\n self._application = Application(client=self)\n return self._application", "def get_ap...
[ "0.768994", "0.768994", "0.7459279", "0.73443407", "0.7212578", "0.7200274", "0.7180562", "0.715646", "0.7139525", "0.7132228", "0.7117085", "0.70421034", "0.6943004", "0.69402987", "0.69334644", "0.69125795", "0.6908945", "0.6878586", "0.68155855", "0.6793053", "0.6752911", ...
0.71977323
6
Set the log level for scribe.
def set_scribe_log_level(log_level): LogOptions._SCRIBE_LOG_SCHEME, LogOptions._SCRIBE_LOG_LEVEL = ( LogOptions._parse_loglevel(log_level, scheme='google') )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setLogLevel(self,value):\n self.PDFreactorConfiguration.in1[\"logLevel\"] = value", "def level(self, log_level):\n self.logger.setLevel(log_level)", "def set_log_level(self, level):\n if level == 'info':\n level = logging.INFO\n if level == 'debug':\n level...
[ "0.7946862", "0.7867605", "0.77520657", "0.77170324", "0.77106166", "0.7696465", "0.7607412", "0.7536831", "0.74070823", "0.7363055", "0.73414403", "0.73267806", "0.73145694", "0.72878873", "0.72366416", "0.7215146", "0.7163946", "0.71617615", "0.7151737", "0.7090157", "0.707...
0.78324467
2
Get the current buffer setting for scribe logging.
def scribe_buffer(): if LogOptions._SCRIBE_BUFFER is None: LogOptions._SCRIBE_BUFFER = app.get_options().twitter_common_log_scribe_buffer return LogOptions._SCRIBE_BUFFER
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _determine_context_buffer(self,s):\n try: return self.buffers[inspect.stack()[2][3]]\n except KeyError: return self.buffers['default']", "def getBuffer(self):\n return self.buffer", "def set_scribe_buffer(buffer_enabled):\r\n LogOptions._SCRIBE_BUFFER = buffer_enabled", "def curre...
[ "0.660369", "0.6267053", "0.62291265", "0.6205854", "0.6094115", "0.6068475", "0.6037662", "0.6010059", "0.5693906", "0.56547165", "0.56143296", "0.5556659", "0.5531706", "0.55032086", "0.54930824", "0.5462638", "0.54466283", "0.5404171", "0.53476965", "0.5345517", "0.5338275...
0.7498056
0
Set the log level for stderr.
def set_stderr_log_level(log_level): LogOptions._STDOUT_LOG_SCHEME, LogOptions._STDERR_LOG_LEVEL = ( LogOptions._parse_loglevel(log_level, scheme='plain'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stderr_log_level():\r\n if LogOptions._STDERR_LOG_LEVEL is None:\r\n LogOptions.set_stderr_log_level(app.get_options().twitter_common_log_stderr_log_level)\r\n return LogOptions._STDERR_LOG_LEVEL", "def set_log_level(log_level: str):\n import loguru\n\n loguru.logger.remove()\n loguru.log...
[ "0.75501895", "0.7461233", "0.7381272", "0.7209934", "0.7171155", "0.69787407", "0.6762141", "0.6564745", "0.645916", "0.64415514", "0.63834524", "0.6376301", "0.63104653", "0.6250709", "0.624097", "0.62363666", "0.6222347", "0.6160637", "0.61489695", "0.61408293", "0.6106189...
0.80783945
0
Get the current stderr_log_level (in logging units specified by logging module.)
def stderr_log_level(): if LogOptions._STDERR_LOG_LEVEL is None: LogOptions.set_stderr_log_level(app.get_options().twitter_common_log_stderr_log_level) return LogOptions._STDERR_LOG_LEVEL
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_stderr(self):\n return self._get_log('stderr')", "def getLogLevel(self):\n\t\treturn AbsentSafeRawConfigParser.absentSafeGet(self, \n\t\t\tLogConfigParser.__LOG_CONFIG_SECTION, \n\t\t\tLogConfigParser.__LOG_LEVEL_KEY)", "def get_log_level(argv):\n parsed_args, _ = PARSER.parse_known_args(argv)\n ...
[ "0.71187145", "0.70237875", "0.7017636", "0.6912839", "0.6883215", "0.68068767", "0.6714588", "0.6508861", "0.6490711", "0.64902115", "0.6465734", "0.6446161", "0.64455396", "0.6388556", "0.62684464", "0.62388945", "0.61640924", "0.61638474", "0.61481106", "0.6147119", "0.613...
0.76415735
0
Get the current stderr log scheme.
def stderr_log_scheme(): if LogOptions._STDOUT_LOG_SCHEME is None: LogOptions.set_stderr_log_level(app.get_options().twitter_common_log_stderr_log_level) return LogOptions._STDOUT_LOG_SCHEME
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_stderr(self):\n return self._get_log('stderr')", "def stderr(self):\n return self.__stderr", "def stderr_path(self):\n return self.log_path\n # return self.path / 'stderr.txt'", "def get_error_log(self) -> Any:\n return self.err", "def stderr(self) -> str:\n _...
[ "0.74791235", "0.67660373", "0.669072", "0.66736275", "0.63985837", "0.63138133", "0.62644947", "0.6150036", "0.60647047", "0.60588634", "0.60502046", "0.5939472", "0.59224784", "0.5869928", "0.5829225", "0.58114845", "0.5772922", "0.5772754", "0.5687371", "0.56829584", "0.56...
0.7794999
0
parses a line and returns Line if successfully parsed, ValueError/None otherwise.
def parse(cls, line): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_line(self, line):\n raise NotImplementedError", "def decodeline(self, line):\n result = ApacheLogLine()\n result.full_line = line\n linepatternmatch = self._linepattern.match(line)\n if linepatternmatch:\n result.hostname = linepatternmatch.group(1)\n ...
[ "0.735251", "0.66498846", "0.6641397", "0.6641397", "0.6641397", "0.6641397", "0.66229093", "0.65310556", "0.6347376", "0.62744546", "0.61869526", "0.61821127", "0.61805654", "0.61674565", "0.6119636", "0.60748845", "0.6049217", "0.6006822", "0.5963637", "0.5934437", "0.58927...
0.7164749
1
Given a filelikeobject and a set of Linederived parsers (e.g. GlogLine, ZooLine), generate Line objects from the stream. If infinite=True, continue after hitting EOF.
def __init__(self, filename_or_filelike, parsers, infinite=False): self._buffer = Buffer(filename_or_filelike, infinite) self._head = None self._tail = [] self._infinite = infinite self._parsers = parsers
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def linedRecordGenerator(fileType, stream):\n lastRecord=[]\n for index,line in enumerate(stream):\n if index%fileType.numLines==0:\n if len(lastRecord)>0:\n yield lastRecord\n del lastRecord[:]\n lastRecord.append(line)\n\n if len(lastRecord)>0:\n ...
[ "0.6159843", "0.6142206", "0.610838", "0.57844836", "0.5778332", "0.5737849", "0.57367164", "0.57107747", "0.56600237", "0.5648243", "0.561576", "0.55811024", "0.55050904", "0.5468125", "0.5416094", "0.5409545", "0.53791744", "0.53190464", "0.5290784", "0.5281145", "0.5267034...
0.53152657
18
Returns a Metric namespace for this object.
def metrics(self): if not hasattr(self, '_observable_metrics'): self._observable_metrics = Metrics() return self._observable_metrics
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def metric_namespace(self) -> str:\n return self._values.get('metric_namespace')", "def metric_namespace(self) -> str:\n return self._values.get('metric_namespace')", "def metric_namespace(self) -> Optional[str]:\n return pulumi.get(self, \"metric_namespace\")", "def metric_namespace(sel...
[ "0.8565087", "0.8565087", "0.8440105", "0.8440105", "0.709219", "0.7075567", "0.69975936", "0.694665", "0.6917235", "0.69047415", "0.6811915", "0.6769332", "0.66465575", "0.66465575", "0.66465575", "0.6627587", "0.6627587", "0.6627587", "0.6627587", "0.6627587", "0.6594218", ...
0.0
-1
Register a gauge (mapper from name => sample) with this registry.
def register(self, gauge): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gauge(self, gauge, value):\n pass", "def gauge(name, value):\n metric = _get_metric(name) or metrics.new_gauge(name)\n metric.notify(value)", "def __init__(self, name, gauge, window = Amount(1, Time.SECONDS), clock = time):\r\n self._clock = clock\r\n self._gauge = gauge\r\n self._sam...
[ "0.68497956", "0.6521387", "0.64834756", "0.64096534", "0.6379297", "0.63609856", "0.6299615", "0.61757064", "0.60655165", "0.60029423", "0.5954466", "0.5919711", "0.5916287", "0.5874253", "0.5664001", "0.55889916", "0.552085", "0.55199003", "0.5470807", "0.54688734", "0.5453...
0.80764705
0
Return the age of an object in seconds, or None if object is not in cache.
def age(self, url): cached_object = self.translate_url(url) if not os.path.exists(cached_object): return None return self._clock.time() - os.path.getmtime(cached_object)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cached_data_age(name):\n cache_path = get_cachefile('%s.cache' % name)\n if not os.path.exists(cache_path):\n return 0\n return time.time() - os.stat(cache_path).st_mtime", "def age(self):\n delta = now() - self.creation\n return delta.seconds", "def age(self):\n # TODO...
[ "0.689632", "0.6541592", "0.6430703", "0.63087785", "0.6215832", "0.6210268", "0.61956954", "0.6130581", "0.61279106", "0.61279106", "0.61279106", "0.61279106", "0.60995686", "0.60881454", "0.60881454", "0.60881454", "0.604584", "0.6033361", "0.6032839", "0.60300416", "0.5980...
0.74721
0
Convert from a url to Package.
def from_href(cls, href, **kw): for package_type in cls._REGISTRY: try: return package_type(href, **kw) except package_type.InvalidLink: continue
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def composed_url2pkgs(baseurl):\n import compose\n\n c = compose.Compose(baseurl)\n cid = c.data_id()\n cstat = c.data_status()\n pdata = c.json_rpms()\n p = compose.packages_from_compose(pdata)\n pb = compose.packages_bin_from_compose(pdata)\n return p, pb, cid, cstat", "def fromurl(cls,...
[ "0.6308246", "0.6193889", "0.5870305", "0.5665715", "0.56608045", "0.5658081", "0.5650831", "0.56097597", "0.55993104", "0.5566131", "0.55368316", "0.55145115", "0.5477072", "0.5477072", "0.53908575", "0.53765976", "0.53638494", "0.53619444", "0.5334818", "0.5311504", "0.5275...
0.6192167
2
Return the digest of a single file in a memoryefficient manner.
def hash(cls, path, digest=None, hasher=sha1): if digest is None: digest = hasher() with open(path, 'rb') as fh: cls.update_hash(fh, digest) return digest.hexdigest()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def file_digest(file):\n # 'rb' file mode reads the file as bytes\n input_file = open(file, 'rb')\n data = input_file.read()\n # getting the digest\n digest = hash_comparing(data).hexdigest()\n input_file.close()\n return digest", "def hash(self):\n block = 1024 * 1024 * 4 # 4 MB.\n ...
[ "0.8036142", "0.74584323", "0.73805016", "0.7326624", "0.7286396", "0.7269441", "0.7254885", "0.7198007", "0.71961105", "0.71897846", "0.7178085", "0.71430117", "0.71430117", "0.7142895", "0.71211874", "0.71143454", "0.71073234", "0.7080886", "0.70387906", "0.70287955", "0.70...
0.0
-1
Close the underlying filehandle of the RecordIO stream.
def close(self): self._fp.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close(self):\n if self.record_mode:\n self.fout.close()\n self.record_mode = False", "def close(self):\n if self.record_mode:\n self.fout.close()\n self.record_mode = False", "def close(self):\n self._raw_stream.close()", "def _close(self):...
[ "0.76386106", "0.76386106", "0.7178276", "0.7027543", "0.6917457", "0.69157934", "0.68890774", "0.68413293", "0.6833449", "0.6822801", "0.67741233", "0.67271334", "0.67271334", "0.67047125", "0.6687958", "0.6628344", "0.6623506", "0.6609123", "0.6607751", "0.6593181", "0.6593...
0.6920327
4
Construct a ThriftRecordReader from given file pointer and Thrift class thrift_base
def __init__(self, fp, thrift_base): ThriftRecordIO.assert_has_thrift() if not thrift_base: raise ThriftRecordIO.ThriftUnsuppliedException( 'Must construct ThriftRecordReader with valid thrift_base!') RecordIO.Reader.__init__(self, fp, ThriftRecordIO.ThriftCodec(thrift_base))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, fp):\r\n ThriftRecordIO.assert_has_thrift()\r\n RecordIO.Writer.__init__(self, fp, ThriftRecordIO.ThriftCodec())", "def readTFRecord():\n #filenameQueue = tf.train.string_input_producer([tfName])\n dataset_fn = tf.data.TFRecordDataset\n _parse_fn = lambda x: parse_fn(x, is_train...
[ "0.6981389", "0.5900235", "0.5710868", "0.55788183", "0.551159", "0.54896784", "0.5477286", "0.5447825", "0.54301983", "0.53962183", "0.5353588", "0.5345622", "0.52906775", "0.52878886", "0.52750474", "0.52731305", "0.5272917", "0.5259162", "0.5259162", "0.5253273", "0.524191...
0.85858476
0
Given a line of text, parse it and return a ScanfResult object.
def parse(self, line, allow_extra=False): if not isinstance(line, Compatibility.string): raise TypeError("Expected line to be a string, got %s" % type(line)) sre_match = self._re.match(line) if sre_match is None: raise ScanfParser.ParseError("Failed to match pattern: %s against %s" % ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse(cls, line):\r\n raise NotImplementedError", "def parse_line(self, line):\n raise NotImplementedError", "def parse(line: str) -> \"SeqNode\":\n return MiniParser(Lexer(line)).parse()", "def parse_line(line: str) -> str:\n return line", "def parse_line(line: str) -> str:\n return lin...
[ "0.64656615", "0.62669396", "0.6120163", "0.61046255", "0.61046255", "0.61046255", "0.61046255", "0.6051328", "0.59911644", "0.5989702", "0.5786448", "0.57261276", "0.5673525", "0.5640246", "0.55689585", "0.55401176", "0.5525659", "0.55157423", "0.5484788", "0.54642516", "0.5...
0.64154047
1
Returns the pants ROOT_DIR, calculating it if needed.
def get_buildroot(): try: return BuildRoot().path except BuildRoot.NotFoundError as e: print(e.message, file=sys.stderr) sys.exit(1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def root_dir():\r\n return Path(__file__).parent.parent", "def root_dir():\n return os.path.dirname(os.path.realpath(__file__ + '/..'))", "def root_dir():\n return os.path.dirname(os.path.realpath(__file__ + '/..'))", "def get_root_dir():\n return os.path.dirname(os.path.dirname(__file__))", "d...
[ "0.76941395", "0.7653267", "0.7653267", "0.76492417", "0.76291394", "0.7573995", "0.754857", "0.75001734", "0.74528307", "0.7419", "0.73721737", "0.7197767", "0.69858986", "0.6962752", "0.69467866", "0.69362164", "0.69119835", "0.6870786", "0.67959005", "0.6782408", "0.674865...
0.0
-1
Returns an iterator over all the BUILD files colocated with this BUILD file including this BUILD file itself. The family forms a single logical BUILD file composed of the canonical BUILD
def family(self): yield self for sibling in self.siblings(): yield sibling
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def siblings(self):\r\n\r\n for build in glob1(self.parent_path, 'BUILD*'):\r\n if self.name != build and BuildFile._is_buildfile_name(build):\r\n siblingpath = os.path.join(os.path.dirname(self.relpath), build)\r\n if not os.path.isdir(os.path.join(self.root_dir, siblingpath)):\r\n ...
[ "0.6596874", "0.59934896", "0.5884618", "0.56189007", "0.5495658", "0.54573435", "0.5412139", "0.538463", "0.53838235", "0.53622997", "0.5354155", "0.53237015", "0.532357", "0.53120476", "0.5298507", "0.52981144", "0.528873", "0.52516586", "0.52406883", "0.52137196", "0.51970...
0.5247226
18
Returns the ROOT_DIR for the current workspace.
def path(self): if self._root_dir is None: if 'PANTS_BUILD_ROOT' in os.environ: self._root_dir = os.environ['PANTS_BUILD_ROOT'] else: buildroot = os.path.abspath(os.getcwd()) while not os.path.exists(os.path.join(buildroot, 'pants.ini')): if buildroot != os.path....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getProjectRootDir():\n return ROOT_DIR", "def getProjectRoot(self):\n currentPath = os.getcwd()\n while(True):\n if \"DataStore\" in os.listdir(currentPath):\n break\n currentPath = \"/\".join(currentPath.split(\"/\")[:-1])\n return currentPath...
[ "0.8109924", "0.7917911", "0.7863536", "0.78295", "0.7778017", "0.7769748", "0.77653694", "0.774084", "0.774084", "0.7732845", "0.7678484", "0.7595911", "0.75939846", "0.75508755", "0.74569565", "0.7386129", "0.72655445", "0.72597617", "0.72488904", "0.7246156", "0.717736", ...
0.66593033
62
A contextmanager that establishes a temporary ROOT_DIR, restoring the prior ROOT_DIR on exit.
def temporary(self, path): if path is None: raise ValueError('Can only temporarily establish a build root given a path.') prior = self._root_dir self._root_dir = path try: yield finally: self._root_dir = prior
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tempdir():\n\n class ctx(object):\n\n def __enter__(self):\n self.prevdir = os.getcwd()\n self.tempdir = tempfile.mkdtemp()\n os.chdir(self.tempdir)\n return self.tempdir\n\n def __exit__(self, *a, **kwa):\n os.chdir(self.prevdir)\n ...
[ "0.7295479", "0.6883074", "0.6754693", "0.65109557", "0.6506726", "0.6467505", "0.645506", "0.64413637", "0.64257723", "0.6424784", "0.6410448", "0.64044297", "0.64014244", "0.63958585", "0.6374279", "0.63728625", "0.6371147", "0.63620037", "0.6356555", "0.6346133", "0.634354...
0.7193403
1
Creates a config parser that supports %([keyname])s value substitution. Any defaults supplied will act as if specified in the loaded config file's DEFAULT section and be available for substitutions. All of the following are seeded with defaults in the config
def create_parser(defaults=None): standard_defaults = dict( buildroot=get_buildroot(), homedir=os.path.expanduser('~'), user=getpass.getuser(), pants_bootstrapdir=os.path.expanduser('~/.pants.d'), pants_workdir=os.path.join(get_buildroot(), '.pants.d'), pants_supportdir=os...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameter(name,default_value=None):\n settings = file(settings_file()).read()\n for line in settings.split(\"\\n\"):\n line = line.strip(\" \\n\\r\")\n if len(line.split(\"=\")) != 2: continue\n keyword,value = line.split(\" = \")\n keyword = keyword.strip(\" \")\n if k...
[ "0.5683868", "0.5618292", "0.54900956", "0.54388195", "0.54106265", "0.53660274", "0.53510225", "0.53427094", "0.5295847", "0.52746993", "0.52498", "0.5243034", "0.5227909", "0.52267", "0.5225236", "0.518673", "0.5186227", "0.5164022", "0.5159701", "0.5151152", "0.51488215", ...
0.48849273
51
Attempts to find the current root directory and buildfile. If there is an active parse context (see do_in_context), then it is returned.
def locate(cls): if not cls._active: raise cls.ContextError('No parse context active.') return next(reversed(cls._active))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_buildroot():\r\n try:\r\n return BuildRoot().path\r\n except BuildRoot.NotFoundError as e:\r\n print(e.message, file=sys.stderr)\r\n sys.exit(1)", "def find_root():\n\n curdir = os.path.curdir\n fs_root = \"/\"\n # Do as build/envsetup.sh does\n # if this files exists, we're at roo...
[ "0.65355784", "0.63290274", "0.62114334", "0.61818516", "0.6090002", "0.6030983", "0.5987923", "0.5898164", "0.585198", "0.5850418", "0.5839884", "0.57735956", "0.5767408", "0.5746805", "0.5734939", "0.57264405", "0.57254696", "0.5724036", "0.5717531", "0.568936", "0.5687703"...
0.0
-1
Returns True if the target has an associated set of Resources.
def has_resources(self): return hasattr(self, 'resources') and self.resources
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __contains__(self, resource):\r\n return resource in self.__resources or any(resource in x for x in self._ResourceManager__m2m)", "def has_resources(self) -> Optional[bool]:\n return pulumi.get(self, \"has_resources\")", "def has(self, target):\r\n return target in self.by_target", "de...
[ "0.7692587", "0.7580383", "0.7000313", "0.69733405", "0.6921182", "0.6350255", "0.62343407", "0.6219005", "0.62034744", "0.6183552", "0.61455035", "0.60499644", "0.6043979", "0.60056067", "0.59653795", "0.5958254", "0.59102476", "0.5906186", "0.58558685", "0.5837529", "0.5836...
0.79003406
0
Returns True if the target produces jvm bytecode.
def is_jvm(self): return self.has_label('jvm')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_jvm_targets(targets):\r\n\r\n return len(list(Target.extract_jvm_targets(targets))) > 0", "def is_java(self):\r\n return self.has_label('java')", "def is_jvm_app(self):\r\n return False", "def check_for_java():\n\n os_java='/usr/bin/java'\n\n if os.path.exists(os_java):\n return...
[ "0.6113026", "0.593943", "0.5920987", "0.5818367", "0.5815392", "0.56851655", "0.56776506", "0.56776506", "0.5463377", "0.5359638", "0.51747257", "0.51164854", "0.5112939", "0.50894845", "0.50706214", "0.5059117", "0.505871", "0.50468075", "0.5045934", "0.50324404", "0.499627...
0.70761895
0
Returns True if the target is a codegen target.
def is_codegen(self): return self.has_label('codegen')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsTarget(self, target_name):\n return target_name in self.GetTargets()", "def is_gentarget(self, target):\r\n raise NotImplementedError", "def is_target( self ):\n\n raise NotImplementedError(\"is_target\");", "def has_target(self):\n return self.target is not None", "def supported_targ...
[ "0.65184885", "0.6311404", "0.6233278", "0.60397553", "0.59804773", "0.5975478", "0.59351647", "0.59137046", "0.573193", "0.56115997", "0.55241543", "0.55192214", "0.54925054", "0.5472164", "0.543736", "0.54287124", "0.5403867", "0.5363163", "0.5335047", "0.52997655", "0.5261...
0.78244454
0
Returns True if the target is an external jar library.
def is_jar_library(self): return self.has_label('jars')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_jar(self):\r\n return False", "def is_lib_available(library):\n try:\n __import__(library)\n return True\n except ImportError:\n return False", "def is_classpath_artifact(self, path):\r\n return path.endswith('.jar') or path.endswith('.war')", "def is_library_installed...
[ "0.6607769", "0.64056325", "0.6092842", "0.6040454", "0.5995577", "0.5992352", "0.5932786", "0.5864881", "0.5790971", "0.5770249", "0.57607496", "0.5733265", "0.55763084", "0.5486534", "0.54633474", "0.5459714", "0.54561114", "0.5400918", "0.53885704", "0.5382699", "0.5312309...
0.8017685
0
Walk of this target's dependency graph visiting each node exactly once. If a predicate is supplied it will be used to test each target before handing the target to work and descending. Work can return targets in which case these will be added to the walk candidate set if not already walked.
def walk(self, work, predicate=None): if not callable(work): raise ValueError('work must be callable but was %s' % work) if predicate and not callable(predicate): raise ValueError('predicate must be callable but was %s' % predicate) self._walk(set(), work, predicate)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_walk_graph(self):\n def assertDependencyWalk(target, results, postorder=False):\n targets = []\n self.build_graph.walk_transitive_dependency_graph([target.address],\n lambda x: targets.append(x),\n ...
[ "0.57015526", "0.565162", "0.55614614", "0.541373", "0.5315292", "0.52826405", "0.52303743", "0.52255154", "0.52139246", "0.521296", "0.51706576", "0.51279414", "0.5103284", "0.50372046", "0.5001482", "0.49719846", "0.49513185", "0.49244615", "0.4903481", "0.49018523", "0.488...
0.69028664
0
Set a humanreadable description of this target.
def with_description(self, description): self.description = description return self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_description(self, description):\r\n self.__description = description", "def set_description(self, description):\n self.__description = description", "def set_description(self, description):\n self.description = description", "def SetDescription(self, description):\n self.d...
[ "0.8075867", "0.8023891", "0.8003722", "0.7985942", "0.7866003", "0.7787463", "0.77394664", "0.77182037", "0.77182037", "0.77182037", "0.77182037", "0.7622902", "0.758749", "0.758749", "0.758749", "0.758749", "0.758749", "0.758749", "0.758749", "0.758749", "0.758749", "0.75...
0.67449975
82
Mark the time at which this workunit ended.
def end(self): self.end_time = time.time() for output in self._outputs.values(): output.close() is_tool = self.has_label(WorkUnit.TOOL) path = self.path() self.run_tracker.cumulative_timings.add_timing(path, self.duration(), is_tool) self.run_tracker.self_timings.add_timing(path, se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mark_end_of_day(self, day):\n self.log.info('This is the end of day {0}'.format(day))\n self.end_of_day = day", "def time_finished(self, time_finished):\n self._time_finished = time_finished", "def done_action(self) -> None:\n self.end = datetime.now()", "def end_time(self, en...
[ "0.66583097", "0.64449584", "0.6326872", "0.6289735", "0.6289735", "0.6265139", "0.6265139", "0.6234436", "0.62301135", "0.62172914", "0.62172914", "0.62172914", "0.6153627", "0.61258507", "0.61258507", "0.61258507", "0.6037034", "0.60273206", "0.60269415", "0.60118943", "0.5...
0.6112485
16
Returns the outcome of this workunit.
def outcome(self): return self._outcome
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_outcome(self):\n return self.__outcome", "def outcome(self) -> str:\n return self._obj._names[\"outcome\"]", "def print_outcome(self) -> None:\n pass", "def get_outcome(self):\n if not self.is_paid:\n raise ValueError(\"There isn't an outcome.\")\n return...
[ "0.8430093", "0.7639671", "0.68954486", "0.6827789", "0.6820332", "0.67546606", "0.6625283", "0.66049665", "0.6515455", "0.648783", "0.64875865", "0.64037997", "0.63969594", "0.6347387", "0.6289971", "0.6236679", "0.62187785", "0.62035197", "0.61907107", "0.61661315", "0.6153...
0.8345807
1
Returns the output buffer for the specified output name (e.g., 'stdout').
def output(self, name): m = WorkUnit._valid_name_re.match(name) if not m or m.group(0) != name: raise Exception('Invalid output name: %s' % name) if name not in self._outputs: path = os.path.join(self.run_tracker.info_dir, 'tool_outputs', '%s.%s' % (self.id, name)) safe_mkdir_for(pat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_output(self, name='0'):\n if name not in self._outputs:\n raise ValueError(\"Invalid port name '{0}'\".format(name))\n return self._outputs[name]", "def open_output(name=None):\n return Output(name)", "def get_buffername(self):\n return self.__buffername", "def get_...
[ "0.6408418", "0.62963146", "0.6108272", "0.60107785", "0.5945936", "0.5822978", "0.58208215", "0.56504697", "0.5643584", "0.56067836", "0.5450599", "0.54426116", "0.54415244", "0.54403776", "0.54354566", "0.54241055", "0.53755194", "0.5341385", "0.52955866", "0.5259623", "0.5...
0.6497121
0
Returns the time (in fractional seconds) spent in this workunit and its children.
def duration(self): return (self.end_time or time.time()) - self.start_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _self_time(self):\r\n return self.duration() - sum([child.duration() for child in self.children])", "def pc_work_time_total(self) -> \"float\":\n return _beamforming_swig.doaesprit_sptr_pc_work_time_total(self)", "def pc_work_time_total(self) -> \"float\":\n return _beamforming_swig.beamfo...
[ "0.751342", "0.6922531", "0.67806494", "0.6778829", "0.6721197", "0.6665561", "0.66495526", "0.6620884", "0.6608558", "0.6594579", "0.6567914", "0.65523624", "0.65499604", "0.65457314", "0.65423316", "0.6523997", "0.6522694", "0.65048695", "0.6495889", "0.64888203", "0.647029...
0.0
-1
A convenient string representation of start_time.
def start_time_string(self): return time.strftime('%H:%M:%S', time.localtime(self.start_time))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_start_time(self):\n return str(self._start_time)", "def start_time(self) -> str:\n return self._start_time", "def start_time(self) -> str:\n return pulumi.get(self, \"start_time\")", "def start_time(self) -> str:\n return pulumi.get(self, \"start_time\")", "def _getStart...
[ "0.8557614", "0.8122252", "0.79897195", "0.79897195", "0.7807414", "0.7771319", "0.7723566", "0.763666", "0.7612324", "0.75345695", "0.75324535", "0.74201363", "0.7406743", "0.7361589", "0.72851455", "0.7241088", "0.7241088", "0.7241088", "0.7241088", "0.7241088", "0.7241088"...
0.87892824
0
Returns the time spent in this workunit outside of any children.
def _self_time(self): return self.duration() - sum([child.duration() for child in self.children])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unaccounted_time(self):\r\n return 0 if len(self.children) == 0 else self._self_time()", "def get_times():\n if f.root.stopped:\n return copy.deepcopy(f.root.times)\n else:\n t = timer()\n times = collapse.collapse_times()\n f.root.self_cut += timer() - t\n return ...
[ "0.67240816", "0.65793294", "0.65013397", "0.6419746", "0.63569784", "0.6348154", "0.6246945", "0.6193087", "0.61845595", "0.6150532", "0.61189747", "0.61183774", "0.6102255", "0.6089984", "0.6084942", "0.60783756", "0.6074338", "0.6052624", "0.60415155", "0.59795964", "0.597...
0.7333608
0
Returns the phase timings as an ordered mapping from the ``Phase`` objects executed to ordered mappings of the ``Goal`` objects executed in the phase to the list of timings corresponding to each execution of the goal. Note that the list of timings will be singleton for all goals except those participating in a ``Group`...
def timings(self): return self._timings
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all():\r\n return sorted(Phase._goals_by_phase.items(), key=lambda pair: pair[0].name)", "def phases(self):\r\n\r\n phase = tsa.cache_to_phase(self.cache, self.ij)\r\n\r\n return phase", "def execution_order(phases):\r\n\r\n # Its key that we process phase dependencies depth first to ma...
[ "0.6546141", "0.5793754", "0.5691994", "0.56810796", "0.55925906", "0.5471928", "0.5404376", "0.5359397", "0.5343559", "0.5330451", "0.5328711", "0.5321367", "0.5317002", "0.5204583", "0.509127", "0.50337595", "0.5033037", "0.50305337", "0.4926533", "0.49257073", "0.49203798"...
0.5312508
13
Returns the total elapsed time in fractional seconds from the creation of this timer until it was ``finished``.
def elapsed(self): if self._elapsed is None: raise ValueError('Timer has not been finished yet.') return self._elapsed
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def elapsed(self):\n return self.__last_time() - self.__start", "def elapsed(self):\n return datetime.datetime.now() - self.start", "def get_elapsed(self):\n delta = self._now() - self.start\n return delta.microseconds / 1000.0", "def duration(self):\n\n ended = time.time()...
[ "0.77084005", "0.7541916", "0.7507272", "0.74996823", "0.7450589", "0.7403515", "0.740068", "0.73852015", "0.7373394", "0.7359754", "0.73530275", "0.72865206", "0.7281267", "0.72789055", "0.7273894", "0.72543705", "0.72457296", "0.7235893", "0.7230496", "0.7220049", "0.719861...
0.79940045
0
Creates filename from name and extension ensuring that the final length is within the max_length constraint. By default the length is capped to work on most filesystems and the fallback to achieve shortening is a sha1 hash of the proposed name. Raises ValueError if the proposed name is not a simple filename but a file ...
def safe_filename(name, extension=None, digest=None, max_length=_MAX_FILENAME_LENGTH): if os.path.basename(name) != name: raise ValueError('Name must be a filename, handed a path: %s' % name) ext = extension or '' filename = name + ext if len(filename) <= max_length: return filename else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def safe_filename(name, extension=None, digest=None, max_length=_MAX_FILENAME_LENGTH):\n if os.path.basename(name) != name:\n raise ValueError(f\"Name must be a filename, handed a path: {name}\")\n\n ext = extension or \"\"\n filename = name + ext\n if len(filename) <= max_length:\n retur...
[ "0.84293497", "0.64527684", "0.63747466", "0.63516045", "0.62751186", "0.62378067", "0.61047363", "0.6023486", "0.5947538", "0.58837813", "0.58663726", "0.5827031", "0.58148277", "0.5813108", "0.5812346", "0.58097243", "0.5794734", "0.5791692", "0.57503885", "0.5726602", "0.5...
0.83847046
1
Returns the Products manager for the current run.
def products(self): return self._products
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def product_manager(driver, open_login_page):\n return ProductManager(driver)", "def setup(self):\n\n import os\n\n from drift.core import manager\n\n if not os.path.exists(self.product_directory):\n raise RuntimeError(\"Products do not exist.\")\n\n # Load ProductManage...
[ "0.6905949", "0.66952115", "0.65361863", "0.65289164", "0.6500319", "0.6393048", "0.6257106", "0.62255293", "0.61734337", "0.6117789", "0.6067508", "0.6047345", "0.59441334", "0.58449745", "0.57325923", "0.56837934", "0.567239", "0.5647442", "0.5614571", "0.56131035", "0.5613...
0.5692711
15
Find the java home for the JVM we use.
def java_home(self): # Implementation is a kind-of-insane hack: we run the jvm to get it to emit its # system properties. On some platforms there are so many hard and symbolic links into # the JRE dirs that it's actually quite hard to establish what path to use as the java home, # e.g., for the purp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_java_home(self):\n return self.java_home", "def home(self):\r\n return self._get_system_properties(self.java)['java.home']", "def _get_home():\n from os.path import expanduser\n home = expanduser('~')\n return home", "def get_home_dir():\r\n home = os.getenv('HOME')\r\n if ho...
[ "0.78223747", "0.78062963", "0.72553796", "0.6929035", "0.67933464", "0.67928267", "0.67928267", "0.6782995", "0.66811043", "0.6676367", "0.66734946", "0.66366285", "0.6488899", "0.6451782", "0.64473885", "0.6281732", "0.62526315", "0.6233529", "0.622607", "0.6213743", "0.609...
0.81118643
0
Adds a mapping of products for the given target, basedir pair. If product_paths are specified, these will overwrite any existing mapping for this target. If product_paths is omitted, the current mutable list of mapped products for this target and basedir is returned for appending.
def add(self, target, basedir, product_paths=None): if product_paths is not None: self.by_target[target][basedir].extend(product_paths) else: return self.by_target[target][basedir]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, target, basedir, product_paths=None):\n if product_paths is not None:\n self.by_target[target][basedir].extend(product_paths)\n else:\n return self.by_target[target][basedir]", "def _add_products_to_genmap(self, artifact, state):\n genmap = self.context.products.get('clas...
[ "0.7951729", "0.6431901", "0.63163954", "0.61834157", "0.51948726", "0.51652944", "0.507001", "0.5050496", "0.49974963", "0.48964638", "0.48926276", "0.48558956", "0.4840227", "0.4835926", "0.4821363", "0.47933367", "0.4786089", "0.47640598", "0.4763687", "0.47128928", "0.471...
0.7978093
0
Returns whether we have a mapping for the specified target.
def has(self, target): return target in self.by_target
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has(self, target):\n return target in self.by_target", "def has_target(self):\n return self.target is not None", "def has_target(self):\n return self._has_target", "def has_remap(self):\n return self.mapping1 is not None or self.mapping2 is not None", "def IsTarget(self, targe...
[ "0.73557633", "0.69732815", "0.69584435", "0.6905861", "0.6813533", "0.6759182", "0.65867436", "0.65128756", "0.65077525", "0.6477814", "0.6437478", "0.6423588", "0.62367535", "0.6204939", "0.61660296", "0.60335207", "0.6014584", "0.6005983", "0.59553087", "0.59007823", "0.58...
0.7371571
0
Returns the product mapping for the given target as a tuple of (basedir, products list). Can return None if there is no mapping for the given target.
def get(self, target): return self.by_target.get(target)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_only(self, product_type, target):\n product_mapping = self.get(product_type).get(target)\n if len(product_mapping) != 1:\n raise ProductError('{} directories in product mapping: requires exactly 1.'\n .format(len(product_mapping)))\n\n for _, files in product_mapping.i...
[ "0.61712605", "0.5941049", "0.5773189", "0.57697004", "0.572162", "0.53904057", "0.531978", "0.52850556", "0.5252307", "0.5241823", "0.5184033", "0.507396", "0.4961571", "0.49125117", "0.48863629", "0.48737928", "0.4863021", "0.47644025", "0.47568613", "0.4756576", "0.4745931...
0.43447536
60
Returns a ProductMapping for the given type name.
def get(self, typename): return self.require(typename)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self, typename):\n return self.products.setdefault(typename, Products.ProductMapping(typename))", "def mapper_for_type(self, type_):\n mapper = self.mappers[type_]\n return mapper", "def get_mapping_type(cls):\n ...", "def _get_simple_type_mapping(simple):\n return _SIMPLE_...
[ "0.7094994", "0.66685987", "0.58657485", "0.5816918", "0.5785912", "0.56980616", "0.56955355", "0.5667927", "0.5665822", "0.5646994", "0.56456447", "0.55992883", "0.5557752", "0.5436814", "0.5357321", "0.53345436", "0.53335345", "0.52325773", "0.5231652", "0.5217598", "0.5172...
0.0
-1
Returns a data product. If the product isn't found, returns None, unless init_func is set, in which case the product's value is set to the return value of init_func(), and returned.
def get_data(self, typename, init_func=None): if typename not in self.data_products: if not init_func: return None self.data_products[typename] = init_func() return self.data_products.get(typename)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_data(self, typename, init_func=None):\n if typename not in self.data_products:\n if not init_func:\n return None\n self.data_products[typename] = init_func()\n return self.data_products.get(typename)", "def getData(self, product, variables, attributes, variable, *args):\r\n\r\n ...
[ "0.7503124", "0.61030227", "0.5636672", "0.5612624", "0.5560435", "0.55210704", "0.55192065", "0.54935455", "0.54615587", "0.54494035", "0.54494035", "0.5440747", "0.53166986", "0.5308677", "0.52417004", "0.5175901", "0.51576596", "0.5151309", "0.5082046", "0.503988", "0.5020...
0.74357015
1
Returns the bootstrapped ivysettings.xml path. By default the ivy.ivy_settings value found in pants.ini but can be overridden by via the PANTS_IVY_SETTINGS_XML environment variable. If neither is specified defaults to ivy's built in default ivysettings.xml of standard public resolvers.
def _ivy_settings(self): return os.getenv('PANTS_IVY_SETTINGS_XML') or self._config.get('ivy', 'ivy_settings')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ivy_settings(self):\r\n return self._ivy_settings", "def ivy_cache_dir(self):\r\n return (os.getenv('PANTS_IVY_CACHE_DIR')\r\n or self._config.get('ivy', 'cache_dir', default=os.path.expanduser('~/.ivy2/cache')))", "def path(self):\r\n if self._root_dir is None:\r\n if 'PANTS_BUILD...
[ "0.66452134", "0.6102432", "0.5878847", "0.58632654", "0.5857292", "0.5831037", "0.57825667", "0.5627268", "0.56239074", "0.55916613", "0.5588968", "0.5588421", "0.558049", "0.5552802", "0.55480367", "0.55080336", "0.5494154", "0.54907537", "0.5455142", "0.54410636", "0.54215...
0.739127
0
Returns the ivysettings.xml path used by this `Ivy` instance.
def ivy_settings(self): return self._ivy_settings
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ivy_settings(self):\r\n return os.getenv('PANTS_IVY_SETTINGS_XML') or self._config.get('ivy', 'ivy_settings')", "def settingsFilePath(self):\n return self._settingsFilePath", "def SvnPath(self):\n return self._module.root_path", "def path(self):\n return os.path.join(self.config....
[ "0.7277745", "0.6748645", "0.6607087", "0.65193695", "0.6455585", "0.6382432", "0.6361737", "0.63443726", "0.6315771", "0.63088703", "0.6242978", "0.6239453", "0.62222713", "0.61757535", "0.6141832", "0.61004347", "0.6073816", "0.5994944", "0.59816796", "0.59371847", "0.59320...
0.7213783
1
Returns the distribution JAVA_HOME.
def home(self): return self._get_system_properties(self.java)['java.home']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def java_home(self):\r\n # Implementation is a kind-of-insane hack: we run the jvm to get it to emit its\r\n # system properties. On some platforms there are so many hard and symbolic links into\r\n # the JRE dirs that it's actually quite hard to establish what path to use as the java home,\r\n # e.g.,...
[ "0.7411168", "0.73842305", "0.706141", "0.6535919", "0.6535919", "0.64346176", "0.6354623", "0.61793345", "0.61526203", "0.6025975", "0.60118353", "0.59980017", "0.5983933", "0.5978758", "0.5891497", "0.58348995", "0.5760189", "0.57564396", "0.5726489", "0.5704504", "0.570219...
0.7514729
0
Creates a Fetcher that uses the given requests api object. By default uses the requests module, but can be any object conforming to the requests api like a requests Session object.
def __init__(self, requests_api=None): self._requests = requests_api or requests
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def api_request_factory() -> APIRequestFactory:\n\n return APIRequestFactory()", "def _api_request(*args, **kwargs):\n response = requests.request(*args, **kwargs)\n return APIResponse(response)", "def create_session(obj):\n session = requests.Session()\n if obj.user is not None and obj....
[ "0.61580867", "0.58132315", "0.56860733", "0.5545081", "0.5471927", "0.5471927", "0.5393275", "0.53434694", "0.5306117", "0.5305791", "0.53025234", "0.5290272", "0.5290117", "0.5286364", "0.5283704", "0.5261452", "0.5252235", "0.5244594", "0.5236712", "0.5229315", "0.521027",...
0.66185606
0
Gets the wiki specific config for the given wiki if present or else returns None.
def wiki_config(self, wiki): return self._wikis.get(wiki)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config() -> Optional[Config]:\n return CurrentConfig.get()", "def get_config(self, heading, attribute):\n if attribute in self._config[heading]:\n return self._config[heading][attribute]\n else:\n return None", "def GetDefaultWiredNetwork(self):\n config = ...
[ "0.6112854", "0.5994643", "0.5783921", "0.55512077", "0.554498", "0.5518384", "0.54807335", "0.5445101", "0.5442028", "0.54253757", "0.54114145", "0.53311473", "0.5289798", "0.527764", "0.5277572", "0.52656275", "0.5256929", "0.52560806", "0.5248089", "0.52399755", "0.5238302...
0.8581994
0
Sets an alternative artifact to fetch or adds additional artifacts if called multiple times.
def with_artifact(self, name=None, type_=None, ext=None, url=None, configuration=None, classifier=None): artifact = Artifact(name or self.name, type_=type_, ext=ext, url=url, conf=configuration, classifier=classifier) self.artifacts.append(artifact) return se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_artifact(args, artifact: Artifact):\n if artifact.producing_task_name not in args._artifacts:\n args._artifacts[artifact.producing_task_name] = []\n\n # Replace an artifact if it already exists\n for art in args._artifacts[artifact.producing_task_name]:\n if art.name == artifact.name...
[ "0.57180816", "0.5593395", "0.52047217", "0.50876915", "0.50335443", "0.50158924", "0.49785623", "0.4954411", "0.4935364", "0.48879468", "0.4866662", "0.48612756", "0.4792786", "0.47888058", "0.47788522", "0.47725075", "0.47488314", "0.4679705", "0.46541345", "0.46419668", "0...
0.48836187
10
The postlaunchtime agent fully qualified class name. Either ``agent_class`` or ``premain`` will be defined and the other will be `None`.
def agent_class(self): return self._agent_class
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_runtime_class_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"default_runtime_class_name\")", "def default_runtime_class_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"default_runtime_class_name\")", "def class_name(self) -> Optional[pulu...
[ "0.5960039", "0.5960039", "0.5749209", "0.5624605", "0.5577515", "0.5577313", "0.55544835", "0.54081637", "0.53838724", "0.5367785", "0.53115517", "0.5273957", "0.5264839", "0.52558374", "0.52558374", "0.52554846", "0.5242869", "0.5184812", "0.5184812", "0.5111621", "0.510798...
0.69331545
0
Finds the source root for the given target. If none is registered, returns the parent directory of the target's BUILD file.
def find(cls, target): target_path = os.path.relpath(target.address.buildfile.parent_path, get_buildroot()) def _find(): for root_dir, types in cls._TYPES_BY_ROOT.items(): if target_path.startswith(root_dir): # The only candidate root for this target. # Validate the target type, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _find_project_root_dir(target: Path) -> Path:\n p = Path(\".\").resolve()\n for _ in range(1000):\n try:\n candidate = _search_for_dir(target, p)\n return candidate.parent\n except DirectoryNotFoundException:\n p = p.parent\n raise DirectoryNotFoundExcept...
[ "0.73706114", "0.6738307", "0.66704947", "0.6637995", "0.6495167", "0.6487533", "0.64494246", "0.6435465", "0.63865393", "0.63343835", "0.6229706", "0.6224849", "0.62037325", "0.62037325", "0.62037325", "0.62037325", "0.60740334", "0.60633886", "0.6048729", "0.60486615", "0.6...
0.7638221
0
Returns the set of target types rooted at root.
def types(cls, root): return cls._TYPES_BY_ROOT[root]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def roots(cls, target_type):\r\n return cls._ROOTS_BY_TYPE[target_type]", "def all_roots(cls):\r\n return dict(cls._TYPES_BY_ROOT)", "def target_roots(self):\r\n return self._target_roots", "def targets(cls, spec):\r\n return set(target for target, _ in SpecParser(cls.build_root).parse(spec) if t...
[ "0.7794422", "0.6728062", "0.6715876", "0.63980365", "0.6359944", "0.60857785", "0.6069921", "0.60230654", "0.6014031", "0.58893853", "0.58259284", "0.58023995", "0.5776046", "0.5729142", "0.5726099", "0.5705667", "0.5696364", "0.5599272", "0.5590901", "0.55519664", "0.551826...
0.75004065
1
Validate each target. Returns a topologically ordered set of VersionedTargets, each representing one input target.
def _sort_and_validate_targets(self, targets): # We must check the targets in this order, to ensure correctness if invalidate_dependents=True, # since we use earlier cache keys to compute later cache keys in this case. ordered_targets = self._order_target_list(targets) # This will be a list of Ver...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def invalid_targets(self):\n return self._combined_invalid_versioned_targets.targets", "def all_targets(self):\n return self._combined_all_versioned_targets.targets", "def all_versioned_targets(self):\n return self._all_versioned_targets", "def targets(cls, spec):\r\n return set(target for target...
[ "0.64057565", "0.6295367", "0.61033696", "0.59484154", "0.5847968", "0.5841544", "0.5782443", "0.56371206", "0.5635663", "0.56042", "0.55892", "0.55732477", "0.55506396", "0.55481476", "0.5543287", "0.55361706", "0.5535824", "0.5471386", "0.54452", "0.5419666", "0.5419045", ...
0.70174634
0
Gets the set of targets that share exclusives.
def get_targets_for_group_key(self, key): return self.key_to_targets[key]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compute_exclusives_conflicts(self, targets):\r\n exclusives_map = defaultdict(set)\r\n for t in targets:\r\n if t.exclusives is not None:\r\n for k in t.exclusives:\r\n exclusives_map[k] |= t.exclusives[k]\r\n conflicting_keys = defaultdict(set)\r\n for k in exclusives_map:\r\...
[ "0.67179936", "0.62366706", "0.61901206", "0.61854243", "0.6017103", "0.59737426", "0.59115326", "0.58502066", "0.5817254", "0.5718862", "0.5677231", "0.56390846", "0.56061614", "0.56041795", "0.55346924", "0.54289085", "0.5406269", "0.5396826", "0.538914", "0.5368443", "0.53...
0.0
-1
Returns the set of unique extensions (including the .) from the given resource files.
def extract_resource_extensions(resources): if resources: for resource in resources: _, ext = os.path.splitext(resource) yield ext
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_file_extensions():\n my_files_ext = []\n for file in os.listdir(os.getcwd()):\n if os.path.isfile(file):\n file_info = os.path.splitext(file)\n file_ext = file_info[1]\n my_files_ext.append(file_ext)\n return [file for file in my_files_ext]", "def files(se...
[ "0.6715423", "0.6557292", "0.65498835", "0.65272665", "0.64910775", "0.6484212", "0.6482426", "0.6472521", "0.62891704", "0.62653375", "0.622126", "0.62154514", "0.6200901", "0.6195072", "0.61864555", "0.6182542", "0.6106631", "0.60898733", "0.6089785", "0.60734624", "0.60214...
0.7352678
0
Subclasses can override to determine whether a given artifact represents a classpath artifact.
def is_classpath_artifact(self, path): return path.endswith('.jar') or path.endswith('.war')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_mappable_artifact(self, org, name, path):\r\n return self.is_classpath_artifact(path)", "def is_jar_library(self):\r\n return self.has_label('jars')", "def Check(self, artifacts: list[T]) -> bool:\n raise NotImplementedError(\"Subclass didn't implement Check method.\")", "def is_acceptable(se...
[ "0.7618151", "0.5635232", "0.5566645", "0.54749215", "0.5388443", "0.518531", "0.50553733", "0.5039999", "0.49797288", "0.49603236", "0.49519783", "0.49519682", "0.49400797", "0.49358827", "0.48931247", "0.48797822", "0.48482716", "0.48402768", "0.4832372", "0.48065355", "0.4...
0.78343743
0
Saves the pushdb as a properties file to the given path.
def dump(self, path): with open(path, 'w') as props: Properties.dump(self._props, props)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_config(self):\n data = json.dumps(self.cfg)\n\n try:\n file = open(self.cfg_file_name, 'w')\n file.write(data)\n except OSError as err:\n print(\"can't save property: {0}\".format(err))\n else:\n file.close()", "def save(self, path)...
[ "0.66015136", "0.63989455", "0.6369433", "0.6272065", "0.62695974", "0.62425905", "0.6191169", "0.6175053", "0.61693084", "0.6149895", "0.6149895", "0.6149895", "0.6133867", "0.6104164", "0.6084475", "0.6073259", "0.6061787", "0.60375136", "0.60095966", "0.60078454", "0.60078...
0.7039392
0
Returns the products in this analysis. Returns a map of > list of classfiles, relative to the classes dir.
def compute_products(self): src_to_classfiles = defaultdict(list) for pcd_entry in self.pcd_entries: srcfile = pcd_entry[1] # In the file classes are represented with slashes, not dots. E.g., com/foo/bar/Baz. src_to_classfiles[srcfile].append(pcd_entry[0] + '.class') return src_to_cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def products(self):\n _products = []\n for ext in self.exts:\n prod = Product(ext, self.node.opath_from_ext(ext))\n _products.append(prod)\n\n return _products", "def return_classes(self):\n\n\t\t \n\t\t \n\t\treturn self.classes", "def _compute_classes_by_source(...
[ "0.61733264", "0.6111549", "0.60902", "0.6040727", "0.59079903", "0.59002995", "0.58953214", "0.5891696", "0.58745205", "0.58628076", "0.57296455", "0.57267636", "0.57062024", "0.5693807", "0.5692792", "0.5675197", "0.5674624", "0.56467175", "0.56147516", "0.5613027", "0.5613...
0.78736705
0
Returns a map from abs path of source, class or jar file to an OrderedSet of targets. The value is usually a singleton, because a source or class file belongs to a single target. However a single jar may be provided (transitively or intransitively) by multiple JarLibrary targets. But if there is a JarLibrary target tha...
def _compute_targets_by_file(self): targets_by_file = defaultdict(OrderedSet) # Multiple JarLibrary targets can provide the same (org, name). jarlibs_by_id = defaultdict(set) # Compute src -> target. with self._context.new_workunit(name='map_sources'): buildroot = get_buildroot() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compute_sources_by_target(self, targets):\r\n def calculate_sources(target):\r\n sources = [s for s in target.sources_relative_to_buildroot() if s.endswith(self._file_suffix)]\r\n # TODO: Make this less hacky. Ideally target.java_sources will point to sources, not targets.\r\n if hasattr(tar...
[ "0.6452099", "0.6226607", "0.58485216", "0.5750565", "0.5680004", "0.56624186", "0.5604147", "0.5521759", "0.54561764", "0.5454915", "0.5440344", "0.53742075", "0.5355965", "0.5313585", "0.53030914", "0.52828914", "0.5280372", "0.5244346", "0.5240584", "0.5225448", "0.521574"...
0.72231436
0
Merges multiple dicts into one. Assumes keys don't overlap.
def merge_dicts(dicts): ret = defaultdict(list) for d in dicts: ret.update(d) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def merge_dicts(*dicts):\n result = {}\n for d in dicts:\n result.update(d)\n return result", "def merge_n_dictionnaries(dicts):\n result = dicts[0]\n for i in range(1, len(dicts)):\n result = merge_2_dictionnaries(result, dicts[i])\n return result", "def merge_dicts(listDicts) ...
[ "0.7751667", "0.7701522", "0.76605755", "0.76173854", "0.7593822", "0.7550813", "0.7528197", "0.7528197", "0.7528197", "0.7528197", "0.7528197", "0.7528197", "0.74598587", "0.7440558", "0.74343336", "0.7379057", "0.73607373", "0.7359268", "0.7332238", "0.7191667", "0.71851337...
0.75408036
6
Split a dict by its keys.
def _split_dict(self, d, splits): ret = [] for split in splits: dict_split = defaultdict(list) for f in split: if f in d: dict_split[f] = d[f] ret.append(dict_split) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_dictionary(dict_to_split, bases):\n dicts = list()\n for base in bases:\n if isinstance(base, dict):\n base_keys = base.keys()\n else:\n base_keys = base\n new_dict = dict()\n for key, value in dict_to_split.items():\n if key in base_keys...
[ "0.73201674", "0.7221838", "0.7008702", "0.65600055", "0.61795133", "0.59824604", "0.58231384", "0.57981265", "0.5665848", "0.562459", "0.5602924", "0.55899197", "0.5580749", "0.5575269", "0.5566733", "0.55489314", "0.55478555", "0.5538946", "0.5536734", "0.5525782", "0.55056...
0.6712232
3
Convert snake casing where present to camel casing
def camelcase(string): return ''.join(word.capitalize() for word in string.split('_'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def snake_to_camel_case(value):\n words = value.strip(\"_\").split(\"_\")\n return words[0].lower() + \"\".join([word.capitalize() for word in words[1:]])", "def snake_to_camel_case(snake_str: str) -> str:\n\n words = snake_str.strip(\"_\").split(\"_\")\n return words[0] + \"\".join(word[:1].upper() ...
[ "0.81641585", "0.8156515", "0.8125737", "0.8125737", "0.8125095", "0.8051559", "0.80136764", "0.7937353", "0.79109627", "0.7905917", "0.7889227", "0.7786045", "0.7779311", "0.77601343", "0.7733838", "0.7719823", "0.77150065", "0.7684597", "0.7671922", "0.7637715", "0.76268554...
0.0
-1
Set the product type for this task. By default, each task is considered as creating a unique product type. Subclasses can override this to specify a shared product type, e.g., 'classes'. Tasks with the same product type can invalidate each other's targets, e.g., if a ScalaLibrary depends on a JavaLibrary, a change to t...
def product_type(self): return self.__class__.__name__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_product_type(self) -> None:\n # Get MTD XML file\n prod_type = self.split_name[2][:3]\n self.product_type = getattr(Sv1ProductType, prod_type)\n\n # Manage not orthorectified product\n if self.product_type == Sv1ProductType.L1B:\n self.is_ortho = False", "de...
[ "0.7141705", "0.66930944", "0.6678909", "0.66214865", "0.64652187", "0.62416387", "0.61812896", "0.58867735", "0.5842661", "0.5842661", "0.578513", "0.574514", "0.5709794", "0.5510009", "0.549637", "0.5483195", "0.54654753", "0.5416972", "0.54164714", "0.5399081", "0.5394564"...
0.62549657
5
Finds the root thrift files in the graph formed by sources and their recursive includes.
def find_root_thrifts(basedirs, sources, log=None): root_sources = set(sources) for source in sources: root_sources.difference_update(find_includes(basedirs, source, log=log)) return root_sources
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_compile_roots(targets, is_thrift_target):\r\n\r\n basedirs, sources = calculate_compile_sources(targets, is_thrift_target)\r\n sources = find_root_thrifts(basedirs, sources)\r\n return basedirs, sources", "def _recursivelyFindFiles(self, topLevelDirectory, extension=\".py\"):\n print ('fi...
[ "0.61078346", "0.6089461", "0.6065815", "0.60628664", "0.5987996", "0.5974423", "0.5958181", "0.59190553", "0.58970934", "0.5883647", "0.58821446", "0.580816", "0.57954234", "0.5789457", "0.57821864", "0.57640934", "0.576076", "0.5756035", "0.57484615", "0.5741834", "0.569903...
0.67794853
0
A utility shortcut function to parse a thrift json object of the specified class.
def json_to_thrift(json_str, root_thrift_class): return json.loads(json_str, cls=ThriftJSONDecoder, root_thrift_class=root_thrift_class)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_json_string(cls, json_string: Text, check_params=False):\n lparams = json.loads(json_string)\n if check_params:\n return cls(**lparams)\n else:\n return cls.from_dict(lparams, return_instance=True, return_unused=False)", "def fromJSON(cls, data):\n retur...
[ "0.5852627", "0.5816089", "0.572272", "0.5720337", "0.569608", "0.5664953", "0.5614519", "0.55865866", "0.5580013", "0.5570335", "0.5566752", "0.55112827", "0.54939944", "0.54762274", "0.54627985", "0.5444885", "0.5444432", "0.5419229", "0.5384911", "0.5381221", "0.53712845",...
0.71346414
0
Returns the canonical BUILD file path for the given relative build path.
def build_path(cls, relpath): if os.path.basename(relpath).startswith('BUILD'): return relpath else: return os.path.join(relpath, 'BUILD')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_relpath(self):\n return join_path(\"..\", self.build_dirname)", "def relative_path(filename):\n length = len(os.path.abspath(DOC_BUILD_DIR)) + 1\n return os.path.abspath(filename)[length:]", "def get_build_file_path(path):\n if os.path.isdir(path):\n directory = path\n else:...
[ "0.7462511", "0.7289681", "0.7246071", "0.71991646", "0.6987461", "0.68795216", "0.683695", "0.66497153", "0.64533925", "0.6445642", "0.6393728", "0.63710034", "0.63329303", "0.6297994", "0.6263629", "0.62530375", "0.622624", "0.6206129", "0.6205149", "0.6157654", "0.6157403"...
0.79040706
0
Verifies the expected output entries are emitted by the console task under test.
def assert_console_output(self, *output, **kwargs): self.assertEqual(sorted(output), sorted(self.execute_console_task(**kwargs)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assert_console_output(self, *output, **kwargs):\n self.assertEqual(sorted(output), sorted(self.execute_console_task(**kwargs)))", "def test_debug_output(self):\n assert output(self.msg) is not None", "def assert_console_output_ordered(self, *output, **kwargs):\n self.assertEqual(list(output), ...
[ "0.76689315", "0.7244116", "0.7196238", "0.7169747", "0.7053952", "0.693121", "0.6707625", "0.66544557", "0.65974027", "0.6567176", "0.65491974", "0.65001065", "0.6470276", "0.64692086", "0.64385754", "0.6418832", "0.6402738", "0.6386312", "0.63639927", "0.6348444", "0.633164...
0.7702382
0
Converts a mixture model approximating a location into a rectangular box
def convert_gmm_to_box(gmm, color='blue', alpha=0.6, points_only=True): midpoint = gmm.means_ std = 3*np.sqrt(gmm.covars_) width = std[:, 0] height = std[:, 1] upper_left_point_x = midpoint[:, 0] - width // 2 upper_left_point_y = midpoint[:, 1] - height // 2 if points_only: return upper_left_point_x, upper_le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_box(blcorner, trcorner):\n modelbox = [[], []]\n if blcorner != None:\n x, y = literal_eval(blcorner)\n modelbox[0].append(str(x))\n modelbox[0].append(str(y))\n else:\n raise TelemacException(\\\n '... could not find your bounding box bottom left'\n ...
[ "0.5961611", "0.57915485", "0.5574311", "0.5532596", "0.5527075", "0.5518218", "0.5490475", "0.54368836", "0.5429152", "0.5400554", "0.53977513", "0.5388963", "0.5388175", "0.5377163", "0.535237", "0.53335583", "0.532443", "0.5313612", "0.52869815", "0.52816993", "0.5279318",...
0.5561734
3
Whether the keypoints has attributes.
def has_attributes(self): return bool(self.attrs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_attributes(self):\n\n pass", "def hasRequiredAttributes(self):\n return _libsbml.KineticLaw_hasRequiredAttributes(self)", "def has_keypoints_attribute(self, label, attr_name):\n if not self.has_keypoints_label(label):\n return False\n\n return self.schema[label].h...
[ "0.7984763", "0.75532347", "0.7411093", "0.74065495", "0.7382732", "0.73621565", "0.72673756", "0.72592986", "0.7238525", "0.7194573", "0.71886194", "0.7182175", "0.7178081", "0.7174342", "0.7169887", "0.7169191", "0.716761", "0.713604", "0.71321917", "0.71108985", "0.7106584...
0.80131793
0
Returns the set of ``index`` values of all keypoints in the container. ``None`` indexes are omitted.
def get_indexes(self): return set(k.index for k in self if k.has_index)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_idxvals(self):\n input_rows = list()\n input_cols = list()\n for key in self.index:\n input_rows.append(key[0])\n input_cols.append(key[1])\n\n return list(OrderedSet(input_rows)), list(OrderedSet(input_cols))", "def keys(self):\n\t\treturn iter(Point(x, ...
[ "0.69782424", "0.64564383", "0.6392449", "0.62779146", "0.62605184", "0.6218466", "0.6211016", "0.6123443", "0.6079137", "0.6063578", "0.6060657", "0.6057965", "0.6055225", "0.60477406", "0.5969441", "0.59654635", "0.5959697", "0.5959697", "0.5959697", "0.594969", "0.5948855"...
0.6852435
1
Whether this schema has no labels of any kind.
def is_empty(self): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_for_labels(self):\n check = True\n if 'labels' not in self.mapper:\n check = False\n return check", "def allowNoInternalLabel(self):\n if (self.internallabels != None):\n return self.internallabels.isempty()\n elif self.layer != None:\n ...
[ "0.72563845", "0.72375864", "0.72189367", "0.72189367", "0.71678513", "0.7137653", "0.7046597", "0.70134956", "0.6766707", "0.6729228", "0.66815865", "0.66678643", "0.66526204", "0.66217494", "0.66217494", "0.65826744", "0.6545621", "0.65203995", "0.6513872", "0.6497965", "0....
0.60543764
82
Gets the keypoints label for the schema.
def get_label(self): return self.label
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iter_keypoints_labels(self):\n return iter(self.schema)", "def label_schema(self):\n return self._label_schema", "def label(self) -> str:\n return self.keysym.label", "def get_label(cls) -> str:\n return cls._meta.label_lower.split('.')[-1]", "def get_label(self):\n r...
[ "0.65870523", "0.6463282", "0.6390164", "0.63397366", "0.6299828", "0.6277452", "0.62611604", "0.62408435", "0.6186302", "0.617246", "0.6155453", "0.61441493", "0.61429924", "0.6136082", "0.61149764", "0.61085486", "0.6106798", "0.610539", "0.6096668", "0.6094848", "0.6083861...
0.6207691
9