ngram
listlengths
0
67.8k
[ "WHERE paj.test.id IN ' '(SELECT paj.test.id FROM paj.test ' 'WHERE paj.test.id = :id_1)')", "= select([t]).where(t.c.x == 5).order_by(t.c.y).offset(20) # test that the select is not altered with", "= :id_1') s = select([tbl.c.id]).where(tbl.c.id == 1) self.assert_compile(tbl.delete().where(tbl.c.id.in_(s)), 'D...
[ "\"\"\" return pulumi.get(self, \"lease_transitions\") @lease_transitions.setter def lease_transitions(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, \"lease_transitions\", value) @property", "the holder of a current lease. :param pulumi.Input[int] lease_duration_seconds: leaseDurationSeconds is a du...
[ "thisFont.selectedLayers # active layers of selected glyphs def process( thisLayer ): advance =", ") thisGlyph.endUndo() # end undo grouping thisFont.enableUpdateInterface() # re-enables UI updates in Font", "auto-aligned. \"\"\" import GlyphsApp thisFont = Glyphs.font # frontmost font thisFontMaster = thisFont...
[ "width=width, height=height) canvas.pack() canvas.xview_scroll(6, \"units\") # hack so (0, 0) works correctly canvas.yview_scroll(6,", "def make_canvas(width, height): \"\"\" Creates and returns a drawing canvas of the given", "# provided function, this code is complete def make_canvas(width, height): \"\"\" Cr...
[ "(99% = +3 dB) #print('bip') #self.play('bip') #time.sleep(3) self.say('Hello!', 'en') self.say('Audio server is running.',", "bh = asr_server.get_asr() self.reply(bh) if bh!='': print('ASR sent [%s]' %bh) elif (data.startswith('SOUND')): self.play(data[6:])", "= soundfile.readframes(self.periodsize) while (len...
[ "transformed version. Returns: video (Tensor[T, H, W, C]): the `T` video frames audio(Tensor[K,", "elements, so not all frames in a video might be present. Internally, it", "of the video clip \"\"\" def __init__(self, root, frames_per_clip, step_between_clips=1, frame_rate=None, extensions=('avi',), transform=N...
[ "self.config.qthelp_basename) def build_qhp(self, outdir, outname): self.info('writing project file...') # sections tocdoc = self.env.get_and_resolve_doctree(self.config.master_doc,", "= True def init(self): StandaloneHTMLBuilder.init(self) # the output files for HTML help must", "isinstance(node, nodes.bullet_...
[ "each journal, for a given search on sciencedirect. \"\"\" dict1 = {} years", "#for that journal df = pd.read_excel('elsevier_journals.xls') df.Full_Category = df.Full_Category.str.lower() # lowercase topics for", "is an exception, it means we are on the right page scraped_elems =", "= shuffle(df,random_state...
[ "an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND,", "= Tuple[ str, str, Optional[str], Optional[str], Optional[int], Optional[int], bool ] DbapiDescription = Union[List[DbapiDescriptionRow],", "distributed on an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY", "express or impl...
[ "list(get_usb()) if not anonymous: result[\"uname\"] = ' '.join(platform.uname()).strip(), return result if __name__ ==", "make_sys_report() with open(\"log_system_information.json\", \"w\") as f: json.dump(data, f, indent=4) print(json.dumps(data, indent=4)) print(\"System info", "\"system\": platform.system()...
[ "xdelta_dir='.'): self.original = original self.edited = edited self.filename = filename # Need to", "__init__(self, message, errors): super(PatchChecksumError, self).__init__(message) class Patch: # TODO: Abstract out the need", "file. def __init__(self, original, filename, edited=None, xdelta_dir='.'): self.o...
[ "+ \"-p/--phrase Phrase: phrase to encrypt/decrypt\\n\" + \"-d/--decrypt: enables decrypt default is encrypt\\n\"", "rotors[i])) def encrypt(self, word): cipher = '' for i, char in enumerate(word.upper()): distance", "word += self.rotors[i % 2].rotate((i + 1) % 2, distance) return word def", "2, distance) ret...
[ "if verbose: print(\"Iteration %d, p_obj::%.5f, d_obj::%.5f, gap::%.2e\" % (it, p_obj, d_obj, gap)) gaps[it", "// grp_size _range = np.arange(n_groups) groups = dict( bcd=lambda: _range, bcdshuf=lambda: np.random.choice(n_groups, n_groups,", "norm_x < u: return np.zeros_like(x) else: return (1 - u / norm_x) *",...
[ "of ``initial_text`` in descending order of importance.\"\"\" len_text = len(initial_text.words) if self.wir_method ==", "== \"weighted-saliency\": # first, compute word saliency leave_one_texts = [ initial_text.replace_word_at_index(i, \"[UNK]\") for", "] leave_one_results, search_over = self.get_goal_results(...
[ "def rotate_certificate(endpoint, new_cert): \"\"\" Rotates a certificate on a given endpoint. :param endpoint:", "certificate on a given endpoint. :param endpoint: :param new_cert: :return: \"\"\" # ensure", "lemur import database def rotate_certificate(endpoint, new_cert): \"\"\" Rotates a certificate on a gi...
[ "os from celery import Celery # Set the default Django settings module for", "<<EMAIL>> from __future__ import absolute_import import os from celery import Celery # Set", "django.conf import settings from celery.signals import setup_logging @setup_logging.connect def configure_logging(sender=None, **kwargs): im...
[ "os.makedirs(train_dir) # 解析出parse result file parse_result_dir = 'parse_result' parse_result_dir = os.path.join(train_dir, parse_result_dir) if", "# print(par_path) if par_path == this_path: break else: this_path = par_path sys.path.append(root_path) from", "打开语料文件 file_path = 'data/corpus/zh_wiki/wiki_test' f...
[ "output self.loss = None self.boundary_loss = None self.t = None #target self.boundary_t =", "1 bias] :param function: tf function for propagation. For example tf.nn.sigmoid, tf.atan :param", "self.out = tf.nn.softmax(y) with tf.name_scope(\"Binary_class_output\"): self.boundary_out = list() for i in range(self...
[ "Method class getChatMember(Method): chat_id = None # type: \"int53\" user_id = None #", "getChatMember(Method): chat_id = None # type: \"int53\" user_id = None # type: \"int32\"", "class getChatMember(Method): chat_id = None # type: \"int53\" user_id = None # type:", "import Method class getChatMember(Method...
[ "= Tokenizer(num_words=self.configuration[support.QUANTITY_WORDS]) self.tokenizer.fit_on_texts(self.train_phrases) return self.tokenizer def text_to_vector_word(self, text): vector_sequence = self.get_tokenizer().texts_to_sequences([text]) result =", "return self.train_phrases, self.train_labels def get_phrases_t...
[ "Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python", "Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language", ":: Python :: 3.7', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic", ":: Python :: Implementation :: PyPy', ...
[ "writing, software # distributed under the License is distributed on an \"AS IS\"", "...lo.xml.attribute import Attribute as Attribute from ...lo.xml.attribute_container import AttributeContainer as AttributeContainer from ...lo.xml.attribute_data", "...lo.xml.fast_attribute import FastAttribute as FastAttribut...
[ "15:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies =", "1.9.6 on 2016-09-27 15:35 from __future__ import unicode_literals from django.db import migrations class", "Generated by Django 1.9.6 on 2016-09-27 15:35 from __future__ impor...
[ "of the length of the number of files with each entry containing that", "label them as true positive or false positive (i.e. 1-tp) tp = np.zeros(num_preds)", "== gt).mean() * 100.0 # ROC - area under curve fpr, tpr, thresholds", "to the end of the file - dont count them during eval nms_pos,", "style conf = ...
[ "\"family\": \"MeteredData\" }, \"service_provider_properties\": { \"service_provider_name\": \"Comcast\", \"peering_location\": \"Chicago\", \"bandwidth_in_mbps\": 100 } }", "self.group_name, public_ip_name, params_create, ) result_create.wait() # AzureOperationPoller #self.assertEqual(result_create.status_code,...
[ "data = conn.recv(1024) print('Main client says: {}'.format(data.decode('utf-8'))) conn.sendall(str.encode('Hi')) def cam_client_thread(self, conn): data =", "be bounced with client self.robot_state = None self.pos = None self.message = np.array(12345,", "> 1023) PORT = 65432 self.ThreadCount = 0 print('Connect...
[ "zhkuo # @Time : 2021/1/3 9:12 下午 # @Desc : from sqlalchemy import", "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 2....
[ "Path(fn).open(mode) as f: data = pickle.load(f) return data def dump_pickle_with_dialog(obj, mode='wb', **opt): \"\"\"Pickle", "will be passed to saveas_dialog. Returns -------- filename: str \"\"\" opt_default = dict(filetypes=[('pickled", "fn = saveas_dialog(**_opt) if fn == '': # canceled return '' # note:"...
[ "License is distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR CONDITIONS", "writing, software # distributed under the License is distributed on an \"AS IS\"", "'user_id': fake.USER_ID, 'project_id': fake.PROJECT_ID, 'group_type_id': fake.GROUP_TYPE_ID, 'group_id': fake.GROUP_ID, } for name, field in", ...
[ "bbox=nodes_bbox) # edge labels if enable_edge_labels: edges_pos = graphviz_layout(tree, prog='dot') edge_labels = nx.get_edge_attributes(tree,", "def display_resolution_tree(resolution_tree: nx.classes.DiGraph): _draw_resolution_tree_(resolution_tree) plt.show() def _draw_resolution_tree_(tree: nx.classes.DiGrap...
[ "= 'MIT', url = 'https://github.com/SilicalNZ/canvas', description = 'A series of easy to use", "complex 2D array transformations', long_description = '', author = 'SilicalNZ', packages = ['canvas',", "'A series of easy to use classes to perform complex 2D array transformations',", "2D array transformations',...
[ "= test_viz_deckgl.form_data[\"adhoc_filters\"] assert expected_results.get(mock_key) == adhoc_filters class TimeSeriesVizTestCase(SupersetTestCase): def test_timeseries_unicode_data(self): datasource = self.get_datasource_mock()", "class TimeSeriesTableVizTestCase(SupersetTestCase): def test_get_data_metrics(sel...
[ ": List[str] = [] self.existing_node = existing_node def append_task(self, task_code : str): self.tqueue.append(task_code)", ".chord_util import ChordUtil, InternalControlFlowException, NodeIsDownedExceptiopn if TYPE_CHECKING: from .chord_node import ChordNode class TaskQueue:", "= [] self.existing_node = exist...
[ "def __init__(self, model, optimizer, loss_fn, scheduler=None): self.model = model self.optimizer = optimizer self.loss_fn", "drop_last=True) if self.with_test: self.test_df = df_with_split.loc[df_with_split['split'] == 'test'] self._lengths['test_size'] = len(self.test_df) self._n_batches.append(self._lengths['t...
[]
[ "import logging import os def setup_logging(): # Set log level of the messages", "= os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': logging.CRITICAL, 'ERROR': logging.ERROR, 'WARNING': logging.WARNING, 'INFO':", "logging.WARNING, 'INFO': logging.INFO, 'DEBUG': logging.DEBUG,...
[ "and rotten[i - 1][j] == 1: count.append((i - 1, j)) elemnts[i - 1][j]", "< n - 1 and rotten[i][j] == 1: count.append((i, j)) elemnts[i][j] = 2", "not rotten: break mins += 1 for i in range(n): for j in", "j in rotten: if i > 0 and rotten[i - 1][j] == 1:", "m - 1 and rotten[i][j] == 1: count.append((i, j)) ...
[ "2), pad_mode='same') self.fc6 = nn.Dense(in_channels=8192, out_channels=4096) self.fc7 = nn.Dense(in_channels=4096, out_channels=4096) self.fc8 = nn.Dense(in_channels=4096,", "self.relu(self.conv3a(x)) x = self.relu(self.conv3b(x)) x = self.pool3(x) x = self.relu(self.conv4a(x)) x = self.relu(self.conv4b(x))", ...
[ "''' coords_on_span = points.dot(span) dx = np.gradient(coords_on_span) coords_on_axis = points.dot(axis) # Take the", "# Compare the product of all neighboring pairs of points in the second", "index_of_farthest_point. ''' absolute_distances = vx.magnitude(to_points - from_point) index_of_farthest_point = np.ar...
[ "a message is sent to any channel that the bot has access to.", "# The ready listener gets fired when the bot/client is completely ready for", "discode TOKEN = os.environ.get(\"TOKEN\") # The token from the developer portal. client =", "on_ready(): print(client.user, \"is ready!\") # The ready listener gets f...
[ "import get_norm_act_layer, create_norm_act, convert_norm_act from .drop import DropBlock2d, DropPath, drop_block_2d, drop_path from .eca", ".linear import Linear from .mixed_conv2d import MixedConv2d from .mlp import Mlp, GluMlp, GatedMlp,", "set_exportable, set_scriptable, set_no_jit,\\ set_layer_config from ...
[ "\"\"\" from sympy import Function, diag, sin, symbols coords = symbols(\"r v theta", "p303, (1964) Coordinates: Spherical Symmetry: Spherical Notes: Outgoing Coordinates \"\"\" from sympy import", "Function, diag, sin, symbols coords = symbols(\"r v theta phi\", real=True) variables =", "2 * (1 - 2 * M(r, v)...
[ "SPANISH_PARENT_SLUG, self.ROOT_PAGE, language='es', live=True) def test_annotate_links(self): mock_answer = ( '<p>Answer with a <a", "language='en') self.assertEqual( result.get('location'), '/ask-cfpb/search-by-tag/{}/'.format( target_tag)) def test_redirect_search_with_unrecognized_facet_raises_404(self): quer...
[ "Language :: Python :: 3\", \"Programming Language :: Python :: 3.6\", \"Programming Language", "packages=[\"instapaper_to_sqlite\"], entry_points=\"\"\" [console_scripts] instapaper-to-sqlite=instapaper_to_sqlite.cli:cli \"\"\", install_requires=[ \"click\", \"requests\", \"sqlite-utils~=3.17\", \"pyinstapaper @...
[ "usage = \"pybm compare <run> <anchor-ref> <compare-refs> [<options>]\\n\" def __init__(self): super(CompareCommand, self).__init__(name=\"compare\") self.config", "ago), \" 'use the \"latest^{n}\" syntax.', ) self.parser.add_argument( \"refs\", nargs=\"+\", metavar=\"<refs>\", help=\"Benchmarked refs", "def ad...
[ "of dark matter at the Earth (multiplied by units) The standard halo model", "= dddm.exporter() @export class SHM: \"\"\" class used to pass a halo model", "Halo Model (shm) return 'shm' def velocity_dist(self, v, t): \"\"\" Get the velocity", "is in units of velocity :return: observed velocity distribution a...
[ "p_params, q_params, q_samples = model(data_input, n_epoch=epoch-1) if not args.AVI: get_pi_exact_vec(model, data_input, p_params, q_params,", "measurement of calibration of pi's using MSE or cross-entropy if isinstance(mask_err, torch.Tensor): pi_mtx", "pi_mtx_true) print('MSE on pi pred: {}'.format(err_pi)) p...
[ "setuptools import setup, find_packages setup( name='bert4keras', version='0.8.4', description='an elegant bert4keras', long_description='bert4keras: https://github.com/bojone/bert4keras', license='Apache", "setup, find_packages setup( name='bert4keras', version='0.8.4', description='an elegant bert4keras', long_...
[ "s = io.StringIO() # sortby = 'cumulative' # ps = pstats.Stats(pr, stream=s).sort_stats(sortby) #", "i in range(2): print([len(x) for x in p.perms[i]]) if __name__ == '__main__': p", "pstats # import io from picture import * # pr = cProfile.Profile() #", "pr.enable() def out(p): for i in range(2): print([len(...
[ "import json import subprocess abs_join = lambda p1, p2 : os.path.abspath(os.path.join(p1, p2)) #", "\"./strprose/targets\" TARGET_FULLDIR = abs_join(SCRIPT_DIR, TARGET_RELDIR) MAX_SAMPLE_SIZE = 2000 EXAMPLE_RELDIR = \"./strprose/example_files\" EXAMPLE_FULLDIR =", "print(f\"# ^^^^^^^^ Done: {done_result.return...
[ "1 CA THR A 6 0.000 0.000 0.000 1.00 0.00 C ATOM 1", "90.00 P1 ATOM 1 CA THR A 6 0.000 0.000 0.000 1.00 0.00", "ATOM 1 CA THR B 6 0.000 3.000 0.000 1.00 0.00 C \"\"\"", "pdb_str_4 = \"\"\" CRYST1 10.000 10.000 10.000 90.00 90.00 90.00 P1 ATOM 1", "vs_ print vx,vy,vz tools.u_tls_vs_u_ens(pdb_str=pdb_str, tx=...
[ "def global_vars(request): return { 'GLOBAL_TWITTER_ACCOUNT': '@open_apprentice', 'ORGANIZATION_NAME': 'Open Apprentice Foundation', 'ORGANIZATION_WEBSITE': 'https://openapprentice.org', 'ORGANIZATION_LOGO':", "global_vars(request): return { 'GLOBAL_TWITTER_ACCOUNT': '@open_apprentice', 'ORGANIZATION_NAME': 'Open...
[ "help='Explicitly specify to overwrite the value comed from cfg_file.', type=int) parser.add_argument( '--nw', dest='num_workers',", "minibatch=True) ### Training Setups ### args.run_name = misc_utils.get_run_name() + '_step' output_dir = misc_utils.get_output_dir(args,", "else: raise ValueError(\"Need Cuda dev...
[ "out=None): return numpy.ndarray([0, 0])\"\"\", \"can_cast\": \"\"\"def can_cast(from_, to, casting='safe'): return True\"\"\", \"copyto\": \"\"\"def", "<<EMAIL>> # Copyright (c) 2020 <NAME> <<EMAIL>> # Copyright (c) 2021 <NAME> <<EMAIL>>", "For details: https://github.com/PyCQA/astroid/blob/main/LICENSE \"\"\"...
[ "1 1 0 18 2 23 3 0 3 19 24 25 1", "0 5 5 21 19 20 24 25 1 1 1 1 1", "= \"\"\" 2 18 3 0 3 19 20 21 1 1 1", "25 1 1 2 1 21 23 3 5 21 19 20 24", "1 1 1 0 18 2 23 3 0 3 19 24 25", "24 25 1 1 2 1 21 23 3 5 21 19 20", "19 24 25 1 1 2 1 21 23 3 5 21 19", "a 19 b 20 c 24 d 25 e 28 f 0 B+", "1 21 23 3 5 21 1...
[ "import random names_string = input(\"내기를 할 친구들의 이름을 적습니다. 콤마(,)로 분리해서 적습니다.\\n\") names", "input(\"내기를 할 친구들의 이름을 적습니다. 콤마(,)로 분리해서 적습니다.\\n\") names = names_string.split(\",\") print(names) n", "<reponame>susurigirl/susuri import random names_string = input(\"내기를 할 친구들의 이름을 적습니다. 콤마(,)로 분리해서 적습니다.\\n\")", "...
[ "compute_dp(a: np.ndarray) -> np.ndarray: dp = np.zeros((n + 1, k), np.bool8) dp[0, 0]", "compute_dp(a[::-1])[::-1] dp_r = dp_r.astype(np.int64).cumsum(axis=1) cnt = 0 for p in range(n): l, r", "if k - x - i - 1 < 0 else r[k -", "0 else r[k - x - i - 1]) >= 1 ): continue", "1 break print(n - cnt) def main()...
[ "subscribed_cb=subscb, published_cb=pubcb, data_cb=datacb) # wsmqtt = network.mqtt(\"eclipse\", \"ws://iot.eclipse.org:80/ws\", cleansession=True, data_cb=datacb) mqtt.start() #mqtt.config(lwt_topic='status', lwt_msg='Disconected')", "def datacb(msg): print(\"[{}] Data arrived from topic: {}, Message:\\n\".format...
[ "('R', 'Regular Season'), ('F', 'Wild Card'), ('D', 'Divisional Series'), ('L', 'League Championship Series'),", "django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('game', '0008_auto_20191214_1019'), ] operations", "2019-12-14 19:07 from django.db import migrations, mo...
[ "code if you want: all_numbers = [2, 4, 8, 1, 9, 7] small_numbers", "access an index that's too high. Can you see why this happens? The", "(\"Hello\", \"World\"): dedent(\"\"\"\\ H W e o l r l l o d", "+= number print(total) class strings_sum(ExerciseStep): \"\"\" Now modify the program so that it", "' ' pr...
[ "\"\"\" Follows the StackExchange best practice for creating a work queue. Basically push", "parser.add_argument(\"-q\", \"--queue\", help=\"The queue from which workers will grab tasks\") parser.add_argument(\"-t\", \"--task\", help=\"The", "task is there.\"\"\" def PushTask(client, queue, task, topic): client...
[ "to child processes. # - namespace='CELERY' means all celery-related configuration keys # should", "configuration object to child processes. # - namespace='CELERY' means all celery-related configuration keys", "unicode_literals import os from celery import Celery # set the default Django settings", "default D...
[ "<reponame>researchai/unsupervised_meta_rl<filename>src/garage/core/__init__.py from garage.core.serializable import Serializable from garage.core.parameterized import Parameterized # noqa: I100 __all__", "garage.core.serializable import Serializable from garage.core.parameterized import Parameterized # noqa: I10...
[ "level (i.e => form.as_p() doesn't have to generate any label for format field).", "generate any label for format field). This boundfield has this main goal. \"\"\"", "attribute in the form level (i.e => form.as_p() doesn't have to generate any", "label for format field). This boundfield has this main goal. \...
[ "= 500 * a + 100 * b + 50 * c if", "for b in range(B+1): for c in range(C+1): total = 500 * a", "int(input()) C = int(input()) X = int(input()) counter = 0 for a in", "* a + 100 * b + 50 * c if total ==", "range(A+1): for b in range(B+1): for c in range(C+1): total = 500 *", "= int(input()) B = int(input(...
[ ": os.popen(\"chmod +w $PWD\") else : os.popen(\"chmod -w $PWD\") while 1 : data", "= '127.0.0.1' TCP_PORT = 6262 BUFFER_SIZE = 1024 s= socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.bind((TCP_IP,TCP_PORT)) s.listen(5) conn,", "'127.0.0.1' TCP_PORT = 6262 BUFFER_SIZE = 1024 s= socket.socket(socket.AF_INET,s...
[ "request=None): return { 'token': token, 'user': UserSerializer(user, context={'request': request}).data } def get_token_from_request(request): auth", "def get_user_from_token(token): data = jwt_decode_handler(token) user_id = data.get('user_id') if user_id: try: return User.objects.get(id=user_id)", "import Us...
[ "and the following disclaimer in the documentation # and/or other materials provided with", "float(os.environ[\"ERROR_THRESH\"]) except KeyError: return 1e-2 def get_sanitize_quant_tensors(): \"\"\"Return whether tensors with quantization annotations", "# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF S...
[ "green') self.phone.place(x=0, y=340) self.allergies = Label(self.left, text=\"Allergies\", font=('arial 18 bold'), fg='black', bg='sea green')", "Label(self.left, text=\"Blood Group\", font=('arial 18 bold'), fg='black', bg='sea green') self.bg.place(x=0, y=460) self.clicked3=StringVar() self.clicked3.set(\"Sele...
[ "async def test_not_running_wallet_not_displayed(self) -> None: with tempfile.TemporaryDirectory() as tmpdir: db_filepath = os.path.join(tmpdir, \"temp.db\")", "os.path.join(tmpdir, \"temp.db\") with MonitoringDatabase(db_filepath): messages = await wallets_cmd(db_filepath) self.assertEqual(len(messages), 1) self...
[ "for root, dirs, files in os.walk(root_dir, topdown=False): for file in files: if '.ply'", "open3d.io.read_triangle_mesh(os.path.join(root, file)) out_file_name = os.path.join(root, file).replace('.ply', '_normalised.obj') center = amesh.get_center() amesh.translate(-center) maxR =", "os.walk(root_dir, topdown=...
[ "\"Jan 13, 2012\" __status__ = \"Beta\" import itertools from pymatgen.core.composition import Composition from", "for pair in pair_it: entry_charge = pair.entry_charge if adjacent_only \\ else pair[0].entry_charge entry_discharge", "list of unstable entries in the electrode, ordered by amount of the working", ...
[ "if not self._editable() : return False _ColorPlugValueDialogue.acquire( self.getPlugs() ) return True def _colorFromPlugs(", "and the following # disclaimer in the documentation and/or other materials provided with", "False ) self.confirmButton.clickedSignal().connect( Gaffer.WeakMethod( self.__buttonClicked )...
[ "('text', models.TextField(max_length=255)), ('rating', models.FloatField(default=0.0)), ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='News.author', verbose_name='User')), ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='News.cate...
[ "syntax_asdl, Id from osh import state suffix_op = syntax_asdl.suffix_op osh_word = syntax_asdl.word word_part", "[] ev._EvalWordPart(unset_sub, part_vals) print(part_vals) set_sub = word_part.BracedVarSub(syntax_asdl.token(Id.VSub_Name, 'x')) part_vals = [] ev._EvalWordPart(set_sub, part_vals)", "License. # Yo...
[ "from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blitz_api', '0019_merge_20190524_1719'), ]", "2.0.8 on 2019-05-29 16:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies =", "on 2019-05-29 16:00 from django.db import ...
[]
[ "DeepLearningModelName.DISCRETE_STOCHASTIC_ACTOR_CRITIC_MLP, DeepLearningModelName.DISCRETE_STOCHASTIC_ACTOR_CRITIC_CNN ] super(AgentDiscreteA2C, self).__init__(train_action_selector, test_and_play_action_selector, params, device) self.__name__ = \"AgentDiscreteA2C\" self.worker_id =", "critics=None): if not isin...
[ "Cog class Webhook(Cog): \"\"\" Webhook functionality \"\"\" def __init__(self, bot: Bot): self.bot =", "discord.ext.commands import Bot, Cog class Webhook(Cog): \"\"\" Webhook functionality \"\"\" def __init__(self, bot:", "class Webhook(Cog): \"\"\" Webhook functionality \"\"\" def __init__(self, bot: Bot): s...
[ "required=True) email = forms.EmailField(label='E-mail') message = forms.CharField(label='Mensagem', widget=forms.Textarea(), required=True) def send_mail(self): name =", "= forms.CharField(label='Nome', required=True) email = forms.EmailField(label='E-mail') message = forms.CharField(label='Mensagem', widget=for...
[ "self.spinner.hide() self.spinner.stop() self.friend_info.set_sensitive(True) self.save_bt.set_sensitive(True) self.close_bt.set_sensitive(True) self.generate_keys_bt.set_sensitive(True) self.copy_clipboard_bt.set_sensitive(True) def on_generate_keys_faild(self, text): self.spinner.hide() self.spinner.stop() self.f...
[ "enemy_hp = 1000 while True: # 我受到随机的攻击,减少血量 my_hp = my_hp - random.randint(0, 50)", "True: # 我受到随机的攻击,减少血量 my_hp = my_hp - random.randint(0, 50) # 敌人收到随机的攻击,减少血量 enemy_hp =", "# 敌人的血量 enemy_hp = 1000 while True: # 我受到随机的攻击,减少血量 my_hp = my_hp -", "if my_hp <= 0: # 如果我此时的血量<=0,则敌人赢了 print(\"敌人赢了\") # 退出循环 brea...
[ "busy\" class ApiResponse: def __init__(self, code: int, response_type: ApiResponseType, message): self.code = code", "\"OK\" too_busy = \"Too busy\" class ApiResponse: def __init__(self, code: int, response_type: ApiResponseType,", "\"Too busy\" class ApiResponse: def __init__(self, code: int, response_type: A...
[ "distributed on an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY", "import * from marvin.lib.utils import * from marvin.lib.base import * from marvin.lib.common import", "cmd.name=self.templatename+self.account.name+(random.choice(string.ascii_uppercase)) cmd.account=self.account.name cmd.domainid=...
[ "client.send_json({ID: 11, TYPE: \"ozw/network_statistics\"}) msg = await client.receive_json() result = msg[\"result\"] assert result[\"readCnt\"]", "ATTR_IS_FAILED, ATTR_IS_FLIRS, ATTR_IS_ROUTING, ATTR_IS_SECURITYV1, ATTR_IS_ZWAVE_PLUS, ATTR_NEIGHBORS, ATTR_NODE_BASIC_STRING, ATTR_NODE_BAUD_RATE, ATTR_NODE_GENE...
[ "line ‘three’ \"\"\") def test_strip_unsupported_characters(): assert strip_unsupported_characters(\"line one\\u2028line two\") == (\"line oneline two\")", "more <words>' '<cr><h1><h2><p><normal><op><np><bul><tab>' '<CR><H1><H2><P><NORMAL><OP><NP><BUL><TAB>' '<tAb>' ) ) == 'some words & some more", "def test_hr...
[ "\"**{0}**\".format(centred_text) print(output_string) banner_text(\"*\") banner_text(\"Always look on the bright side of life...\") banner_text(\"If life", "banner_text(\"Don't be silly chumps,\") banner_text(\"Just purse your lips and whistle - that's the", "4) output_string = \"**{0}**\".format(centred_text)...
[ "import Provider from .adapter import Adapter from .device import Device from .gatt import", "from .adapter import Adapter from .device import Device from .gatt import GattService, GattCharacteristic,", ".provider import Provider from .adapter import Adapter from .device import Device from .gatt", "<reponame>...
[]
[ "\"root://atlas-objectstore.cern.ch//atlas/eventservice/2181626927\" # + your .root filename\" \"\"\" source = \"/bin/hostname\" dest = \"root://eosatlas.cern.ch//eos/atlas/unpledged/group-wisc/users/wguan/\"", "pdict lfn = pdict.get('lfn', '') logPath = pdict.get('logPath', '') if logPath != \"\":", "gpfn.star...
[ "a variável app app = dash.Dash( __name__, external_stylesheets=external_stylesheets ) # criando uma função", "gráfico fig.update_layout(title='Gráfico Exemplo') # variável retornada pela função gera_grafico(tipo) return fig # criando", "), # onde será apresentado o conteúdo das abas logo após a callback", "a...
[ "True i += 1 return False def __is_parameter(self, pos): while self.__tokens[pos].get_value() != ';'", "pos def __find_doc_comment_before(self, pos): while self.__tokens[pos].get_value() != '\\n': pos -= 1 while pos", "+= 1 def __fix_package(self, pos): pos = self.__skip_ws_tokens(pos) while self.__tokens[pos]....
[ ":synopsis: Evasion attack using Projected Gradient Descent. .. moduleauthor:: <NAME> <<EMAIL>> \"\"\" from", "manipulated. solver_params : dict or None, optional Parameters for the solver. Default None,", "class onto the feasible domain and try again. Parameters ---------- classifier : CClassifier", "by the ...
[ "= queue_tracker_db self.email_tracker_db = email_tracker_db self.delivery_tracker_db = delivery_tracker_db def manage_queue_tracker(self, fields): \"\"\" Receive", "con.close() return result def create_db(self): self._execute_command('''CREATE TABLE IF NOT EXISTS email_tracker (client_email TEXT", "self.queue_...
[ "inputs=latents, create_graph=True ) path_lengths = torch.sqrt(grad.pow(2).sum(2).mean(1)) path_mean = mean_path_length + decay * (path_lengths.mean()", "outputs=(fake_img * noise).sum(), inputs=latents, create_graph=True ) path_lengths = torch.sqrt(grad.pow(2).sum(2).mean(1)) path_mean = mean_path_length +", "...
[ "the Neomodel OGM ## THIS SHOULD BE SET AS AN ENVIRONMENT VARIABLE IN", "used to securly sign cookies ##THIS IS SET IN DEV ENVIRONMENT FOR CONVENIENCE", "<gh_stars>0 ######################################################## FLASK SETTINGS ############################################################## #Variable u...
[ "given values (0.0, 0.0). Grids are defined from the top-left corner, where the", "the region using the longest path between the two chosen above. 4) Create", "attribute origin, and coordinates are shifted to this origin before computing their 1D", "------- ndarray A radial set of points sampling the longest ...
[ "gevent import monkey; monkey.patch_all() from pyquery import PyQuery class Proxies(): def __init__(self): self.domestic_gn_url", "def fetch_urls(self, queue, quantity): while not queue.empty(): url = queue.get() html = self.s.get(url,", "''' url_queue = Queue() need_pages = int(math.ceil(quantity/15)) # 判断类型 i...
[ ") self.builtin_policies[PegasusPreTrainedModel] = [ PegasusEncoderPolicy, PegasusDecoderPolicy, ] with suppress(Exception): from transformers.models.fsmt.modeling_fsmt import (", "parallelformers.policies.visual_bert import VisualBertPolicy self.builtin_policies[VisualBertPreTrainedModel] = [ VisualBertPolicy, ]...
[ "upper_air_humidity.py --file <ncfile> Author: <NAME> Date: 2022/01/07 \"\"\" import argparse from ncmagics import", "2022/01/07 \"\"\" import argparse from ncmagics import fetchtime, japanmap, meteotool def parse_args() ->", "return args def output_name(ncfile: str, isobaric_surface: int) -> str: \"\"\"output_...