query stringlengths 9 9.05k | document stringlengths 10 222k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
This method adds headers to an existing Excel file. | def set_headers(ws):
for column in range(1, 1 + len(headers)): # parse through each column in the first row
ws.cell(row=1, column=column).value = headers[column - 1] # add corresponding header value to the Excel file
| [
"def write_header(sheet):\n\theaders=['NAME','IMAGE LINK','ORIGIN','IDENTIFYING THE PEST','LEGALLY TO AUSTRALIA','SECURE SUSPECT SPECIMENS']\n\tfor i in range(1,2):\n\t\tfor k in range(1,7):\n\t\t\tsheet.cell(row=i, column=k).value = headers[k-1]\n\tfor i in range(1,2):\n\t\tfor k in range(1,7):\n\t\t\tsheet.cell(r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method creates a new workbook to add the merged data. | def create_new_workbook():
merged_wb = openpyxl.Workbook() # create new Workbook
merged_wb["Sheet"].title = "Merged Data" # change the title of the new sheet to "Merged Data"
set_headers(merged_wb["Merged Data"]) # set the headers
merged_wb.save('Merged_Data.xlsx') # sa... | [
"def create_workbook(self):\n try:\n if '.xlsm' in self.file_name or '.xltm' in self.file_name:\n self.wb = load_workbook(self.file_path, keep_vba=True)\n else:\n if '.xlsx' not in self.file_name:\n self.file_name = self.file_name + '.xls... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
processes internal list of game events for this frame | def process_events(self):
gameevents = copy.copy(self.gameevents)
del self.gameevents[:]
while len(gameevents) > 0:
currentevent = gameevents.pop(0)
ticks = currentevent.ticks
time = currentevent.time
eid = currentevent.eid
game = curre... | [
"def processEvents(self):\n self.framelist = sorted(self.framelist, key=lambda event: event.timestamp, reverse=True)\n self.framequeue = sorted(self.framequeue, key=lambda event: event.timestamp, reverse=True)\n self.packetqueue = sorted(self.packetqueue, key=lambda event: event.timestamp, reve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test collisions between relevant game entities | def test_collisions(self):
if self.fortress_exists:
if self.smallhex.collide(self.ship):
self.gameevents.add("collide", "small_hex", "ship")
else:
self.smallhex.small_hex_flag = False
for i, shell in enumerate(self.shell_list):
if shell... | [
"def test_simple_collision(self):\n with PhysicsEngineHarness('tests/simple-collision.json') as physics_engine:\n # In this case, the first entity is standing still and the second\n # on a collision course going left to right. The two should bounce.\n # Entity 0 has r=50 and ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
determine whether any shells or missiles have left the world | def check_bounds(self):
for i, missile in enumerate(self.missile_list):
if missile.out_of_bounds(self.world):
del self.missile_list[i]
self.gameevents.add("bounds_remove", "missile")
for i, shell in enumerate(self.shell_list):
if shell.out_of_bound... | [
"def _is_fail(self):\n failed = False\n for obj in self.world_state.objects:\n failed = failed or obj.lost\n return failed",
"def check_game_over(self):\n for piece in self.pieces:\n if not piece.destroyed:\n return False\n print(\"Signal.END... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
before game begins, present the game number | def draw_game_number(self):
self.game_title.draw(self.game_title_rect.topleft)
pygl2d.draw.line((self.SCREEN_WIDTH / 4 , self.SCREEN_HEIGHT / 16 * 8.5), (self.SCREEN_WIDTH / 4 * 3, self.SCREEN_HEIGHT / 16 * 8.5), (255, 255, 255))
pygl2d.draw.line((self.SCREEN_WIDTH / 4 , self.SCREEN_HEIG... | [
"def tellGameNumber(self):\n t = time.time() - self.start_time\n d = self.start_duration\n if t < d:\n c = int(255 * (1 - (t / d)))\n self.window.alert(\"Starting game number \" + str(self.game_number))",
"def tellIfStarted(self):\n if self.game_number == 1:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a list of GraphQLError instances describing each deprecated use. | def find_deprecated_usages(
schema: GraphQLSchema, ast: DocumentNode
) -> List[GraphQLError]:
type_info = TypeInfo(schema)
visitor = FindDeprecatedUsages(type_info)
visit(ast, TypeInfoVisitor(type_info, visitor))
return visitor.errors | [
"def warnings(self) -> List[Error]:",
"def _check_deprecated(self, name, current, deprecated):\n if name in deprecated and name not in self._emitted_deprecations:\n self._emitted_deprecations.add(name)\n current = (current[0] or 'DEFAULT', current[1])\n format_dict = {'dep_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Summons the bot to a voice channel. If no channel was specified, it joins your channel. | async def _summon(self, ctx: commands.Context, *, channel: discord.VoiceChannel = None):
if not channel and not ctx.author.voice:
raise VoiceError('You are neither connected to a voice channel nor specified a channel to join.')
destination = channel or ctx.author.voice.channel
if c... | [
"async def _summon(self, ctx: commands.Context, *, channel: discord.VoiceChannel = None):\n if not channel and not ctx.author.voice:\n raise commands.CommandError('You are neither connected to a voice channel nor specified a channel to join.')\n # raise VoiceError()\n\n destinati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stops playing song and clears the queue. | async def _stop(self, ctx: commands.Context):
ctx.voice_state.songs.clear()
if not ctx.voice_state.is_playing:
ctx.voice_state.voice.stop()
await ctx.message.add_reaction('⏹') | [
"async def stop(self) -> None:\n if self._play_task is not None:\n # If we stop during a song, add it to the front of the queue to be resumed later\n if self._now_playing is not None:\n if self._play_start_time is not None:\n # Add the time spent playin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows the player's queue. You can optionally specify the page to show. Each page contains 10 elements. | async def _queue(self, ctx: commands.Context, *, page: int = 1):
if len(ctx.voice_state.songs) == 0:
return await ctx.send('Empty queue.')
items_per_page = 10
pages = math.ceil(len(ctx.voice_state.songs) / items_per_page)
start = (page - 1) * items_per_page
end = s... | [
"def show_queue(args):\n queue()",
"def show_queue(Q):\n print(\"(Size of the queue:\", Q.qsize(), \")\", end=\" \")\n for n in list(Q.queue):\n print(n, end=\" \")\n print()",
"def show_player_queue(self, message):\n user = self.ts.get_user(message)\n queue_str = ', '.join([str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
changes color for a role | async def color(self, ctx, roleIn, color):
print("Login as")
print(self.bot.user)
print("-------")
server = ctx.message.guild
role = discord.utils.get(server.roles, id=roleIn) or discord.utils.get(server.roles, name=roleIn) or discord.utils.get(server.roles, name=roleIn.capitaliz... | [
"def changeRole(self, node, role):",
"def changeRoleInfo(self, role, info):",
"def role_changed(self,user,old_role,new_role,stanza):\r\n pass",
"def _overrideRole(self, newRole, args):\n oldRole = args.get('role', None)\n args['role'] = newRole\n return oldRole",
"def setRole(sel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Speech API voice type | async def voice(self, ctx, voice: str):
global voice_type
voice_dict = {
'IN_F': 'en-IN-Wavenet-A',
'IN_M': 'en-IN-Wavenet-C',
'US_F': 'en-US-Wavenet-G',
'US_M': 'en-US-Wavenet-B',
'GB_F': 'en-GB-Wavenet-A',
'GB_M': 'en-GB-Wavenet-... | [
"def setvoice(*args):\n try:\n ttsEng.setvoice(args[0])\n except Exception, e:\n logging.error(e)",
"def set_voice(self, index):\n try:\n self.speaker.Voice = self.voices[index]\n except:\n print('error: do not set voice')",
"def setvoice(self, name):\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists example Google Speech API voice codes | async def voicelist(self, ctx):
await send_msg(ctx, 'Voice List', r"""
**AU_M:** Australian Male
**AU_F:** Australian Female
**IN_M:** Indian Male
**IN_F:** Indian Female
**US_M:** Standard Male
**US_F:** Standard Female
**GB_M:** British Male
**GB_F:** British Female
... | [
"def api_speech(data, ua):\n # Random header\n headers = {\n 'Content-Type': 'audio/x-flac; rate=16000;',\n 'User-Agent': ua['google chrome'],\n }\n params = (\n ('client', 'chromium'),\n ('pFilter', '0'),\n ('lang', 'en'),\n ('key', 'AIzaSyBOti4mM-6x9WDnZIj... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Join voice channel and force bypass restrictions. | async def joinForce(self, ctx):
print("joining")
channel = ctx.author.voice.channel
await channel.connect() | [
"async def join(ctx):\n channel = ctx.message.author.voice_channel\n if channel is None:\n return\n if bot.is_voice_connected(channel.server):\n await bot.voice.disconnect()\n await bot.join_voice_channel(channel)",
"async def join(ctx):\n if ctx.author.voice is None:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Leave voice channel and force bypass restrictions. | async def leaveForce(self, ctx):
await ctx.voice_client.disconnect() | [
"async def leave(self, ctx):\n if ctx.guild is None:\n await ctx.reply(\"This command can only be used in a server, not in DMs.\")\n raise commands.CommandError(\"Invoker not in a guild.\")\n\n if ctx.author.voice is None or ctx.author.voice.channel is None:\n await ct... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Purges the past x number of messages. | async def purge(self, ctx, count: int):
await ctx.channel.purge(limit=count+1) | [
"async def purge(self, ctx, msg_number: int = 10):\n\n if ctx.guild.id == 202724765218242560:\n return\n\n if msg_number > 100:\n await ctx.error(\"No more than 100 messages can be purged at a time.\")\n return\n\n deleted = await ctx.channel.purge(limit=msg_num... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
a test suite for various sqlalchemy engines. | def _test_engine(engine, service, vendor, expected_meta):
tracer = Tracer()
tracer.writer = DummyWriter()
# create an engine and start tracing.
trace_engine(engine, tracer, service=service)
start = time.time()
@contextlib.contextmanager
def _connect():
try:
conn = engin... | [
"def test_engine(test_app):\n db = Database(test_app)\n\n assert db.engine",
"def test_engine(self):\n config = {\n \"url\": 'sqlite://',\n \"connect_args\": {\n \"check_same_thread\": \"false\",\n \"poolclass\": \"pool.StaticPool\"\n }\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(Book, str, list of str, str, str) > NoneType 제목이 title이고, 작성한 저자는 authors고, 출판사는 publisher고, isbn은 ISBN인 새 책을 생성한다. 별칭을 피하기 위해 저자 목록의 사본을 만든다. | def __init__(self, title, authors, publisher, isbn):
self.title = title
# 호출자가 나중에 리스트를 수정할 경우를 대비해서 저자 리스트를 복사한다.
self.authors = authors[:]
self.publisher = publisher
self.ISBN = isbn | [
"def get_single_book_info(self, isbn):\n self.cursor.execute(\"SELECT * FROM book WHERE ISBN=%s\", (isbn,))\n books = self.cursor.fetchall()\n for book in books:\n authors = []\n self.cursor.execute(\"\"\"SELECT name FROM Author A, Wrote W, Book B WHERE A.ID = W.authorID A... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(Book) > int 이 책의 저자수를 반환한다. >>> pybook = Book("Practical Programming", \ ["Campbell", "Gries", "Montojo"], \ "Pragmatic Bookshelf", \ "9781680502688") >>> pybook.num_authors() 3 | def num_authors(self):
return len(self.authors) | [
"def nauthors(self):\n return self._nauthors",
"def get_number_of_books(self) -> int:\n raise NotImplementedError",
"def count(self):\n return Library.functions.count(self._book)",
"def get_authors_count(self, institution):\n return self.db.execute(u'''SELECT COUNT(*) FROM authors ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if color is gray (all channels the same). | def is_gray(color):
m = HEX_IS_GRAY_RE.match(color)
return m is not None | [
"def is_grayscale(self):\n return self.r == self.g == self.b",
"def is_gray(img: np.ndarray):\n return len(img.shape) == 2 and img.shape[0] > 1 and img.shape[1] > 1",
"def is_colour(self, im):\n hsl = cv2.cvtColor(im, cv2.COLOR_BGR2HSV)\n h, s, v = np.mean(hsl, (0, 1))\n if s < 10... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Normailze a decimal alpha value. | def alpha_dec_normalize(dec):
temp = float(dec)
if temp < 0.0 or temp > 1.0:
dec = fmt_float(clamp(float(temp), 0.0, 1.0), 3)
alpha_dec = dec
alpha = "%02X" % round_int(float(alpha_dec) * 255.0)
return alpha, alpha_dec | [
"def normalize(score, alpha=15):\n norm_score = score / math.sqrt((score * score) + alpha)\n if norm_score < -1.0:\n return -1.0\n elif norm_score > 1.0:\n return 1.0\n else:\n return norm_score",
"def alpha_dec(self):\r\n return int(self.alpha_num) / 100",
"def power_nor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Normailze a percent alpha value. | def alpha_percent_normalize(perc):
alpha_float = clamp(float(perc.strip('%')), 0.0, 100.0) / 100.0
alpha_dec = fmt_float(alpha_float, 3)
alpha = "%02X" % round_int(alpha_float * 255.0)
return alpha, alpha_dec | [
"def normalize(score, alpha=15):\n norm_score = score / math.sqrt((score * score) + alpha)\n if norm_score < -1.0:\n return -1.0\n elif norm_score > 1.0:\n return 1.0\n else:\n return norm_score",
"def _percentage(value):\n return _numeral(value.replace(' ', '').replace('%', ''... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Condensed version of context_slicer with more limited options. | def simple_context_slicer(df, method: str = 'None', forecast_length: int = 30):
if method in [None, "None"]:
return df
df = df.sort_index(ascending=True)
if 'forecastlength' in str(method).lower():
len_int = int([x for x in str(method) if x.isdigit()][0])
return df.tail(len_int * f... | [
"def subsetting_context(self):\n raise NotImplementedError(\n 'operation subsetting_context(...) not yet implemented')",
"def _get_pooled_features_with_lite(self, context_clip_loader, idxs): \n H = self.args.num_lite_samples\n context_features_with_grads = self._get_features_in_bat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fit sin to the input time sequence, and return fitting parameters "amp", "omega", "phase", "offset", "freq", "period" and "fitfunc" | def fit_sin(self, tt, yy):
import scipy.optimize
tt = np.array(tt)
yy = np.array(yy)
ff = np.fft.fftfreq(len(tt), (tt[1] - tt[0])) # assume uniform spacing
Fyy = abs(np.fft.fft(yy))
guess_freq = abs(
ff[np.argmax(Fyy[1:]) + 1]
) # excluding the zero... | [
"def sineFit(wavelength,frequency,amplitude,phase,offset):\n return amplitude * np.sin(frequency * (wavelength - phase)) + offset",
"def fit_sinusoids(xdata, ydata, freqs, p0=None, **kwargs):\n def _sin(x, *pars):\n n = len(pars)\n # if n == 1:\n # return pars[-1]\n c = pars[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a specific transformer object from a string. | def retrieve_transformer(
self,
transformation: str = None,
param: dict = {},
df=None,
random_seed: int = 2020,
):
if transformation in (trans_dict.keys()):
return trans_dict[transformation]
elif transformation in list(have_params.keys()):
... | [
"def parse_transform(transform_str):\n if not transform_str:\n return np.identity(3)\n elif not isinstance(transform_str, str):\n raise TypeError('Must provide a string to parse')\n\n total_transform = np.identity(3)\n transform_substrs = transform_str.split(')')[:-1] # Skip the last elem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
r""" nth (non central) moment of the Normal distribution | def moment(self, n, mu, sigma):
return scipy_norm.moment(n, mu, sigma) | [
"def moment(self, n, *args, **kwargs):\n return self.scipy_distribution.moment(n, *args, **kwargs, **self.scipy_distribution_arguments)",
"def blauNormal(blau, N):\n nom = blau - (1/N)\n den = 1 - (1/N)\n\n return nom / den",
"def random_normal():\r\n return inverse_normal_cdf(random.random()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This approach is better than the previous one as it does not use extra space. We keep track of two variables as references, maxlevel and sum. maxLevel refers to the highest level reached so far. sum is the total sum of the right view uptil that level. We traverse right child first, so as we go down the level we obtain ... | def getSum2(root, level=0, maxLevel=None, sum=None):
if root == None:
return 0
if maxLevel == None:
maxLevel = [-1]
sum = [0]
if maxLevel[0] < level:
sum[0] += root.data
maxLevel[0] = level
getSum2(root.right, level+1, maxLevel, sum)
getSum2(r... | [
"def level_with_maximum_sum(root):\n if root is None:\n return\n \n stack = [root]\n level = 1\n \n max_sum = root.data\n max_sum_level = 1\n \n while len(stack):\n current_level_sum = 0\n next_level_nodes = []\n \n for _ in range(len(stack)):\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses joint columns to a more readable format | def parse_columns(self):
self.data['ID'], self.data['SSSSSSSS.mmmuuun'] = self.data['ID SSSSSSSS.mmmuuun'].str.split(' ', 1).str
self.data['SSSSSSSS.mmmuuun'] = self.data['SSSSSSSS.mmmuuun'].astype(str).str.strip() | [
"def parse_columns(self, columns):\n accession = columns[0]\n refseq_category = columns[4]\n # taxid = columns[5]\n # species_taxid = columns[6] # Helps with dog, for example\n organism_name = columns[7]\n assembly_level = columns[11]\n release_type = columns[12]\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds new value to the tree, maintaining BST property. | def add(self, value: object) -> None:
if self.root is None: # If tree is empty
self.root = TreeNode(value)
return
child_node = self.root
parent_node = None
while child_node is not None: # Traversing the tree
parent_node = child_node
... | [
"def add_value(self, value: T) -> None:\n value_node = self.bst_insert(self.root, value)\n if not self.root:\n self.root = value_node",
"def add(self, value):\n if not self.root:\n self.root = Node(value)\n else:\n current = self.root\n while... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns True if value parameter is in the BST or False if it isn't. False is also returned if tree is empty. | def contains(self, value: object) -> bool:
cur = self.root
while cur is not None:
if value == cur.value:
return True
elif value < cur.value:
cur = cur.left
else:
cur = cur.right
return False | [
"def contains(self, value: object) -> bool:\r\n if self.root is None: # Important to first check to see if the tree is completely empty\r\n return False\r\n else:\r\n node = self.root\r\n while node is not None: # Walks all the way down the tree and checking if value... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns value stored in root node. If tree is empty, method should return None. | def get_first(self) -> object:
if self.root is None: # If tree is empty
return None
return self.root.value # Returning root value | [
"def get_root_node_value(self):\n return self.nodes[-1].value",
"def root_value(self):\n return self.__root.get_value()",
"def get_first(self) -> object:\r\n if self.root is None: # If the tree is empty, the first value will be None\r\n return None\r\n else:\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the root node in the tree. Method must return False if the tree is empty and there is no root node to be removed and True if it is removed | def remove_first(self) -> bool:
if self.root is None: # If tree is empty
return False
if self.leaf(self.root): # If root is a lead
self.root = None
return True
if self.root.right is None:
self.root = self.root.left # Case where root ha... | [
"def remove_first(self) -> bool:\n #tree isempty\n if self.root is None:\n return False\n\n #root== leaf\n if self.is_leaf(self.root):\n self.root = None\n return True\n\n #root has!= right tree\n if self.root.right is None:\n sel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks and indicates if tree is full | def is_full(self) -> bool:
if self.root is None: # If tree is empty
return True
if self.root.left is None and self.root.right is None: # If tree has single root node
return True
return self.is_full_helper(self.root) | [
"def is_full(self) -> bool:\n #BST == empty\n if self.root is None:\n return True\n\n #BST == root node\n if self.root.left is None and self.root.right is None:\n return True\n\n #recursive helper\n return self.is_full_helper(self.root)",
"def isComp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines and indicates if tree is complete | def is_complete(self) -> bool:
if self.root is None or self.root.left is None and self.root.right is None:
return True # Empty tree or has one node is considered complete
else: # Creating base index to begin traversal
index = 0
count = self.s... | [
"def isCompleteTree(self, root):\n _, ans, _ = self.dfs(root, 0)\n return ans",
"def is_complete(self) -> bool:\r\n if self.root is None:\r\n return True\r\n queue = Queue()\r\n flag = False # This is a check variable to make sure False is returned to the user if thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines and indicates if tree is perfect | def is_perfect(self) -> bool:
if self.root is None: # If tree is empty
return True
h = self.height()
return self.is_perfect_helper(self.root, 0, h) | [
"def is_perfect(self) -> bool:\r\n if self.root is None or (self.root.left is None and self.root.right is None):\r\n # If the tree is empty or only consists of a root node, then the method returns a True value\r\n return True\r\n count = [0, 0]\r\n node = self.root\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Counts and returns number of leaves that have no children | def count_leaves(self) -> int:
if self.root is None: # If tree is empty
return 0
return self.count_helper(self.root) | [
"def leaf_count(self) -> int:\n if self.children == []:\n return 1\n else:\n return sum([x.leaf_count() for x in self.children])",
"def count_leaves(self):\n if self.is_leaf():\n return 1\n else:\n return sum([b.count_leaves() for b in self.b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate view for showing revision details. Each revision's documents should only be validation policies. | def show(self, revision):
validation_policies = []
tags = collections.OrderedDict()
success_status = 'success'
for vp in [d for d in revision['documents']
if d['schema'].startswith(types.VALIDATION_POLICY_SCHEMA)]:
validation_policy = {}
valida... | [
"def revision(**kwargs):\n d = kwargs.pop('document', None) or document(save=True)\n\n defaults = {'summary': u'đSome summary', 'content': u'đSome content',\n 'significance': SIGNIFICANCES[0][0],\n 'comment': u'đSome comment',\n 'creator': kwargs.get('creator', use... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines the `on_publish` callback implementation. See `paho.mqtt.client.Client.on_publish` for more information. | def on_publish(client: mqtt.Client, userdata: Any, mid: int) -> None:
logging.info(f"Successfully published a message: mid={mid}") | [
"def on_publish(mqttc, obj, mid):\n logger.debug(\"MQTT PUBLISH: mid: \" + str(mid))",
"def pub_callback(self, pub):\r\n self.publish_callback_value = pub",
"def on_publish(self, mqtt_client, userdata, mid):\n logging.debug(\"DEBUG - publish ack received\")",
"def publish(self, node, topic, d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decreases the volume. The volume is decreased by `VOLUME_STEP`, given in the configurations file. | def volume_down(self) -> None:
self.volume = max(self.volume - self.config.volume_step, 0) | [
"def volume_decrease():\n request_command(tv_command=TVCommand.volume_decrease)",
"def decrease_volume(self) -> None:\n for _ in range(10):\n self.media.volume_down()\n self.system.notify(f\"Jarvis::Decreased Volume: {self.media.get_volume()['volume']}%\")",
"def volumeMasterDOWN(sel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the mute status. Returns bool True if mute, False otherwise | def mute(self) -> bool:
return bool(self.audio_mixer.getmute()[0]) | [
"def get_mute(self):\n return on_off_bool(self.get(COMMAND_UIC, 'GetMute')['mute'])",
"def is_muted(self):\n return bool(self.get_info_value(\"B_MUTE\"))",
"def is_volume_muted(self):\n return self._muted",
"def getSafetyMute(self, unitCode=0):\n resp = self.XAPCommand('SFTYMUTE', unit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Toggle play/pause status by simulating a space bar press. | def toggle_pause(self) -> None:
self.keyboard.press(Key.space)
self.keyboard.release(Key.space) | [
"def pause(self):\n if self.status()['state'] == \"playing\":\n self.toggle_pause()",
"def toggle_pause(driver):\n ActionChains(driver) \\\n .key_down('K') \\\n .key_up('K') \\\n .perform()",
"def play(self):\n os.system(\"xdotool key KP_Space\")",
"def pause(self):\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Skip backward. How much the content will be skipped backward is platform dependant (usually 10 seconds). | def skip_backward(self) -> None:
self.keyboard.press(Key.left)
self.keyboard.release(Key.left) | [
"async def skip_backward(self) -> None:\n current_position = (await self.apple_tv.playstatus()).position\n if current_position:\n await self.set_position(current_position - _DEFAULT_SKIP_TIME)",
"async def skip_backward(self) -> None:\n return await self.relay(\"skip_backward\")()"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current status. Returns dict a dictionary containing the current volume/mute status Notes `play/pause` status is not included here because there is no way to actually maintain an always uptodate status. | def status(self) -> dict:
return {"volume": self.volume, "mute": self.mute} | [
"def status(self):\n status = self.interface.get_play_status()\n self.logger.debug(\"Returning play status: \" + str(status))\n return status",
"def get_play_status(self):\n return self.get(COMMAND_UIC, 'GetPlayStatus')",
"def status(self):\n if not self.volume:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Publishes on `MQTT_STATUS_TOPIC` the current status (volume/mute). | def update_status(self) -> None:
try:
(rc, mid) = self.mqttc.publish(
self.config.status_topic, json.dumps(self.status), qos=0, retain=False
)
if rc == mqtt.MQTT_ERR_SUCCESS:
logging.info(
f"The request for a status update h... | [
"def publish_status(client):\n client.publish(config.topic_get, payload=getlight())",
"def status_publish(self, data):\n\n self.m_client.publish(\n self.module_topics[\"statusTopic\"], data)\n \n self.helpers.logger.info(\n \"Published to \" + self.client_type + \" st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts the MQTT client and subscribes to `MQTT_CONTROL_TOPIC` to receive commands. | def start(self) -> None:
# Set logging level
debug_level = logging.DEBUG if self.config.debug else logging.ERROR
logging.basicConfig(
format="[%(asctime)s] %(levelname)-8s %(message)s", level=debug_level
)
try:
# Check if authentication is required for co... | [
"def start(self):\n\n self.m_client = pmqtt.Client(\n client_id=self.client_id, clean_session=True)\n \n self.m_client.will_set(\n self.module_topics[\"statusTopic\"], \"OFFLINE\", 0, False)\n \n if self.mqtt_config[\"security\"]:\n self.m_client.t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stops the MQTT client and disconnects from the broker. | def stop(self) -> None:
self.mqttc.disconnect() | [
"def stop(self):\n\n self.mqtt_client.stop()",
"def stop(self):\n if self._connected:\n self._client.loop_stop()\n self._client.disconnect()\n self._connected = False\n logger.info(\"Connection with MQTT Broker closed.\")",
"def stop_mqtt(self):\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Counts how many letters there are in a certain word, and sums the total amount of letters needed to print all the considered numbers in words. | def numberCounts(limit):
sum = 0
for number in range(1,limit+1):
word = number2text(number)
amount = countLetters(word)
sum = sum + amount
return sum | [
"def letterFreq(words):\n dict = {}\n total = 0\n for word in words:#Iterate through words\n for letter in word:#Increment by letter\n count = 0\n for yearCount in words[word]:\n count += yearCount.count#Increment total instances of word\n total += cou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the SVM classifier. All keyword arguments that are not listed will be forwarded to the underlying classifier. In this case, it is sklearn.SVC. For instance, if you pass an argument ``probability=True``, this will be forwarded to the initialization of SVC. Keyword arguments | def __init__(self, **kwargs):
super(SVM, self).__init__()
# initialize some default values for the SVM backend
self.max_iter = kwargs.pop('max_iter', 1e6)
# parameters for k cross validation / hyper-parameter tuning
self.params = [{
'kernel': ['rbf', 'sigmoid', 'pol... | [
"def setup_svm(self, classifier_name=\"SVM\", **kwargs):\n if not classifier_name in self.classifiers:\n clf = svm.SVC(**kwargs)\n clf.fit(self.X_train, self.y_train)\n self.classifiers[classifier_name] = clf",
"def __init__(self):\n\t\tself.SVM = LinearSVC()",
"def __ini... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize a K Nearest Neighbors (KNN) classifier. All additional keyword arguments will be forwarded to the underlying classifier, which is here ``sklearn.neighbors.KNeighborsClassifier``. Keyword Arguments | def __init__(self, **kwargs):
super(KNN, self).__init__()
self.nneighbors = kwargs.pop('n_neighbors', 5)
self.clf = neighbors.KNeighborsClassifier(n_neighbors=self.nneighbors, **kwargs) | [
"def __init__(self, n_neighbors):\r\n self.n_neighbors = n_neighbors\r\n ImageKNNClassifier.data = []",
"def train_knn(X, y, k, weight):\n knn = KNeighborsClassifier(n_neighbors = k, weights = weight, metric = 'cosine', algorithm = 'brute')\n knn.fit(X, y)\n return knn",
"def train_knn(X,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize a Logistic Regression Classifier. Additional keyword arguments will be passed to the classifier initialization which is ``sklearn.linear_model.LogisticRegression`` here. Keyword Arguments | def __init__(self, **kwargs):
super(LogisticRegression, self).__init__()
self.C = kwargs.pop("C", 100)
self.clf = _LogisticRegression(C=self.C, **kwargs) | [
"def __init__(self, reg_penalty='l2', reg_inv=1.0, k_fold=5, random_state=0):\n print(\"Initialize model Logistic Regression\")\n self.reg_penalty = reg_penalty\n self.reg_inv = reg_inv\n self.k_fold = k_fold\n self.random_state = random_state\n self.model = sklearn.linear_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This 'initializes' an MLP Classifier. If no further keyword arguments are passed, the initializer is not fully created and the MLP will only be constructed during `run`. If, however, the hidden layer size is specified, the MLP will be constructed fully. Keyword Arguments | def __init__(self, **kwargs):
super(MLP, self).__init__()
# TODO: why lbfgs and not adam?
self.solver = kwargs.pop('solver', 'lbfgs')
self.alpha = kwargs.pop('alpha', 1e-5)
self.random_state = kwargs.pop('random_state', 1)
# determine if the MLP can be initialized or n... | [
"def __init__(self, hidden_layer_sizes, activation='relu', reg=0.001, k_fold=5, random_state=0):\n print(\"Initialize model Multi-layer Perceptron\")\n self.hidden_layer_sizes = hidden_layer_sizes\n self.activation = activation\n self.reg = reg\n self.k_fold = k_fold\n self... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a ShrinkingLDA classifier. Additional arguments will be forwarded to the underlying classifier instantiation, which is ``sklearn.discriminant_analysis.LinearDiscriminantAnalysis`` here. Keyword Arguments | def __init__(self, **kwargs):
super(ShrinkingLDA, self).__init__()
self.solver = kwargs.pop('solver', 'lsqr')
self.shrinkage = kwargs.pop('shrinkage', 'auto')
self.clf = _LinearDiscriminantAnalysis(solver=self.solver, shrinkage=self.shrinkage, **kwargs) | [
"def _init_lda(self):\n if False: #os.path.exists(self.MODEL_PATH):\n self.lda = gensim.models.ldamodel.LdaModel.load(self.MODEL_PATH)\n else:\n # chunksize determines the number of documents to be processed in a worker.\n self.lda = gensim.models.ldamodel.LdaModel(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the list of spans and predicted antecedent indices into clusters of spans for each element in the batch. | def decode(self, output_dict: Dict[str, torch.Tensor]):
# A tensor of shape (batch_size, num_spans_to_keep, 2), representing
# the start and end indices of each span.
batch_top_spans = output_dict["top_spans"].detach().cpu()
# A tensor of shape (batch_size, num_spans_to_keep) represent... | [
"def predict(self,\n doc: Doc,\n words: torch.Tensor,\n clusters: List[List[int]]) -> List[List[Span]]:\n if not clusters:\n return []\n\n heads_ids = torch.tensor(\n sorted(i for cluster in clusters for i in cluster),\n dev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method generates possible antecedents per span which survived the pruning stage. This procedure is `generic across the batch`. The reason this is the case is that each span in a batch can be coreferent with any previous span, but here we are computing the possible `indices` of these spans. So, regardless of the ba... | def _generate_valid_antecedents(num_spans_to_keep: int,
max_antecedents: int,
device: int) -> Tuple[torch.IntTensor,
torch.IntTensor,
... | [
"def _compute_antecedent_gold_labels(top_span_labels: torch.IntTensor,\n antecedent_labels: torch.IntTensor):\n # Shape: (batch_size, num_spans_to_keep, max_antecedents)\n target_labels = top_span_labels.expand_as(antecedent_labels)\n same_cluster_indicato... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes an embedding representation of pairs of spans for the pairwise scoring function to consider. This includes both the original span representations, the elementwise similarity of the span representations, and an embedding representation of the distance between the two spans. | def _compute_span_pair_embeddings(self,
top_span_embeddings: torch.FloatTensor,
antecedent_embeddings: torch.FloatTensor,
antecedent_offsets: torch.FloatTensor):
# Shape: (batch_size, num_spans_to_k... | [
"def _pairwise_distance(self, src_embeds, vocab_embeds, squared=False):\n # compute square norm to avoid compute all the directions\n vocab_sq_norm = vocab_embeds.norm(p=2, dim=-1) ** 2\n src_sq_norm = src_embeds.norm(p=2, dim=-1) ** 2\n\n # dot product\n dot_product = self._pairw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use CheckWitness to check matching of caller and entity authorized to the registered inheritage. | def authorization_check(input_inheritage_datum):
legal_entity = Get(GetContext, input_inheritage_datum)
legal_entity_is_authorized = CheckWitness(legal_entity) # Boolean
if legal_entity_is_authorized:
print('Authorization confirmed.')
else:
print('Authorization failed.')
... | [
"def Main(operation, args):\n\n caller = args[0] # used with CheckWitness below to conform authorization\n caller_is_authorized = CheckWitness(caller) # Boolean\n\n if not caller_is_authorized:\n print('Action denied.')\n return False\n\n print('Action granted.')\n \n input_inheritag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calling the Main function of this NEO smart contract enables registering a last will or inheritage datum. It also allows to set heirs and transfers of inheritage, which works exactly like the NEO licensing contracts. | def Main(operation, args):
caller = args[0] # used with CheckWitness below to conform authorization
caller_is_authorized = CheckWitness(caller) # Boolean
if not caller_is_authorized:
print('Action denied.')
return False
print('Action granted.')
input_inheritage_datum = args[1... | [
"def m_create_test_identities():\n\n # Get the ROOT account (it was created in the deployment of the Smart Contracts)\n ROOT_address, ROOT_key = wallet.account_from_name(\"ROOT\", \"ThePassword\")\n\n # Create the Alastria account for node \"ala\"\n print(f\"\\n==> Creating the Alastria account\")\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads and stores the actual data and info about it. crop shape to crop this to (if you want to try algorithm a lot, make dataset smaller to reduce time) usepickled when true, do not load original data, instead take previously loaded+preprocessed pickled data upsample whether to upsample the data according to informatio... | def __init__(self,datafile,crop=False,usepickled=True,upsample=None,medianfilt=False,remove_rohr=False,dtype=None):
if not isinstance(datafile,str) and not isinstance(datafile, unicode):
self.D = datafile
return
self.info = WurzelInfo(datafile)
info = self.info
tr... | [
"def load_cleaned_data(self):\n try:\n self.train = pd.read_pickle('../input/train_clean.pkl')\n self.test = pd.read_pickle('../input/test_clean.pkl')\n except FileNotFoundError:\n self.load_raw_data()",
"def _load_processed_data(self, picklename: str) -> None:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
save a pickle, and an upsampled.dat raw data file | def save(self, datafile):
with open(datafile,"wb") as f:
cPickle.dump(self.D, f, cPickle.HIGHEST_PROTOCOL)
upsname = datafile.replace(".pickle",".dat")
print "Saving to upsampled: ", self.D.shape
self.D.tofile(upsname) | [
"def pickle(self,data,filename):\n pickle.dump(data, open(filename, 'wb'))",
"def pickle_dump(self, data):\n \n os.write(self.wpipe, pickle.dumps(data, bin=True))",
"def pickleSave(file, data):\n output = open(file, 'w')\n cPickle.dump(data, output)\n output.close()",
"def pickle... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
run regression tests for all supported backends This task runs HTSQL regression tests on all combinations of client and server platforms. | def CHECK_ALL():
vms = [py26_vm, py27_vm, pgsql84_vm, pgsql90_vm, pgsql91_vm,
mysql51_vm, oracle10g_vm, mssql2005_vm, mssql2008_vm]
for vm in vms:
if vm.missing():
warn("VM is not built: {}", vm.name)
for vm in vms:
if vm.running():
vm.stop()
errors = 0... | [
"def run_all_tests():\n remove_dbs()\n run_training_tests()\n run_custom_training_tests()\n run_training_save_tests()\n run_validation_tests()\n run_feature_extraction_tests()",
"def test_techsupport(request, config, duthosts, enum_rand_one_per_hwsku_frontend_hostname):\n duthost = duthosts[e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
chooses n labeled indices to labeled returns of new elemnts labelled | def label_n_elements(self, n_elements: int, **kwargs) -> int:
# labels
assert Exception("not implemented") | [
"def exhaustive(n_labels):\n return np.array(list(itertools.product([0, 1], repeat=n_labels)))",
"def gen_labels(self, nidxs=None, condense_labels=False):\n\n if nidxs is None:\n nidxs = self.nidx_train\n\n y = []\n\n for r in nidxs:\n y.append(self.node_labels[r])\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Requires the intial meter reading and an intial date in a YYYYMMDD string format. | def __init__(self,initial_meter_reading, initial_date):
self.initial_meter_reading = initial_meter_reading
self.initial_date = initial_date
self.total_units_consumed = 0
self.total_amount_spent = 0 | [
"def test_init_reading_date(self):\n reading = EnergyReading(self.energy_reading)\n assert reading.reading_date == datetime.datetime(2017, 3, 28, 0, 0)",
"def ask_beginning_date(self):\n return super().ask_for_date(\n \"Entrez l'année de début sous ce format yyyy : \",\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds units and amount values. | def add_tokens(self, units, amount):
self.total_units_consumed+= units
self.total_amount_spent+= amount
formatted_units= format(self.total_units_consumed, ".2f")
print(f"\nAdded {units}.\nTotal units bought {formatted_units}") | [
"def _add_amount(self, deets, amounts):\n deets['amount'] = amounts\n deets['caucus'] = amounts",
"def _increment_quantity(self, units):\n self.quantity += units",
"def add_amount(quantity, unit, to_quantity, to_unit):\n return quantity + convert_amount(to_quantity, to_unit, unit)",
"d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Append a single version to leafjson | def add_version_to_leafjson(self, fpath, dist, leafname,
indexjson="index.json"):
leafdir = self.path / leafname
leafjson = leafdir / indexjson
with self.lock_leaf_json(leafname, leafjson) as leafdata:
if fpath.name in set([x['filename'] for x in leafd... | [
"def add_revision(self, revision):",
"def _update_version_in_json_manifest(content, new_version_number):\n updated = json.loads(content)\n if 'version' in updated:\n updated['version'] = new_version_number\n return json.dumps(updated)",
"def add(self, bento_name, bento_version):",
"def _bump_v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function takes a list of cities and returns a list of cities in three dimensions, with all having the same euclidean length. | def _add_weighting_dimension(self, cities):
sqrd_val = lambda x: pow(x[0],2) + pow(x[1],2)
farthest = max(map(sqrd_val, cities))
res = []
for x in cities:
res.append((x[0], x[1], numpy.sqrt(farthest - sqrd_val(x))))
return res | [
"def distance_matrix(cities):\n\n return [[city1.distance(city2) for city2 in cities]\n for city1 in cities]",
"def normalise_coords(cities: list[tuple[float, float]], height: int, width: int, border: int) -> list[tuple[int, int]]:\n xs = [c[0] for c in cities]\n ys = [c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load main page which has an overview of all animal classes | def showAnimalClasses():
animal_classes = session.query(AnimalClasses)
animal_families = session.query(ClassFamilies).join(AnimalClasses).all()
try:
return (render_template('animalClasses.html',
animal_classes=animal_classes,
user_name=login_session['username'],
... | [
"def view_animal(self):\n self._view_animal()",
"def get(self):\n # Get list of saved classifiers.\n conn = ds.create_sqlite_connection()\n classifiers = ds.fetch_all_classifiers(conn)\n\n # Render the web page.\n template = JINJA_ENVIRONMENT.get_template('classifydata.ht... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
an inquiry over the unique values of self. | def unique_values(self):
return DiscoDBInquiry(super(DiscoDB, self).unique_values) | [
"def apply_uniques(self):\n if not np.all(self.data.unique() == self.unique_values):\n for value in self.data.unique():\n if value not in self.unique_values:\n self.data = self.data[self.data != value]",
"def apply_uniques(self):\n if not np.all(self.data... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Multicomponent twobody force/force kernel accelerated with Numba's njit decorator. Loops over bonds in two environments and adds to the kernel if bonds are of the same type. | def two_body_mc_jit(bond_array_1, c1, etypes1, bond_array_2, c2, etypes2,
d1, d2, sig, ls, r_cut, cutoff_func,
nspec, spec_mask, bond_mask):
kern = 0
ls1 = 1 / (2 * ls * ls)
ls2 = 1 / (ls * ls)
ls3 = ls2 * ls2
sig2 = sig * sig
bc1 = spec_mask[c1]
bc... | [
"def trigger_numba_compilation():\n parameters = {\n \"size\": 1,\n \"gap_open_penalty\": 0.0,\n \"gap_extend_penalty\": 0.0,\n \"gamma\": 0.03,\n }\n coords_1 = np.zeros((2, 3))\n coords_2 = np.zeros((2, 3))\n tm_score(coords_1, coords_2, 2, 2)\n weights_1 = np.zeros((... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse timestamp to get date, hour, minute info, along with extra information which either records a change in state (asleep or awake). | def getinfo(timestamp):
datetime, message = timestamp.split(']')
date, time = datetime.split()
date = date.strip('[')
hour, minute = time.split(':')
message = message.split()
extra = message[1] # either 'asleep', 'up', or '#XXX'
return date, int(hour), int(minute), extra | [
"def extract(self, timestamp):\n if not isinstance(timestamp, (str, int)):\n raise TypeError('\"{}\" is not str or int type'.format(type(timestamp)))\n elif isinstance(timestamp, str) and not Timestamp.verify(timestamp):\n raise ValueError('\"{}\" is not a valid timestamp'.format... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the number of points/rows in the data set. | def get_num_points(self):
dimensions = self.data.shape
return dimensions[0] | [
"def n_points(self):\n return len(self.df)",
"def __rows_count(self):\r\n\r\n return len(self.X.index)",
"def n_points(self):\n\n if self.data_reduced:\n return len(self.data_reduced[0])\n else:\n return 0",
"def data_count(self):\r\n\r\n shp = self.df.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns a copy of the eigenvectors as a numpy matrix with the eigenvectors as rows. | def get_eigenvectors(self):
return self.eigenVectors | [
"def GetEigenvectors(self):\n\t\treturn self.Solver.GetEigenvectors()",
"def numpy_eigenvectors(A):\n import numpy\n A = numpy.array(A)\n E, V = numpy.linalg.eigenvectors(A)\n import Numeric\n E = Numeric.array(E)\n V = Nume... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ghost objects are objects who arent really parents of there children this is actually affected by figma node objects like GROUPS children of GROUP nodes are not positioned relative to itself. | def is_ghost(self):
return False | [
"def fill_octree(self):\n if len(self.children) <= 0:\n self.generate_octants()\n for point in self.points:\n self.append_point(point)\n self.points = np.array([])",
"def is_ghost(self):\n return self._is_ghost",
"def is_ghost(self, is_ghost):\n\n self._i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Continuously checks for response messages and processes them if found. | def _run(self):
self.running = True
while self.running:
try:
print "Response monitor running..."
# Get the message count
messageCount = self.scHandle.amazonSQSManager.getQueueCount(self.scHandle.amazonSQSManager.responsesQueue)
... | [
"def process_responses(response_queue, connection, stop_event):\n while not stop_event.is_set():\n try:\n resp = response_queue.get(timeout=1)\n except queue.Empty:\n continue\n for line in resp:\n if resp.response_type == plugins.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Predict the output measures using 30 individually trained neural nets. | def predict_30_single_nets(input_data=rand_input, nets=nets):
predicted = np.zeros((input_data.shape[0], 30))
for i in nets.keys():
predicted[:, i] = nets[i].predict(input_data).ravel()
return y_scaler.inverse_transform(predicted) | [
"def nnPredict(w1,w2,data):\n #################################################################################\n # added by: Zulkar\n # add bias 1 at (d+1) position of each data point\n number_of_training_data = data.shape[0]\n dimension_of_training_data = data.shape[1]\n\n # bias node is added t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the arguments from a random row of ligpy_args to pass to predict_ligpy. Returns end_time output_time_step cool_time initial_T heat_rate maximum_T plant | def get_random_ligpy_args():
rand_index = np.random.randint(0, 249999)
args = ligpy_args[rand_index]
end_time = float(args.split(' ')[0])
output_time_step = float(args.split(' ')[1])
cool_time = int(args.split(' ')[2])
initial_T = float(args.split(' ')[3])
heat_rate = float(args.split(' ')[4... | [
"def setup_predict_ligpy(end_time=end_time, output_time_step=output_time_step,\n cool_time=cool_time, initial_T=initial_T,\n heat_rate=heat_rate, maximum_T=maximum_T, plant=plant):\n call('cp ligpy_benchmarking_files/sa_compositionlist.dat '\n '../../../ligpy/ligpy/data/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the proper environment to run predict_ligpy() and set up the kinetic model. | def setup_predict_ligpy(end_time=end_time, output_time_step=output_time_step,
cool_time=cool_time, initial_T=initial_T,
heat_rate=heat_rate, maximum_T=maximum_T, plant=plant):
call('cp ligpy_benchmarking_files/sa_compositionlist.dat '
'../../../ligpy/ligpy/data/compositi... | [
"def initialize():\n\n # Requirements for Model 1\n # Files loaded: \n # 1. Word2Vec model trained on complete dataset\n # 2. Glove model: Pretrained Vectors loaded\n # 3. Scaler: for scaling new input\n # 4. Keras Model: Final model for prediction\n\n nltk.download('wordnet')\n w2vec_model_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clean up after running predict_ligpy(). | def teardown_predict_ligpy():
call('rm -rf bsub.c bsub.o ddat.in fort.11 f.out greg10.in jacobian.c '
'jacobian.o model.c model.o net_rates.def parest rates.def '
'results_dir/', shell=True) | [
"def _untrain(self):\n if self.__clf:\n self.__clf._untrain()",
"def _reset(self):\n self.classifier.reset()",
"def cleanup(self):\n try:\n stop_matlab(self.screen_session, self.mlengine,\n self.mlsession)\n except SystemError as e: # pra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Joins given arguments into an url and add trailing slash | def join_url(*args): # type: (*str) -> str
parts = [part[:-1] if part and part[-1] == '/' else part for part in args]
parts.append('')
return '/'.join(parts) | [
"def _urljoin(self, *args):\r\n\t\treturn \"/\".join(map(lambda x: str(x).rstrip('/'), args))",
"def _make_url(arg_list):\n\tpath = '/'\n\tfor elt in arg_list:\n\t\tpath += str(elt)+'/'\n\treturn path",
"def uri_join(*args):\n return('/'.join(args))",
"def _join_url_dir(cls, url, *args):\n for path ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List of versions for given component with required spec | def versions(self, component_name, spec='*'):
component_name = component_name.lower()
body = self._base_request(
'get',
['components', component_name],
schema=COMPONENT_SCHEMA,
)
return tools.manifest.ComponentWithVersions(
name=component_... | [
"def spec_versions(self, spec):\n spec = specify(spec)\n msg = \"Internal Error: spec with no name occured. Please report to the spack maintainers.\"\n assert spec.name, msg\n\n if spec.concrete:\n return [fn.version(spec.name, spec.version)]\n\n if spec.versions == spa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Manifest for given version of component, if version is None most recent version returned | def component(self, component_name, version=None):
response = self._base_request(
'get',
['components', component_name.lower()],
schema=COMPONENT_SCHEMA,
)
versions = response['versions']
if version:
requested_version = tools.manifest.Comp... | [
"def get_version_manifest(name):\n manifest_vs = _get_versions_manifest()\n for x in manifest_vs:\n if x[\"program\"] == name:\n return x.get(\"version\", \"\")\n return \"\"",
"def get_version_meta(version, verbose):\n if version == \"20w14~\":\n # April fools snapshot, label... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extract features or diseases and genes of interest from MME request object If the record contains feature(s) with is_observed=True will we will send those to owlsim, otherwise we will the disease(s) of interest, if there are no diseases, will send and gene(s) of interest to owlsim. Essentially the goal is to send the s... | def extract_features_from_mme(patient: MmeRequest) -> List:
features = [clean_feature_ids(feature.id) for feature in patient.features if feature.observed == Observed.yes]
diseases = [clean_feature_ids(disease.id) for disease in patient.disorders]
genes = [clean_feature_ids(genomic_feature.gene.id) for genom... | [
"def mutual_information_estimate(self, approx_prob=False):\n \n # this might be not the right approach\n q_n = self.receptor_activity_estimate(approx_prob=approx_prob)\n q_nm = self.receptor_crosstalk_estimate(approx_prob=approx_prob)\n \n # calculate the approximate ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update the main html page (replacing updated date) | def update_main_page():
line = house_keeping + '/acis_gain.html'
text = open(line, 'r').read()
today = tcnv. currentTime('Display')
text = text.replace('#DATE#', today)
file = web_dir + '/acis_gain.html'
fo = open(file, 'w')
fo.write(text)
fo.close() | [
"def update_main_html():\n today = time.strftime('%m:%d:%Y', time.gmtime())\n atemp = re.split(':', today)\n tyear = int(float(atemp[2]))\n mon = int(float(atemp[0]))\n day = int(float(atemp[1]))\n#\n#--- display date\n#\n cmon = mcf.change_month_format(mon)\n today = cmon + ' ' + mcf.add_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the indexed pairs file, which has two more columns than the input pairs file corresponding to the restriction fragment index of each read. Note that pairs files have 1bp point positions whereas restriction table has 0bp point poisitions. | def attribute_fragments(pairs_file, idx_pairs_file, restriction_table):
# NOTE: Bottlenecks here are 1. binary search in find_frag and 2. writerow
# 1. could be reduced by searching groups of N frags in parallel and 2. by
# writing N frags simultaneously using a single call of writerows.
# Parse and u... | [
"def WritePairsFile( set_of_pairs, output_name ):\n result = open(output_name, \"wt\")\n for pair in set_of_pairs:\n result.write(\"%s:%s %s:%s\\n\" % (pair[0][0], pair[0][1], pair[1][0],\n pair[1][1]))\n result.close()",
"def get_pairs_file(missed_pair_file):\n handle = open(missed_pair_file)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the restriction table for a single genomic sequence. | def get_restriction_table(seq, enzyme, circular=False):
chrom_len = len(seq)
wrong_enzyme = "{} is not a valid restriction enzyme.".format(enzyme)
# Restriction batch containing the restriction enzyme
try:
enz = [enzyme] if isinstance(enzyme, str) else enzyme
cutter = RestrictionBatch(en... | [
"def restriction(self):\n return self.__restriction",
"def getDelayTable(self, gate):\n table = [[float('inf') for i in range(self._grid.getHeight())] for j in range(self._grid.getWidth())]\n for loc in self._delayTables[gate].keys():\n table[loc[0]][loc[1]] = self._delayTables[gat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use binary search to find the index of a chromosome restriction fragment corresponding to an input genomic position. | def find_frag(pos, r_sites):
if r_sites[0] != 0:
raise ValueError(
"The first position in the restriction table is not 0."
)
if pos > r_sites[-1]:
raise ValueError(
"Read position is larger than last entry in restriction table."
)
# binary search for t... | [
"def find(self, subseq):\n\n global_index = cyclic_find(subseq, self._alphabet, self._n)\n remaining_index = global_index\n for chunk_idx in range(len(self._chunks)):\n chunk = self._chunks[chunk_idx]\n if remaining_index < chunk:\n return (global_index, chu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
logs summary statistics of fragment length distribution based on an input fragment file. Can optionally show a histogram instead of text summary. | def frag_len(
frags_file_name=DEFAULT_FRAGMENTS_LIST_FILE_NAME,
output_dir=None,
plot=False,
fig_path=None,
):
try:
frag_list_path = os.path.join(output_dir, frags_file_name)
except TypeError:
frag_list_path = frags_file_name
frags = pd.read_csv(frag_list_path, sep="\t")
... | [
"def cli_text_histogram(logy, max_pos, bin_width, graph_width, input_file):\n values = []\n for line in input_file:\n try:\n values.append(float(line.strip()))\n except ValueError:\n click.echo(f'Warning: \"{line.strip()}\" could not be parsed', err=True)\n click.echo(te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a regex which corresponds to all possible religation sites given a set of enzyme. | def gen_enzyme_religation_regex(enzyme):
# Split the str on the comma to separate the different enzymes.
enzyme = enzyme.split(",")
# Check on Biopython dictionnary the enzyme.
rb = RestrictionBatch(enzyme)
# Initiation:
give_list = []
accept_list = []
ligation_list = []
# Iterat... | [
"def get_dishes_regex(self):\n dishes_regex = self.get_dishes()\n\n for i in xrange(len(dishes_regex)):\n dishes_regex[i] = dishes_regex[i].replace(\"-\",\"\\-\").encode('utf-8').lower()\n dishes_regex[i] = re.sub(\"\\&|\\.|\\(.*\\)|[0-9]|([0-9]*-[0-9])+|oz\",\"\",dishes_regex[i]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtain a datapoint and event ingest client. | def ingest(self, token, endpoint=None, timeout=None, compress=None):
from . import ingest
if ingest.sf_pbuf:
client = ingest.ProtoBufSignalFxIngestClient
else:
_logger.warn('Protocol Buffers not installed properly; '
'falling back to JSON.')
... | [
"def _create_signalfx_ingest(self):\n ingest = None\n try:\n client = signalfx.SignalFx()\n ingest = client.ingest(self._ingest_token, endpoint=self._ingest_endpoint,\n timeout=self._ingest_timeout)\n except Exception as e:\n se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new replicapoolupdater handle. | def __init__(self, url='', credentials=None,
get_credentials=True, http=None, model=None,
log_request=False, log_response=False,
credentials_args=None, default_global_params=None,
additional_http_headers=None):
url = url or u'https://www.googleapis.com/rep... | [
"def __create_new_pool_resource(self):\n\n if self.__cloning:\n resource = deepcopy(self.__reserved_resource)\n else:\n resource = self.klass()\n return resource",
"def do_instance_alloc(self, component_handle, tasklet_info, instance_url):\n logger.debug(\"Rwdtsta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called on the particular Update endpoint. Rolls forward the update in state from { ROLLING_FORWARD, ROLLING_BACK, PAUSED }. Noop if invoked in state ROLLED_OUT. | def Rollforward(self, request, global_params=None):
config = self.GetMethodConfig('Rollforward')
return self._RunMethod(
config, request, global_params=global_params) | [
"def advance_rollout(\n self,\n ) -> Callable[\n [cloud_deploy.AdvanceRolloutRequest], cloud_deploy.AdvanceRolloutResponse\n ]:\n # Generate a \"stub function\" on-the-fly which will actually make\n # the request.\n # gRPC handles serialization and deserialization, so we jus... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wraps a method to catch exceptions related to servers. This decorator wraps a method to catch any exceptions having to do with a server that may get thrown. It then logs a server fault in the db. | def wrap_server_fault(function):
@functools.wraps(function)
def decorated_function(self, context, *args, **kwargs):
try:
return function(self, context, *args, **kwargs)
except exception.ServerNotFound:
raise
except Exception as e:
kwargs.update(dict(z... | [
"def _CatchExceptionDecorator(method):\n @functools.wraps(method)\n def Wrap(*args, **kwargs):\n try:\n return method(*args, **kwargs)\n except Exception:\n logging.warning(\n '%s Exception: %s.', name,\n '\\n'.join(traceback.format_exception_only(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Align server power state between the database and hypervisor. If the server is not found on the hypervisor, but is in the database, then a stop() API will be called on the server. | def _sync_server_power_state(self, context, db_server,
node_power_state):
# We re-query the DB to get the latest server info to minimize
# (not eliminate) race condition.
db_server.refresh()
db_power_state = db_server.power_state
if db_server.st... | [
"def _sync_instance_power_state(self, context, db_instance, vm_power_state,\n use_slave=False):\n\n # We re-query the DB to get the latest instance info to minimize\n # (not eliminate) race condition.\n db_instance.refresh(use_slave=use_slave)\n db_power... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Align maintenance states between the database and the hypervisor. | def _sync_maintenance_states(self, context):
try:
nodes = self.driver.get_maintenance_node_list()
except Exception as e:
LOG.warning(
"Failed to retrieve node list when synchronizing "
"maintenance states: %(msg)s" % {"msg": e})
# Just... | [
"def prepare_shards_maintenance(self):\n errors = Queue.Queue()\n threads = []\n for shard in self.shards:\n t = threading.Thread(target=shard.prepare_maintenance, args=(errors,))\n threads.append(t)\n if self.config_server is not None:\n t = threading.Th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set power state for the specified server. | def set_power_state(self, context, server, state):
fsm = utils.get_state_machine(start_state=server.status)
@utils.synchronized(server.uuid)
def do_set_power_state():
LOG.debug('Power %(state)s called for server %(server)s',
{'state': state,
... | [
"def set_power(self, on_off):\n state = {\n 'power': on_off\n }\n return self.set_state(state)",
"def set_power_state(self, node, power_state):",
"def set_power(self, uuid, power):\n return request(API_LIST.SERVER_SET_POWER.value, {\n 'email': self.email,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform rebuild action on the specified server. | def _rebuild_server(self, context, server, preserve_ephemeral):
self.driver.rebuild(context, server, preserve_ephemeral) | [
"def rebuild_server(self, server_id):\n response = self._api_request(\n endpoint='application/servers/{}/rebuild'.format(server_id),\n mode='POST')\n return response",
"def rebuild_server(self, server_id, image_ref, **kwargs):\n kwargs['imageRef'] = image_ref\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extract event and time relations | def event_time_relations(self):
caption = 'event-time relations in %s' % self.partition
for xmi_path in tqdm(self.xmi_paths, desc=caption):
# does this xmi belong to the sought partition?
xmi_file_name = xmi_path.split('/')[-1]
id = int(xmi_file_name.split('_')[0][-3:])
if id % 8 not i... | [
"def find_surrounding_events(events, time):\n for x, y in zip(events, events[1:]):\n if x.time.tt < time.tt < y.time.tt:\n return x, y",
"def events_info(request):\n \n global input\n \n if request == 'event-based':\n client_neries = Client_neries()\n \n event... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load VEGA spectrum once here to be used later. | def test_load_vspec():
global _vspec
_vspec = SourceSpectrum.from_vega() | [
"def spectrum_inst():\n spectrum_file = file_ref(\"binary.vot\")\n return analyzer.Spectrum.read_spectrum(spectrum_file)",
"def vega(spectrum, band, path, hlineinter, telluric_shift_scale_record, log, over, airmass=1.0):\n if band=='K':\n ext = '1'\n sample = \"21537:21778\"\n scale ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Powerlaw in one flux unit might not be powerlaw anymore in another, so we cannot convert flux unit of analytical integration easily. | def test_integrate_wontfix(self):
ans_flam = 8.8608168e-09 * (u.erg / (u.cm * u.cm * u.s))
assert_quantity_allclose(
self.sp.integrate(wavelengths=self.w, flux_unit='flam',
integration_type='analytical'), ans_flam) | [
"def test_powerlaw_energy_flux():\n e1 = Quantity(1, 'TeV')\n e2 = Quantity(10, 'TeV')\n e = Quantity(1, 'TeV')\n g = 2.3\n I = Quantity(1E-12, 'cm-2 s-1')\n\n val = power_law_energy_flux(I=I, g=g, e=e, e1=e1, e2=e2)\n ref = Quantity(2.1615219876151536e-12, 'TeV cm-2 s-1')\n assert_quantity_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test redshift behavior that conserves flux. | def test_conserve_flux_redshift(self):
sp = SourceSpectrum(self.sp_z0.model, z=1.3, z_type='conserve_flux')
fac = 1 / (1 + sp.z)
wave = [5000, 11500]
assert_quantity_allclose(sp(wave), self.sp(wave) * fac)
assert_quantity_allclose(sp.integrate(), self.sp_z0.integrate()) | [
"def test_reactor(self):\n self.assertIdentical(self.tx_client._reactor, self.reactor)",
"def test_interaction(self):\n cs = settings.Settings()\n _o, r = test_reactors.loadTestReactor()\n gfi = MockGlobalFluxInterface(r, cs)\n gfi.interactBOC()\n gfi.interactEveryNode(0,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a panel of plots (bare spectra, bare wavefunctions, dressed spectrum, nphoton qubit transitions, chi). | def plot_explorer_panels(self, param_val, photonnumber, initial_index, final_index, qbt_index, osc_index):
def fig_ax(index):
return fig, axes_list_flattened[index]
param_index = np.searchsorted(self.param_vals, param_val)
param_val = self.param_vals[param_index]
initial_ba... | [
"def plots():\n out = interactive_output(generate_plots, {'gsize':gridSlider, 'ra':RABox, 'ra':RASlider, 'dec':DECBox, 'dec':DECSlider, 'ang':radBox, 'ang':radSlider, 'style':hexDrop})\n return display(widgrid, out)",
"def plot_multipanel(self, nophase=False, letter_labels=True):\n\n if nophase:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |