ngram
listlengths
0
82k
[ "select, MetaData,\\ update, delete, insert, extract, union, func, PrimaryKeyConstraint, \\", "update( table1, values=dict(name='foo')).returning(table1.c.myid, table1.c.name) self.assert_compile(u, 'UPDATE mytable SET name=:name OUTPUT", "(\"*\", \"mssql\"): self.assert_compile( t.insert(). values(somecolumn=\...
[ "of a current lease. :param pulumi.Input[int] lease_duration_seconds: leaseDurationSeconds is a", "lease_duration_seconds is not None: pulumi.set(__self__, \"lease_duration_seconds\", lease_duration_seconds) if lease_transitions is", "renew_time(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, \"rene...
[ "thisFont.selectedFontMaster.id # active master listOfSelectedLayers = thisFont.selectedLayers # active layers", "advance = 0.0 for thisComponent in thisLayer.components: thisComponent.position = NSPoint(", "advance += thisComponent.component.layers[thisFontMasterID].width thisLayer.width = advance thisFont.dis...
[ "int size, ready for drawing. \"\"\" top = tk.Tk() top.minsize(width=width", "w.create_text(0, 0, text='SC101', anchor=tk.NW, font='times 80') tk.mainloop() #告訴電腦不要關掉視窗 if __name__", "TK Drawing Lecture Exercises Courtesy of <NAME> \"\"\" import tkinter", "complete def make_canvas(width, height): \"\"\" Creat...
[ "[default: 9002]', default=9002) parser.add_argument('-device', type=str, help='audio device [default: \\'sysdefault\\']', default='sysdefault')", "cachefile = 'cache'+str(self.idcache) self.idcache = (self.idcache+1)%10 tmpfile = \"/tmp/cache.wav\" ofile", "None asr_server = None def TTS_callback(in_data, fram...
[ "C]): the `T` video frames audio(Tensor[K, L]): the audio frames,", "from .utils import list_dir from .folder import make_dataset from .vision", "for i in range(len(classes))} self.samples = make_dataset(self.root, class_to_idx, extensions, is_valid_file=None)", "to handle clip creation. Args: root (string): ...
[ ".html only self.out_suffix = '.html' # self.config.html_style = 'traditional.css' def", "item = u' ' * 4 * indentlevel + item", "+ '</section>') elif isinstance(node, nodes.list_item): for subnode in node: parts.extend(self.write_toc(subnode,", "= False supported_image_types = ['image/svg+xml', 'image/png', ...
[ "list displayed on gui ScienceDirect \"\"\" titles = [] urls", "properly if offset == 0: # if on page 1,", "elems def clean(elems): \"\"\" This method takes a list of", "after content is saved, go to the next year break", "def write_urls(urls,titles,file,journal,year): \"\"\" This method takes a list of url...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "Any] Granularity = Union[str, Dict[str, Union[str, float]]] AdhocMetric = Dict[str,", "= Union[List[DbapiDescriptionRow], Tuple[DbapiDescriptionRow, ...]] DbapiResult = Sequence[Union[List[Any], Tuple[Any, ...]]] FilterValu...
[ "\"python_compiler\": platform.python_compiler(), \"python_implementation\": platform.python_implementation(), \"python_version\": platform.python_version(), \"release\": platform.release(), \"system\": platform.system(),", "dev in usb.core.find(find_all=True): yield { \"port\": dev.port_number, \"vendor_id\": fo...
[ "check_output, CalledProcessError from shutil import copyfile from os import remove,", "self.original + \"_temp\" cmd = [ self.xdelta_path, '-f', '-d', '-s',", "creating xdelta patches. \"\"\" import logging from subprocess import check_output,", "except CalledProcessError: raise PatchChecksumError('Target fi...
[ "distance = self.rotors[2].get_distance(char) word += self.rotors[i % 2].rotate((i + 1)", "Phrase: phrase to encrypt/decrypt\\n\" + \"-d/--decrypt: enables decrypt default is", "\"--help\"): print_help() sys.exit() elif opt in (\"-k\", \"--key\"): key =", "elif opt == \"--r3\": rotors[2] = arg if not key", ...
[ "ord=2) ** 2 lc = np.zeros(n_groups) for g in range(n_groups):", "grp_size) R[:] = y - X @ w elif algo", "t_start = time.time() for it in range(max_iter): if it %", "bcd=lambda: _range, bcdshuf=lambda: np.random.choice(n_groups, n_groups, replace=False), rbcd=lambda: np.random.choice(n_groups, n_groups, repla...
[ "et. al, 2019. See https://arxiv.org/abs/1907.11932 and https://github.com/jind11/TextFooler. \"\"\" import numpy", "is a reimplementation of the search method from the paper:", "\"\"\" def __init__(self, wir_method=\"unk\"): self.wir_method = wir_method def _get_index_order(self, initial_text):", "max_simila...
[ "on a given endpoint. :param endpoint: :param new_cert: :return: \"\"\"", "that certificate is available for rotation endpoint.source.plugin.update_endpoint(endpoint, new_cert) endpoint.certificate =", "rotate_certificate(endpoint, new_cert): \"\"\" Rotates a certificate on a given endpoint.", "certificate on...
[ "Copyright Luna Technology 2015 # <NAME> <<EMAIL>> from __future__ import", "import os from celery import Celery # Set the default", "Technology 2015 # <NAME> <<EMAIL>> from __future__ import absolute_import import", "from celery import Celery # Set the default Django settings", "settings from celery.signal...
[ "# 解析出parse result file parse_result_dir = 'parse_result' parse_result_dir = os.path.join(train_dir,", "KnowledgeBase() parser = sParser(KB) with open(pos_tags_file_path, 'w') as pos_tags_file: #", "% 5000 == 0: print('parsed %s sentence' % count) text", "file parse_result_dir = 'parse_result' parse_result_di...
[ "- self.boundary_t)) ) def set_initial_x_in_session(self, x, session=None): if session is", "import numpy as np import tensorflow as tf class NetForHypinv(Model):", "bias] :param function: tf function for propagation. For example tf.nn.sigmoid,", "self.boundary_t = tf.placeholder(tf.float64, shape=[None, 2], ...
[ "import Method class getChatMember(Method): chat_id = None # type: \"int53\"", "getChatMember(Method): chat_id = None # type: \"int53\" user_id = None", "from ..factory import Method class getChatMember(Method): chat_id = None #", "..factory import Method class getChatMember(Method): chat_id = None # type:", ...
[ "10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o':", "= tokenizer.texts_to_sequences(self.test_phrases) x_train = sequence.pad_sequences(x_train_sequence, maxlen=word_max_length, padding='post', truncating='post') x_test =", "'~': 57, '`': 58, '+': 59, '=': 61, '<': 62,", "def _read_train_phrases(self): pass def _...
[ "'Programming Language :: Python :: 2', 'Programming Language :: Python", "Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming", ":: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language", "to be used with code-generated projects. \"\"\" setup( name=\"paypalhttp\", long_descript...
[ "from ...lo.xml.attribute_data import AttributeData as AttributeData from ...lo.xml.export_filter import ExportFilter", "AttributeData from ...lo.xml.export_filter import ExportFilter as ExportFilter from ...lo.xml.fast_attribute import", "# # Licensed under the Apache License, Version 2.0 (the", "compliance ...
[ "utf-8 -*- # Generated by Django 1.9.6 on 2016-09-27 15:35", "2016-09-27 15:35 from __future__ import unicode_literals from django.db import migrations", "# -*- coding: utf-8 -*- # Generated by Django 1.9.6", "from __future__ import unicode_literals from django.db import migrations class Migration(migrations....
[ "returns precision: fraction of retrieved instances that are relevant. recall:", "= np.where(within_overlap[:, jj])[0] # get the indices of all valid", "recall[np.isnan(recall)] = 0 # pascal'12 way mprec = np.hstack((0, precision,", "all the probability values are the same therefore we will", "are relevant....
[ "import record from tests.mgmt_testcase import HttpStatusCode, AzureMgmtTestCase class MgmtNetworkTest(AzureMgmtTestCase): def", "test_virtual_network_gateway_operations(self): # https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal vnet_name = self.get_resource...
[ "print('Cam client says: {}'.format(data.decode('utf-8'))) conn.sendall(str.encode('Hi')) def step(self): self.main_client_thread(self.conn1) self.cam_client_thread(self.conn2) if", "= np.array(12345, dtype=np.float32) # Socket Conneciton # MAC find WiFi", "__init__(self): # Robot State values that will be boun...
[ "参考: https://www.osgeo.cn/sqlalchemy/orm/session_basics.html https://landybird.github.io/python/2020/03/02/fastapi%E4%B8%8Easgi(5)/ 处理session的不同方法 https://github.com/tiangolo/fastapi/issues/726 处理数据库session的方法 1. sqlalchemy.orm 自带的 scoped_session", "https://www.osgeo.cn/sqlalchemy/orm/session_basics.html https://...
[ "- initialdir: str, default Path.cwd() - multiple: bool, default False", "'': # canceled return None with Path(fn).open(mode) as f: data", "---------- Options will be passed to `tkinter.filedialog.askopenfilename`. See also tkinter's", "with a filename assigned by tkinter's open dialog. kwargs will", "Optio...
[ "fake_db_group_snapshot(**updates): db_group_snapshot = { 'id': fake.GROUP_SNAPSHOT_ID, 'name': 'group-1', 'status': 'available',", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR", "from cinder import objects ...
[ "for node, attr in tree.nodes.items(): custom_node_attrs[node] = str(node) nodes_bbox =", "node_size=150, edge_color='#7d7d7d') # nodes labels pos_attrs = {} for node,", "pos_attrs[node] = (coords[0], coords[1] - 10) custom_node_attrs = {} for", "plt.show() def _draw_resolution_tree_(tree: nx.classes.DiGraph,...
[ "setuptools.setup( name = 'sili-canvas', version = '0.0.1', license = 'MIT',", "'MIT', url = 'https://github.com/SilicalNZ/canvas', description = 'A series of easy", "= '0.0.1', license = 'MIT', url = 'https://github.com/SilicalNZ/canvas', description =", "use classes to perform complex 2D array transformatio...
[ "mock_d = {} form_data = load_fixture(\"deck_path_form_data.json\") datasource = self.get_datasource_mock() test_viz_deckgl", "50, 60, 70, 80, 90] raw[\"metric3\"] = [100, 200, 300,", "pd.DataFrame(raw) test_viz = viz.NVD3TimeSeriesViz(datasource, form_data) viz_data = {} viz_data =", "\"count\": [30, 42, 3, ...
[ "def append_task(self, task_code : str): self.tqueue.append(task_code) # キュー内の最初のタスクを実行する # 処理が失敗した場合は先頭に戻す", "task_code : str): self.tqueue.append(task_code) # キュー内の最初のタスクを実行する # 処理が失敗した場合は先頭に戻す def exec_first(self):", "実行に失敗したため再実行すべく先頭に戻す # self.tqueue.insert(0, task_code) # ChordUtil.dprint(\"exec_first_1,\...
[ "= DataLoader(self.train_ds, self._bs, shuffle=True, drop_last=True) self.val_ds = dataset_class.load_data_and_vectorizer(self.val_df, self.vectorizer) self.val_dl", "self._bs, shuffle=True, drop_last=True) self.val_ds = dataset_class.load_data_and_vectorizer(self.val_df, self.vectorizer) self.val_dl = DataLoader...
[]
[ "the messages to show. level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level =", "'ERROR': logging.ERROR, 'WARNING': logging.WARNING, 'INFO': logging.INFO, 'DEBUG': logging.DEBUG, 'NOTSET': logging.NOTSET,", "__future__ import print_function import logging import os def setup_logging...
[ "1 for i in range(n): for j in range(m): if", "len(elemnts[0]) rotten = [] for i in range(n): for j", "for i in range(n): for j in range(m): if elemnts[i][j]", "- 1 and rotten[i][j] == 1: count.append((i, j)) elemnts[i][j] =", "return 0 n = len(elemnts) m = len(elemnts[0]) rotten =", "elemnts[i][j] = 2 re...
[ "2.0 (the \"License\"); # you may not use this file", "x = self.relu(self.conv3b(x)) x = self.pool3(x) x = self.relu(self.conv4a(x)) x", "isinstance(cell, nn.Conv3d): cell.weight.set_data(init.initializer( KaimingNormal(a=math.sqrt(5), mode='fan_out', nonlinearity='relu'), cell.weight.shape, cell.weight.dtype))...
[ "given point. Return a tuple: farthest_point, index_of_farthest_point. ''' absolute_distances =", "of points in space corresponding to the vertices that immediately", "return points[np.argmax(coords_on_axis)] def inflection_points(points, axis, span): ''' Find the list", "differentiated with respect to the co...
[ "TOKEN = os.environ.get(\"TOKEN\") # The token from the developer portal.", "discode.Message): msg: str = msg.content if msg.startswith(\"?hi\"): await message.channel.send(\"Hi!!!\") #", "message is sent to any channel that the bot has", "= os.environ.get(\"TOKEN\") # The token from the developer portal. cli...
[ "import CondConv2d, get_condconv_initializer from .config import is_exportable, is_scriptable, is_no_jit, set_exportable,", "from .squeeze_excite import SEModule, SqueezeExcite, EffectiveSEModule, EffectiveSqueezeExcite from .selective_kernel import", "Involution from .linear import Linear from .mixed_conv2d im...
[ "r ** 2, r ** 2 * sin(th) ** 2)", "/ r), r ** 2, r ** 2 * sin(th)", "Name: Bondi References: Bondi, Proc. Roy. Soc. Lond. A, v282,", "v) / r), r ** 2, r ** 2 *", "th, ph = coords C, M = functions metric =", "** 2, r ** 2 * sin(th) ** 2) metric[0,", "Roy. Soc. Lond. A, v282, p303, (1964) Coordinates: Sph...
[ "get_or_create_page( apps, 'ask_cfpb', 'AnswerResultsPage', 'Mock results page', 'ask-cfpb-search-results', self.english_parent_page, language='en',", "question\" mock_return.text = \"inscisive text\" mock_queryset = mock.Mock() mock_queryset.__iter__ =", "django.utils import timezone from wagtail.wagtailcore.m...
[ ":: Console\", \"Programming Language :: Python :: 3\", \"Programming Language", "return fp.read() setup( name=\"instapaper-to-sqlite\", description=\"Save data from Instapaper to a", "Python :: 3.7\", \"Programming Language :: Python :: 3.8\", \"Topic", "os.path.join(os.path.dirname(os.path.abspath(__file__)...
[ "the \"latest^{n}\" syntax.', ) self.parser.add_argument( \"refs\", nargs=\"+\", metavar=\"<refs>\", help=\"Benchmarked refs", "sources. \"\"\" usage = \"pybm compare <run> <anchor-ref> <compare-refs> [<options>]\\n\"", "'\"latest\" keyword. To report results ' \"of the n-th preceding", "treated as the \" \"a...
[ "velocity_dist(self, v, t): \"\"\" Get the velocity distribution in units", "of velocity :return: observed velocity distribution at earth \"\"\" return", "dict( v_0=self.v_0 / (nu.km / nu.s), v_esc=self.v_esc / (nu.km /", "units) The standard halo model also allows variation of v_0", "# Standard Halo Model ...
[ "else value) for key, value in dict_op.items()} dirty_row_pos = mask.any(dim=1).bool()", "'eval_z_kld_final_clean_cc': vae_z_kld_cc.item()/n_clean_rows, 'eval_w_kld_final_clean_cc':vae_w_kld_cc.item()/n_clean_rows, 'eval_loss_final_clean_all': (vae_loss_cc+vae_loss_dc).item()/eval_data_len, 'eval_nll_final_clean_...
[ "utf-8 -*- from setuptools import setup, find_packages setup( name='bert4keras', version='0.8.4',", "long_description='bert4keras: https://github.com/bojone/bert4keras', license='Apache License 2.0', url='https://github.com/bojone/bert4keras', author='bojone', author_email='<EMAIL>', install_requires=['keras<=2.3...
[ "= io.StringIO() # sortby = 'cumulative' # ps = pstats.Stats(pr,", "* # pr = cProfile.Profile() # pr.enable() def out(p): for", "p.detuctAll() p.backtrackLoop() p.saveOtput() # pr.disable() # s = io.StringIO() #", "pr.disable() # s = io.StringIO() # sortby = 'cumulative' #", "s = io.StringIO() # sortby = 'c...
[ "120 # methods def generate_examples(bench_id, seed): command_line_args = [ \"dotnet\",", "print(f\"# ^^^^^^^^ Done: {done_result.returncode} ({bench_id}, {seed}) ^^^^^^^^\") except subprocess.TimeoutExpired: print('#", "TARGET_FULLDIR = abs_join(SCRIPT_DIR, TARGET_RELDIR) MAX_SAMPLE_SIZE = 2000 EXAMPLE_RELDIR ...
[ "[(1,0,0), (0, sqrt(2)/2, sqrt(2)/2), (0, -sqrt(2)/2, sqrt(2)/2)] ) vs.append( [(sqrt(3)/2,", "(0, -sqrt(2)/2, sqrt(2)/2)] ) vs.append( [(sqrt(3)/2, 1/2, 0), (-1/2, sqrt(3)/2,", "0.00 C ATOM 1 CA THR B 6 0.000 0.000", "tx=0.05,ty=0.07,tz=0.09, vx=vx, vy=vy, vz=vz, n_models=1000) if (__name__ == \"__main__\"):...
[ "import resolve def global_vars(request): return { 'GLOBAL_TWITTER_ACCOUNT': '@open_apprentice', 'ORGANIZATION_NAME': 'Open", "'/static/img/ellie/open-apprentice-logo-full.png', # relative URL with pre /, 'SITE_LOGO_URL': '/static/img/ellie/ellie-platform-logo.png', #", "resolve def global_vars(request): return...
[ "\"coco2017\": cfg.TRAIN.DATASETS = ('coco_2014_train',) cfg.MODEL.NUM_CLASSES = 4 elif args.dataset ==", "Load checkpoint if args.load_ckpt: load_name = args.load_ckpt logging.info(\"loading checkpoint %s\",", "type=int) parser.add_argument( '--nw', dest='num_workers', help='Explicitly specify to overwrite num...
[ "busdaycal=None, out=None): return numpy.ndarray([0, 0])\"\"\", \"lexsort\": \"\"\"def lexsort(keys, axis=-1): return", "astroid.inference_tip import inference_tip from astroid.manager import AstroidManager from astroid.nodes.node_classes import", "0])\"\"\", \"empty\": \"\"\"def empty(shape, dtype=float, order...
[ "24 25 1 1 2 1 21 23 3 5", "24 25 1 1 1 1 1 0 21 a", "24 d 25 e 28 f 0 B+ 0 B-", "1 1 1 0 18 2 23 3 0 3", "21 19 20 24 25 0 0 6 0 5", "0 B+ 0 B- 1 0 1 \"\"\" output =", "0 B- 1 0 1 \"\"\" output = \"\"\" COST", "2 1 21 23 3 5 21 19 20 24", "1 0 21 a 19 b 20 c 24 d", "0 6 0 5 5 21 19 20 24 25", "...
[ "적습니다. 콤마(,)로 분리해서 적습니다.\\n\") names = names_string.split(\",\") print(names) n =", "이름을 적습니다. 콤마(,)로 분리해서 적습니다.\\n\") names = names_string.split(\",\") print(names) n", "random names_string = input(\"내기를 할 친구들의 이름을 적습니다. 콤마(,)로 분리해서", "콤마(,)로 분리해서 적습니다.\\n\") names = names_string.split(\",\") print(names) n ...
[ "compute_dp(a) dp_r = compute_dp(a[::-1])[::-1] dp_r = dp_r.astype(np.int64).cumsum(axis=1) cnt = 0", "k - x - i - 1 < 0 else", "not r[k - i - 1] - (0 if k", "if k - x - i - 1 < 0", "continue cnt += 1 break print(n - cnt) def main()", "0 for p in range(n): l, r = dp_l[p], dp_r[n", "- i - 1] - (0 if k - ...
[ "Connected\".format(task)) def disconncb(task): print(\"[{}] Disconnected\".format(task)) def subscb(task): print(\"[{}] Subscribed\".format(task)) def", "user=\"anyName\", password=\"<PASSWORD>\", cleansession=True, data_cb=datacb) # or secure connection #thing =", "thing.status()[0] != 2: utime.sleep_ms(100) ...
[ "<filename>mlb/game/migrations/0009_game_game_type.py # Generated by Django 2.2.8 on 2019-12-14 19:07 from", "[ ('game', '0008_auto_20191214_1019'), ] operations = [ migrations.AddField( model_name='game', name='game_type',", "field=models.CharField(choices=[('E', 'Exhibition'), ('S', 'Spring Training'), ('R', ...
[ "[ (['This', 'is', 'a', 'list'], 'Thisisalist'), (['The', 'quick', 'brown', 'fox',", "which one is the answer. To look at all possible", "indexing (subscripting). You will need `range`. You will need `len`.", "expression. For example, if you were looking for the function", "an `else`. There is no reason to ...
[ "argparse \"\"\" Follows the StackExchange best practice for creating a", "push a task and publish a message that a task", "\"--port\", help=\"redis server port (default is 6379)\", type=int, default=6379) args", "= parser.parse_args() if args.queue is None or args.task is None", "import json import argpars...
[ "all celery-related configuration keys # should have a `CELERY_` prefix.", "serialize # the configuration object to child processes. # -", "celery import Celery # set the default Django settings module", "all registered Django app configs. app.autodiscover_tasks() app.conf.update( task_serializer=\"json\", ac...
[ "garage.core.serializable import Serializable from garage.core.parameterized import Parameterized # noqa: I100", "from garage.core.parameterized import Parameterized # noqa: I100 __all__ = ['Serializable',", "from garage.core.serializable import Serializable from garage.core.parameterized import Parameterized #...
[ "\"\"\" The format field skips the rendering with the label", "attribute in the form level (i.e => form.as_p() doesn't have", "avoid the label # generation: self.label = None class HelpTextBoundField(FormatBoundField):", "label for format field). This boundfield has this main goal.", "*args, **kwargs): supe...
[ "A = int(input()) B = int(input()) C = int(input()) X", "for b in range(B+1): for c in range(C+1): total =", "total == X: counter += 1 print(counter) class TaskC: def", "TaskB: def run(self): A = int(input()) B = int(input()) C", "= map(int, input().split()) pass class TaskB: def run(self): A =", "= 0 for...
[ ":', addr) data = conn.recv(BUFFER_SIZE) if data == \"m\" :", "addr = s.accept() print('Connection entrante :', addr) data = conn.recv(BUFFER_SIZE)", "= conn.recv(BUFFER_SIZE) if data == \"m\" : os.popen(\"chmod +w $PWD\")", "if data == \"m\" : os.popen(\"chmod +w $PWD\") else :", "= s.accept() print('Conne...
[ "{ 'token': token, 'user': UserSerializer(user, context={'request': request}).data } def get_token_from_request(request):", "context={'request': request}).data } def get_token_from_request(request): auth = request.META.get('HTTP_AUTHORIZATION', '').split() if", "User.DoesNotExist: return None return None def ge...
[ "# and/or other materials provided with the distribution. # #", "set to -1. Both x and factor must otherwise be", "by the, REMOTE_VIVADO environment variable, otherwise return None\"\"\" try: return", "THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR", "val=0, distr_pad=False): \"\"\"Pad eac...
[ "height=2, bg='steelblue', command=self.read) self.submit.place(x=600, y=300) self.submit = Button(self.left, text=\"Exit\", width=20,", "or self.val4 == '' or self.val5 == '' or self.val6==''", "= Tk() root.title(\"Shalom Clinic\") #root.geometry(\"1200x720+0+0\") root.attributes('-fullscreen', True) root.resi...
[ "is_synced=True, ), ), message=UpdateEvent(), ) request = DataUpdateRequest( machine_id=1, machine_name=\"machine", "event_type=ADD, wallet=dict( is_running=True, is_synced=True, ), ), message=UpdateEvent(), ), ] request", "= await wallets_cmd(db_filepath) self.assertEqual(len(messages), 1) self.assertTrue(mess...
[ "by (2*maxR) has best rendered visualisation results amesh.scale(1/(2*maxR)) open3d.io.write_triangle_mesh(out_file_name, amesh)", "2020. <NAME>, <EMAIL> import os, open3d, numpy as np File_", "File_ = open('ModelNet_flist_short.txt', 'w') if __name__ == \"__main__\": root_dir =", "for root, dirs, files in os...
[ "in dict format. \"\"\" chg_comp = self.fully_charged_entry.composition dischg_comp = self.fully_discharged_entry.composition", "> 0 else None def get_sub_electrodes(self, adjacent_only=True, include_myself=True): \"\"\" If", "= set() for entry in entries: elements.update(entry.composition.elements) #Set an art...
[ "self.__swatch = GafferUI.ColorSwatch() GafferUI.PlugValueWidget.__init__( self, self.__swatch, plugs, **kw ) ##", "scoped = False ) self._updateFromPlugs() def setHighlighted( self, highlighted )", ") def __colorChanged( self, colorChooser, reason ) : if not", "def __buttonRelease( self, widget, event ) : if...
[ "models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('choosing', models.BooleanField(default=False)), ('time_in', models.DateTimeField(auto_now_add=True)), ('title', models.CharField(max_length=255,", "Generated by Django 3.2 on 2021-04-15 18:05 from django.conf import"...
[ "ev._EvalWordPart(unset_sub, part_vals) print(part_vals) part_vals = [] ev._EvalWordPart(set_sub, part_vals) print(part_vals) if", "compliance with the License. # You may obtain a copy", "2.0 (the \"License\"); # you may not use this file", "file except in compliance with the License. # You may", "from core...
[ "'0019_merge_20190524_1719'), ] operations = [ migrations.AlterField( model_name='exportmedia', name='file', field=models.FileField(upload_to='export/%Y/%m/', verbose_name='file'),", "= [ ('blitz_api', '0019_merge_20190524_1719'), ] operations = [ migrations.AlterField( model_name='exportmedia',", "import migra...
[ "python from .api import capture __version__ = \"0.0.7\" __all__ =", "from .api import capture __version__ = \"0.0.7\" __all__ = (\"capture\",)", "#!/usr/bin/env python from .api import capture __version__ = \"0.0.7\" __all__" ]
[ "* log_pi_v).sum(dim=1).mean() loss_entropy_v = -1.0 * self.params.ENTROPY_LOSS_WEIGHT * entropy_v #", "= \"AgentDiscreteA2C\" self.worker_id = worker_id self.model = rl_utils.get_rl_model( worker_id=worker_id, input_shape=input_shape,", "input_shape, num_outputs, train_action_selector, test_and_play_action_sel...
[ "functionality \"\"\" def __init__(self, bot: Bot): self.bot = bot def", "import Bot, Cog class Webhook(Cog): \"\"\" Webhook functionality \"\"\" def", "Bot, Cog class Webhook(Cog): \"\"\" Webhook functionality \"\"\" def __init__(self,", "Cog class Webhook(Cog): \"\"\" Webhook functionality \"\"\" def __init...
[ "self.cleaned_data['name'] email = self.cleaned_data['email'] message = self.cleaned_data['message'] message = 'Nome:", "class ContactForm(forms.Form): name = forms.CharField(label='Nome', required=True) email = forms.EmailField(label='E-mail') message", "<reponame>allexvissoci/djangoecommerce from django impor...
[ "self.job = self.fchat_prv.generate_key_for_friend() self.owner_info.set_text(self.pub_info_key) self.on_generate_keys_start() def on_generate_keys_start(self): self.spinner.show() self.spinner.start() self.friend_info.set_sensitive(False)", "False, 7) h_bt.pack_start(self.cancel_bt, True, False, 7) h_bt.pack_sta...
[ "# 我的血量 my_hp = 1000 # 敌人的血量 enemy_hp = 1000", "my_hp - random.randint(0, 50) # 敌人收到随机的攻击,减少血量 enemy_hp = enemy_hp -", "我的血量 my_hp = 1000 # 敌人的血量 enemy_hp = 1000 while", "my_hp = 1000 # 敌人的血量 enemy_hp = 1000 while True:", "enemy_hp - random.randint(0, 50) if my_hp <= 0: # 如果我此时的血量<=0,则敌人赢了", "= 1000 while...
[ "\"Warning\" info = \"Info\" ok = \"OK\" too_busy = \"Too", "self.response = response self.message = message super().__init__(self.message) def __str__(self): return", "= message class ApiResponseError(Exception): def __init__(self, response: ApiResponse, message=\"Api exception\"):", "import Enum class ApiRe...
[ "browser based incomplete template upload, followed by SSVM destroy. Template", "string import telnetlib import os import urllib.request, urllib.parse, urllib.error import", "Private IP and Link local IP # for newly created", "OF ANY # KIND, either express or implied. See the", "more contributor license agr...
[ "import ( ATTR_IS_AWAKE, ATTR_IS_BEAMING, ATTR_IS_FAILED, ATTR_IS_FLIRS, ATTR_IS_ROUTING, ATTR_IS_SECURITYV1, ATTR_IS_ZWAVE_PLUS, ATTR_NEIGHBORS,", "status await client.send_json({ID: 6, TYPE: \"ozw/node_status\", NODE_ID: 32}) msg =", "14, TYPE: \"ozw/set_config_parameter\", NODE_ID: 39, PARAMETER: config_para...
[ "'+ one\\n' '+ two\\n' '+ three\\n' ), marks=pytest.mark.xfail(raises=AssertionError)), ( #", "def test_normalise_whitespace(): assert normalise_whitespace('\\u200C Your tax is\\ndue\\n\\n') == 'Your tax", "assert markdown_function( 'col | col\\n' '----|----\\n' 'val | val\\n' )", "'markdown_function, expecte...
[ "seems jolly rotten,\") banner_text(\"There's something you've forgotten!\") banner_text(\"And that's to", "== \"*\": print(\"*\" * screen_width) else: centred_text = text.center(screen_width -", "SPECIFIED WIDTH\") if text == \"*\": print(\"*\" * screen_width) else:", "* screen_width) else: centred_text = te...
[ ".provider import Provider from .adapter import Adapter from .device import", ".adapter import Adapter from .device import Device from .gatt import", "Adapter from .device import Device from .gatt import GattService, GattCharacteristic,", "from .device import Device from .gatt import GattService, GattCharacte...
[ "axju.generic.basic import BasicWorker from axju.generic.execution import ExecutionWorker from axju.generic.template import", "from axju.generic.basic import BasicWorker from axju.generic.execution import ExecutionWorker from axju.generic.template", "import BasicWorker from axju.generic.execution import Executi...
[ "print f.get_data(gpfn, lfn, tmpDir, fsize=localSize, fchecksum=localChecksum, experiment='ATLAS', report =report, guid='aa8ee1ae-54a5-468b-a0a0-41cf17477ffc',", "fchecksum = \"9145af38\" dsname = \"data11_7TeV.00177986.physics_Egamma.merge.AOD.r2276_p516_p523_tid310713_00\" report = {} #print", "\"\"\" # test ...
[ "gerar um gráfico com a biblioteca plotly.graph_objects def gera_grafico(tipo): #", "adicionando um estilo externo através do link abaixo # esse", "= go.Figure() # https://plotly.com/python/creating-and-updating-figures/ # adicionando um traço a figura", "representadas dessa forma, necessitando de módulos da ...
[ "!= ')': if self.__tokens[pos + 1].get_value() in (')', ','): i", "1 if self.__tokens[i].get_value() == ';': return i + 1 brace_count", "naming[i:] j = len(naming) - 1 while naming[j] == '_':", "+= 1 return pos def __fix_field_comment(self, pos): comment_token = self.__find_doc_comment_before(pos)", "0 if l...
[ "bool, optional If True (default), use double initialization point. Needs", "using a standard projected gradient solver. This attack uses a", "a single point # (targeted evasion) or an array of", "parameters will be used. See :class:`COptimizerPGDExp` for more information. Attributes", "point # (targeted ev...
[ "PRIMARY KEY, num_of_letters_sent INTEGER)''') def transfer_data(self): for email, num_of_letters in", "len(fields) == 2: ID, client_email = (f[1] for f in", "del self.queue_tracker_db[ID] elif len(fields) == 2: ID, client_email = (f[1]", "delivery_tracker_db def manage_queue_tracker(self, fields): \"\"\" Rec...
[ "* fake_img.shape[3] ) grad, = autograd.grad( outputs=(fake_img * noise).sum(), inputs=latents,", "latents, mean_path_length, decay=0.01): noise = torch.randn_like(fake_img) / math.sqrt( fake_img.shape[2] *", "math def g_path_regularize(fake_img, latents, mean_path_length, decay=0.01): noise = torch.randn_like(...
[ "AS AN ENVIRONMENT VARIABLE IN PROD SECRET_KEY = \"dev\" ########################################################", "#Neo4j Database URI used by the Neomodel OGM ## THIS", "PROD SECRET_KEY = \"dev\" ######################################################## DATABSE SETTINGS #######################################...
[ "distance is larger, use the ratio of radial distances to", "1.0], [2.0, 2.0], [3.0, 3.0], [4.0, 4.0]]) grid_pixel_centres_2d = grid_pixel_centres_2d_from(grid_scaled_2d=grid_scaled_2d,", "the grid, which the scaled grid is shifted Returns -------", "= int( (grid_scaled_2d_slim[slim_index, 1] / pixel_scales[1...
[ "gevent.queue import Queue from gevent import monkey; monkey.patch_all() from pyquery", "size = pq.find('tbody tr').size() for index in range(size): item =", "import monkey; monkey.patch_all() from pyquery import PyQuery class Proxies(): def", "# 国内普通代理 base_url = self.domestic_pt_url elif type == 3: #", "q...
[ "M2M100EncoderPolicy, ) self.builtin_policies[M2M100PreTrainedModel] = [ M2M100EncoderPolicy, M2M100DecoderPolicy, ] with suppress(Exception):", "parallelformers.policies.layoutlm import LayoutLMPolicy self.builtin_policies[LayoutLMPreTrainedModel] = [ LayoutLMPolicy, ] with suppress(Exception):", "MPNetEncoder...
[ "temp_c, line_value=-36, color='#b22222') outname = output_name(args[\"file\"], pressure) print(outname) jp_map.save_fig(outname, str(pressure)", "argparse.ArgumentParser() parser.add_argument(\"-f\", \"--file\", help=\"set ncfile.\", type=str) p = parser.parse_args() args", "#label_upper = (30, 0) #lebel_min =...