ngram
listlengths
0
82k
[ "COMPONENT_PROPERTIES file.\"\"\" from ogs5py.fileclasses.base import BlockFile class MCP(BlockFile): \"\"\" Class", "- MINERAL_DENSITY - MOBILE - MOLAR_DENSITY - MOLAR_VOLUME - MOLAR_WEIGHT", "] ] STD = {} def __init__(self, **OGS_Config): super().__init__(**OGS_Config) self.file_ext", "\"\"\" Class for the ...
[ "assignment refs assignment = self.build_role_assignment_entity( role_id=role['id'], domain_id=domain['id'], user_id=user['id'], inherited_to_projects=True) assignment_names", "put on 'links': {'assignment': link} assignment_link = self.build_role_assignment_link(**filters) # Expand", "{ 'project_id': self.proj...
[ "author=\"<NAME>\", author_email='<EMAIL>', url='http://github.com/aaren/notedown', install_requires=['ipython', ], entry_points={ 'console_scripts': [ 'notedown =", "__version__ exec(open('./_version.py').read()) setup( name=\"notedown\", version=__version__, description=\"Convert markdown to IPython notebook.\"...
[ "complete: {:.6f}s\".format(end-start)) print(\"Courses extracted: \", len(data_to_csv)) page += 1 export_to_csv(data_to_csv)", "# Multithread only the work: # Tuning is required to", "funtion which will push it to the Cassandra Database def", "ProcessPoolExecutor, as_completed, ThreadPoolExecutor import time...
[ "def create_template( constructor, template_path: Optional[List[str]] = None, out_path: Optional[OutPath] =", "class ConvertDict(Template): module_name: str = attr.ib() @attr.s class SQLAlchemyModel(Template): module_name:", "attr.ib() entity: Entity = attr.ib() restplus_template: str = attr.ib() TypeOption:", ...
[ "def _on_selected_global_mix_mode_changed(self, mode): self.notify_global_mix_mode() @listenable_property def device_mode(self): return self._device_modes.selected_mode @listens(b'selected_mode')", "ableton.v2.base import listenable_property, listens, EventObject class ModeCollector(EventObject): def __init__(sel...
[ "corpora, models, similarities, matutils,utils from gensim.models import KeyedVectors import numpy", "word_vectors.similarity('woman', 'man') #print word_vectors.most_similar(positive=['san_francisco']) print word_vectors.most_similar(positive=['SURGICAL']) #word_vectors.similarity(testString[0],testString[1]) ''...
[ "'sword', ], 'https://m.wuxiaworld.co/': [ 'https://m.wuxiaworld.co/Reincarnation-Of-The-Strongest-Sword-God/', ], 'https://meionovel.id/': [ 'https://meionovel.id/novel/the-legendary-mechanic/', ],", "], 'http://liberspark.com/': [ 'http://liberspark.com/novel/black-irons-glory' ], 'https://webnovelindonesia.com...
[ "= {} ref_counts = {} for ref in refs: ref_dict,", "with new words in dictionary''' for word in dictionary: text", "for word in dictionary: text = text.replace(word, dictionary[word]) return text", "name = get_ref_tag_name(tag) spec_ref = get_spec_ref(text, name) text = text.replace(tag,", "name\\=.+?\\/\\>...
[ "'body:' body_lookup_pattern = body_key_prefix + '*' body_expiration = 10 #", "self._get_default(2) def _get_default(self, index) -> BodyObject: return self.__default_bodies[index] @staticmethod def", "\"\"\" return json.loads( self._scripts.update_records(keys=known_bodies_keys, args=[max_capacity, self.body_l...
[ "forms from django.utils.translation import ugettext_lazy as _ from djangocms_baseplugins.baseplugin import", "import defaults from djangocms_baseplugins.baseplugin.cms_plugins import BasePluginMixin from djangocms_baseplugins.baseplugin.utils import get_fields_from_fieldsets,", "name = _(u'Spacer') render_temp...
[ "= c / v return (h, s, v) def hsv_to_rgb(hsv):", "255. g /= 255. b /= 255. mmax = max(r,", "if np.any(rgbv > 1.): rgbv = rgbv / 255. yuv", "= 0. elif (mmax == r): hp = ((g -", "hp = ((b - r) / c) + 2 elif", "\"\"\"Convert Y'UV colors to RGB colors.\"\"\" yuvv = np.array(yuv).reshape(3, 1)", "yuv = np.do...
[ "run('ls', return_output=True) assert out == 'hello.txt\\n' out = run(['cat', 'hello.txt'],", "run, silent_run, RunError from utils.fs import in_temp_dir def test_run(capsys): with", "= run(['cat', 'hello.txt'], return_output=True) assert out == 'hello\\nworld\\n' with pytest.raises(RunError):", "out == 'hell...
[ "``http(s)`` URL. Raises: ValueError: If the input URL is not", "import absolute_import, division, print_function, unicode_literals import logging log = logging.getLogger(__name__)", "if url.startswith(\"ws:\"): reprotocoled = \"http\" + url[2:] elif url.startswith(\"wss:\"): reprotocoled", "protocol \" + url...
[ "tower_conv1_1 = slim.conv2d(tower_conv1_0, 64, 5, scope='Conv2d_0b_5x5') with tf.variable_scope('Branch_2'): tower_conv2_0 =", "2.0 (the \"License\"); # you may not use this file", "288, 3, scope='Conv2d_0b_3x3') tower_conv2_2 = slim.conv2d(tower_conv2_1, 320, 3, stride=2, padding=padding,", "activation_fn a...
[ "major, minor, patch def get_app_name(self) -> str: sw, response =", "button.right_click() # custom contracts if (len(transaction.signers) > 0 and payloads.WitnessScope.CUSTOM_CONTRACTS", "of uncompressed key return response def sign_tx(self, bip44_path: str, transaction:", "bip44_path: str, transaction: payl...
[ "long long*)address; unsigned long long old = *address_as_ull, assumed; do", "''' #if __CUDA_ARCH__ < 600 __device__ double atomicAdd(double* address, double", "long*)address; unsigned long long old = *address_as_ull, assumed; do {", "return clpy.isscalar(x) or (clpy.sparse.base.isdense(x) and x.ndim == 0) de...
[ "pytest import raises from discopy.cartesian import * def test_Box_repr(): f", "test_Function_tensor_err(): f = Function(2, 1, lambda x, y: x +", "assert str(err.value) == messages.expected_input_length(f, values) def test_Function_then(): f, g =", "Function.id(3)(1, 2, 3)\\ == Function.id(0).tensor(*(3 * [Fu...
[ "mode. nextDoc=_(\"moves to the next heading at level 5\"), #", "= ( # Translators: The label of a radio button", "if possible. # Find the next/previous focusable node. try: item", "elements list to place its own selection. def __init__(self,itemType,document): \"\"\"", "Note that parentElements will be emp...
[ "0)) design = draw.translate(design, p.position_x, p.position_y) pocket = draw.rotate(pocket, p.rotation,", "in the root directory # of this source tree or", "import numpy as np #from ... import config #if not", "design = draw.rotate(design, p.rotation, origin=(0, 0)) design = draw.translate(design, p.positio...
[ "-> [bS, max_len_header, mL_n] att_h = torch.bmm(encoded_header, self.W_att(encoded_question).transpose(1, 2)) #", "1): pr_wo_temp = [[i_op] * self.max_where_number] * bS # wv", "wvi = pr_wvi_beam_op_list[i_op][b][idxs11[0]][idxs11[2]] # idx11[0] # get wv_str temp_pr_wv_str, _", ") if show_p_wv: # p = [b, hea...
[ "loop.create_server(app.make_handler(), '127.0.0.1', 9000) logging.info('server started at http://127.0.0.1:9000...') return srv loop", "'127.0.0.1', 9000) logging.info('server started at http://127.0.0.1:9000...') return srv loop =", "def index(request): return web.Response(body=b'<h1>Awesome</h1>') async def ...
[ "np import matplotlib.pyplot as plt import flopy fb = flopy.modflow.Modflow.load('freyberg',", "colorbar=True) fb.dis.botm.plot(grid=True, colorbar=True) fb.dis.plot() plt.show() fb.dis.plot() plt.show() fig = plt.figure(figsize=(8,", "import print_function import os import numpy as np import matplotlib.pyplot"...
[ "import SampleTransformer class SampleTransformerFactory(components.Factory): name_to_class_mapping = {\"identity\": identity.IdentitySampleTransformer} __all__ =", "import identity from chia.components.sample_transformers.sample_transformer import SampleTransformer class SampleTransformerFactory(components.Facto...
[ "[] names.append('singi') names.append('lily') names.append('sam') print('I find a big dining-table,I can", "names.append('lily') names.append('sam') print('I find a big dining-table,I can invite more", "',would you like to have dinner with me ?' print(names[0]+greets)", "'fangsi') names.append('zhangqing') g...
[ "= Slurper(TEST_PACKAGE_REPO_NAME) version = slurper.get_latest_version_number(TEST_PACKAGE_REPO_NAME) package, created = slurper.get_or_create_package(TEST_PACKAGE_REPO_NAME, version)", "version) # fetch the package for testing package = Package.objects.get(title=TEST_PACKAGE_REPO_NAME)", "slurper.get_latest_v...
[ "or :class:`DayOfWeek <azure.mgmt.logic.models.DayOfWeek>` :param occurrence: The occurrence. :type occurrence: int", ":type day: str or :class:`DayOfWeek <azure.mgmt.logic.models.DayOfWeek>` :param occurrence: The occurrence.", "the MIT License. See License.txt in the project root for", "the week. Possible v...
[ "try: r = self.f(Series([])) except Exception: pass else: should_reduce =", "ares > 1: raise ValueError(\"too many dims to broadcast\") elif", "just ignore if not self.ignore_failures: raise except ZeroDivisionError: # reached", "and not self.dtypes.apply(is_extension_array_dtype).any() # Disallow complex_int...
[ "# -*- coding: utf-8 -*- \"\"\" @date: 2021/5/16 下午10:22 @file:", "== (1, 1000) def test_shufflenet(): cfg.merge_from_file('configs/benchmarks/shufflenet/shufflenet_v1_3g2x_zcls_imagenet_224.yaml') print(cfg) model = build_recognizer(cfg,", "model(data)[KEY_OUTPUT] print(outputs.shape) assert outputs.shape == (...
[ "'/out/?delimiter=%2F&max-keys=100&prefix=testsync.txt%2F', 404) def method(request): if request.headers['Content-Length'] != '3': sys.stderr.write('Did not", "gdal.Sync('vsifile.py', '/vsis3/do_not/exist', options=options) handler = webserver.SequentialHandler() handler.add('GET', '/out/', 200) handler.add('GET'...
[ "@pytest.mark.parametrize( ('input_s', 'expected'), ( (INPUT_S, EXPECTED), ), ) def test(input_s:", "lines[0].split(\",\")) for d in range(80): numbers2 = Counter({8: numbers[0], 6:", ") def test(input_s: str, expected: int) -> None: assert compute(input_s)", "= 5934 @pytest.mark.parametrize( ('input_s', 'exp...
[ "from selenium import webdriver browser = webdriver.Firefox() browser.get('http://localhost:8000') assert 'Django'", "import webdriver browser = webdriver.Firefox() browser.get('http://localhost:8000') assert 'Django' in browser.title", "selenium import webdriver browser = webdriver.Firefox() browser.get('http:...
[ "csv.reader(stdin) writer = csv.writer(stdout) for row in reader: try: row[-1]", "first_char_last_column.py Should print \"100,2\\n0,\" \"\"\" import csv from sys import", "sys import stdin, stdout def main(): reader = csv.reader(stdin) writer", "print \"100,2\\n0,\" \"\"\" import csv from sys import stdin, s...
[ "--check .\") @p.command def mypy(self) -> None: pass run(\"mypy .\")", "pass run(\"mypy .\") @p.command def generate_version(self) -> None: import toml", "typing import Any, Dict, List, Optional, Tuple from envo import", "import Path from typing import Any, Dict, List, Optional, Tuple", "build\") @p.comman...
[ "revc timedout:', e) else: print('client says: %s' % msg) srv.send('hi", "ctx = zmq.Context() srv = ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq.RCVTIMEO, 3000); while", "print('zmq socket revc timedout:', e) else: print('client says: %s' %", "= ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq...
[ "to affect non-idempotent semantic analysis behavior. TODO: It would be", "node.is_new_def): # Remove defined attributes so that they can recreated", "changes can be made in semantic analysis passes 2 and", "even though some identities are preserved. \"\"\" import contextlib from", "node.is_new_def = False ...
[ "os.getcwd() sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) # BSP dist function def dist_do_building(BSP_ROOT,", "cwd_path = os.getcwd() sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) # BSP dist function", "BSP dist function def dist_do_building(BS...
[ "select a version of the method to call based on", "name, bases, attr_dict): \"\"\"Clear out the cached locals dict once", "specs. Packages are instantiated with a particular spec, and you", "# will be the one 'wrapped'. wrapped_method = self.method_list[0][1] #", "that this works for methods other than ins...
[ "# else, OS==\"win\" 'variables': { 'config_h_dir': 'vsprojects', # crafted for", "treatment is based # on the path to the .proto", "a constant exactly). # I'm not sure how to convince", "], }, }] ], 'targets': [ # The \"lite\" lib", "# compiler itself (protoc) falls into that category. # #", "but it does...
[ "# 7*1 = 7 class Student: def __init__(self, fname): self.fname", "0) # Red rgb(0, 0, 0) # Black rgb(0, 255,", "Student: def __init__(self, fname): self.fname = fname def greet(self, fname):", "fname): return f\"Hello, {fname}\" class BatchA(Student): def __init__(self, lname): self.lname", "White rgb(255, ...
[ "front right, back left and back right sides. def containers():", "Create the a5 booklet's name a5_booklet_name = Path(input_file).stem + \"_as_a5_booklet\"", "packet = BytesIO() cover_canvas = canvas.Canvas(packet, pagesize=A4) width, height =", "= BytesIO() diary_canvas = canvas.Canvas(packet, pagesize=A5) ...
[ "= self.detect_url(target) elif type(url) != bool: raise TypeError('url kwarg must", "url flag that tells the extractor whether or not the", "self.url: raw_data = urllib2.urlopen(self.target).read().decode('utf-8-sig').rstrip() else: with open(self.target, 'r') as f:", "target = 'http://' + target host, path ...
[ "1.2e-3, # [Bohr|rad] } from pyscf.geomopt import berny_solver newmol =", "[Bohr|rad] } from pyscf.geomopt import berny_solver newmol = berny_solver.optimize(method, **conv_params)", "atom_coords = mol.atom_coords() atom_coords[atmlst] = coords / lib.param.BOHR return atom_coords", "and not g_scanner.converge...
[ "the License. from taf.foundation.utils import ConnectionCache class AUT(object): cache =", "data from AUT' ) def _create_instance(self, name, **kwargs): raise NotImplementedError(", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "from taf.foundation.utils import Conne...
[ "crypto_tools.get_param_json_data(\"alphabets.json\", lang) num_data = vigenere_str_to_list(data, vigenere_dict) num_key = vigenere_str_to_list(key, vigenere_dict)", "val in num_result: result_str += vigenere_dict[val] return result_str @crypto_tools.file_manipulation() def", "and encrypt != \"decrypt\": raise ...
[ "unused_contexts or not index_contexts: result |= context.py__getitem__( ContextSet(unused_contexts), contextualized_node )", "ContextName(self, wrapped_name.tree_name) else: from jedi.evaluate.compiled import CompiledContextName return CompiledContextName(self, wrapped_name.string_name)", "ContextSet(unused_co...
[ "import Tuple import click from .cmd import KiwiCommandType, KiwiCommand from", "nargs=-1, ) @click.argument( \"compose_cmd\", metavar=\"COMMAND\", ) @kiwi_command( short_help=\"Run docker-compose command\",", "\"compose_cmd\", metavar=\"COMMAND\", ) @kiwi_command( short_help=\"Run docker-compose command\", # i...
[ "True): n1 = e.node1 n2 = e.node2 if n1 ==", "prop): return prop in self.props class Node(PropertyContainer): pass class Edge(PropertyContainer):", "property\".format(Network.FRIEND_PROP)) for e in self.edges: if (e.node1 is person1 and", "is a string argument\".format(Network.NAME_PROP)) for n in self.nodes:...
[]
[ "def countAndSay(self, n): def gen(s): return \"\".join(str(len(list(g))) + k for", "= \"1\", 1 while i < n: s = gen(s)", "class Solution: def countAndSay(self, n): def gen(s): return \"\".join(str(len(list(g))) +", "import groupby class Solution: def countAndSay(self, n): def gen(s): return", "in groupby(s...
[ "+ '/bert_config.json' ckpt_name = model_dir + '/bert_model.ckpt' vocab_file = model_dir", "= model_dir + '/vocab.txt' # gpu使用率 gpu_memory_fraction = 0.32 #", "base dir projectdir = str(pathlib.Path(os.path.abspath(__file__)).parent.parent) sys.path.append(projectdir) # path of BERT", "= model_dir + '/bert_co...
[ "3, np.nan, 1, 4], [2, np.nan, 1, 3, 4, np.nan]", "from hidrokit.prep import read import numpy as np import pandas", "'F'] ) A_date = A.set_index(pd.date_range(\"20190617\", \"20190619\")) res_A_number = {'A': [1],", "= pd.DataFrame( data=[ [1, 3, 4, np.nan, 2, np.nan], [np.nan,", "A = pd.DataFrame( data=[ ...
[ "department_blueprint = Blueprint('department', __name__, url_prefix=url_prefix) department_controller = DepartmentController(request) @department_blueprint.route('/', methods=['GET'])", "= DepartmentController(request) @department_blueprint.route('/', methods=['GET']) @Auth.has_permission('view_department') @swa...
[ "g.compile(loss=loss_mse_ssim, optimizer=optimizer_g) lr_controller = ReduceLROnPlateau(model=g, factor=lr_decay_factor, patience=10, mode='min', min_delta=1e-4, cooldown=0,", "+ '%d.png' % iter) plt.close() else: if validate_num < validate_path.__len__():", "<reponame>ikecoglu/DL-SR import argparse from keras ...
[ "that users can still interact with the chart during the", "<filename>catalyst/exchange/live_graph_clock.py import pandas as pd from catalyst.constants import LOG_LEVEL from", "using the 'animate' callback of Matplotlib. We need to direct", "which is a wrapper around time.sleep() used in the SimpleClock.", ...
[ "print(\"Resultado: Fallido\") print(\"Nombre del test: \" + inspect.currentframe().f_code.co_name) print(\"Descripcion: Usuario", "el detalle de la tarea\") print(\"-----------\") def test_create_task_with_authenticated_user(self): self.client.login(username='test_user', password='<PASSWORD>')", "usuario no au...
[ "from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/seidel-2d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/seidel-2d/tmp_files/6745.c') procedure('kernel_seidel_2d') loop(0) known(' n", "destination('...
[ "async with aiohttp.ClientSession() as client: async with client.post( url, data=data,", "return await request(f'{base_url}/sendMessage', payload) async def answer_callback_query( base_url, callback_query_id, text,", "Check response status json_response = await resp.json() return json_response async", "aiohtt...
[ "Platform from nautobot_device_onboarding.exceptions import OnboardException from nautobot_device_onboarding.helpers import onboarding_task_fqdn_to_ip from", "(c) 2020-2021 Network To Code Licensed under the Apache License,", "DeviceRole.objects.create(name=\"Firewall\", slug=\"firewall\") self.platform1 = Plat...
[ "= struct.unpack(\"<Q\", h)[0] w = file.read(8) w = struct.unpack(\"<Q\", w)[0]", "img = np.array([r,g,b]).transpose(1,0).reshape(h,w,c) print(img.shape) plt.imshow(img) plt.show() def read_label(path, ground_truth=None): with", "file: n = file.read(8) n = struct.unpack(\"<Q\", n)[0] c =", "print(len(label)) ...
[ "self.assertRaises(ValueError, PiezoTensor.from_voigt, bad_voigt) self.assertArrayEqual(self.voigt_matrix, pt.voigt) if __name__ == \"__main__\": unittest.main()", "3)) self.assertRaises(ValueError, PiezoTensor, bad_dim_array) def test_from_voigt(self): bad_voigt = np.zeros((3, 7))", "Team. # Distributed under ...
[ "\"\"\"Checks access of instance files on the host. :param instance:", "NotImplementedError() def host_power_action(self, action): \"\"\"Reboots, shuts down or powers up", "context: security context :instance: instance object that was migrated :block_device_info:", "%s\", str(event)) return if not isinstance(...
[ "= 0 elif self.whisperAvatarId: self.chatMgr.sendWhisperString(text, self.whisperAvatarId) self.whisperAvatarName = None self.whisperAvatarId", "self.whisperAvatarId = None self.toPlayer = 0 elif self.whisperAvatarId: self.chatMgr.sendWhisperString(text, self.whisperAvatarId)", "0.71) self.whisperAvatarName = N...
[ "log.fit(features, label) _ = joblib.dump(log, pkl, compress=9) if __name__ ==", "Only computes a batch-wise average of precision. Computes the precision,", "DNN will be saved. :return: None ''' model = Sequential()", "precision(y_true, y_pred): \"\"\"Precision metric. Only computes a batch-wise average of", ...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "TaskState.Value('TASK_KILLED') self.callback_called = True mock_time = mock.Mock(spec=time) status_manager = StatusManager(checker,", "# # Licensed under the Apache License, Version 2.0 (the", "compliance with the License...
[ "to the principal impact direction. for veh_striking in veh_striking_list: if", "conservation. veh_y1 = veh_k[0] ** 2 / (veh_a1 ** 2", "+ np.pi / 2)) veh_RDS = V1_v * np.sin(delta_angle_2) veh_e", "+ veh_m[1] * veh_y2) delta_v2 = (1 + veh_e) *", "= np.abs(veh_cgs[0] - veh_striking[3]) veh_RDS = np.abs(V2_v ...
[ "randomly per batch ('NV')\", ) parser.add_argument( \"--freeze_enc\", action=\"store_true\", default=None, help=\"Freeze", ") # (SB, NS, 3, H, W) src_poses = util.batched_index_select_nd(all_poses,", "= util.args.parse_args(extra_args, training=True, default_ray_batch_size=128) device = util.get_cuda(args.gpu_...
[ "import QtPluginSorter from .qt_plugin_report import QtPluginErrReporter # TODO: add error", "= ['-m', 'pip', 'install', '--upgrade'] if running_as_bundled_app() and sys.platform.startswith('linux'): cmd", "return # including summary here for sake of filtering below.", "output_widget self.process.setParent(ou...
[ "= ('create_partial_webhook_from_id', ) from scarletio import export from ..core import", "channel's identifier. Defaults to `0`. Returns ------- webhook : ``Webhook``", "given `webhook_id` already exists, then returns that instead. Parameters ----------", "a partial webhook from the given parameters. If the ...
[ "'c': 3, 'd': 2, 'e': 1, 'f': 4, 'g': 2,", "def getWordScore(word, n): \"\"\" Returns the score for a word.", "is worth 3, D is worth 2, E is worth", "0 \"\"\" total_points = 0 for letter in word: total_points", "if all n letters are used on the first turn.", "total_points += SCRABBLE_LETTER_VALUES[letter...
[ "row in data: f = open(filename+'.tex','r+') old = f.readlines() if", "f.writelines(old[offset:]) f.close() # Compilar arquivo LaTeX try: os.system('pdflatex '+filename+'.tex') os.system('mv", "# Compilar arquivo LaTeX try: os.system('pdflatex '+filename+'.tex') os.system('mv '+filename+'.pdf '+filename+'_'+row...
[ "\"r\", chunk_size=chunk_size) as f: for chrom in f.get_chromosomes(): print(f\"{chrom}: {f[chrom].get_number_of_chunks()}\")", "import Path from meth5.meth5 import MetH5File def main(m5file:Path, chunk_size:int, quiet:bool):", "from pathlib import Path from meth5.meth5 import MetH5File def main(m5file:Path,", ...
[ "for this year filepatt = \"quev-a-{}{}-*.tif\".format(region, year2) globpatt = os.path.join(indir,", "quarter = args.quarter # region list (LAEA regions only) valid_region_list", "means: {}\".format(dst_path)) dst_ds = driver.Create(dst_path, nx, ny, 1, gdal.GDT_Float32) dst_data", "= dbmean.max() dbmean_me...
[ "', end='') termo += razão cont += 1 print('Pausa') mais", "cont += 1 print('Pausa') mais = int(input('Quantos termos você quer", "priemiro termo da PA: ')) razão = int(input('Digite a razão", "a razão da PA: ')) termo = primeiro cont =", "while mais != 0: total += mais while cont <=", "= int(input('Digit...
[ "- handle DataObject(\\'{data_object.name}\\')') else: self.logger.info(f'ObjectHandler - [root] handle DataObject(\\'{data_object.name}\\')') values", "\\'{results[value.name]}\\'' ) else: error = f'ObjectHandler - invalid value type", "results[value.name] = self.__handle_value(value.query, node) if results[va...
[ "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO", "\"datetime\": str_to_datetime(utc_to_local(create_info_ret[0]['created_at'])), \"status\": DataTraceFinishStatus.STATUS, \"status_alias\": DataTraceFinishStatus.STATUS_ALIAS, } ) return [create_trace_dict]", "substantial portions o...
[ "Doc2Vec import gensim.models.doc2vec from collections import OrderedDict import multiprocessing from", "alldocs if doc.split == 'test'] #doc_list = alldocs[:] # for", "# # with open('/'.join([dirname, output]), 'w') as n: # n.write(temp_norm)", "f.write(num_line) # #SentimentDocument = namedtuple('SentimentD...
[ "range(10)] self.assertEqual(Task.find(5).id(), 5) self.assertEqual(Task.find(5), tasks[5]) if __name__ == '__main__': unittest.main()", "<gh_stars>1-10 import unittest from caravan.task import Task from caravan.tables import", "[Task.create(\"echo %d\" % i) for i in range(10)] self.assertEqual(Task.find(5).id(...
[ "self.get(\"allowed_domains\", default=None) if allowed_domains is not None: return allowed_domains.split(',') def", "self._get_bool(\"response_body\", defaults.RESPONSE_BODY_ENABLED) def get_request_body(self): return self._get_bool(\"request_body\", defaults.REQUEST_BODY_ENABLED) def get_images(self): return", ...
[ "r = s/3 print(r) # code.... ''' def average(): a=1", "s/3 print(r) # code.... ''' def average(): a=1 b=2 c=3", "a=1 b=2 c=3 s=a+b+c r=s/3 print(r) average() ''' ''' #input", "#parameter #argument def average(a,b,c): s=a+b+c r=s/3 print(r) average(10,20,30) ''' def", "average(a, b, c): s = a+b+c r = s/3 ret...
[ "python # runs after the job (and after the default", "start, end and strand columns.\") error_map[name] = error_msg data_param_names.add( name", "param in page_param_map.items(): if isinstance( param, DataToolParameter ): # for", "not None: dbkeys.add( param_values[name].dbkey ) data_params += 1 # check", ...
[ "self.sync_all() assert(len(self.nodes[0].listtransactions(\"watchonly\", 100, 0, False)) == 0) check_array_result(self.nodes[0].listtransactions(\"watchonly\", 100, 0,", "send_to = { self.nodes[0].getnewaddress() : 0.11, self.nodes[1].getnewaddress() : 0.22, self.nodes[0].getaccountaddress(\"from1\")", "0, Fal...
[ "Invalid entry lines.append(line) continue if comps[1] == name or comps[0]", "comps[1] == name and comps[0] == device: continue else: if", "automaster(config) if name not in contents: return True # The", "comps = re.sub(r\"\\s+\", \" \", line).split() nod = __salt__['cmd.run_stdout']('ls -l", "{1}\" raise C...
[ "obj.created_by: obj.created_by = request.user return super().save_model(request, obj, form, change) class", "class PhotoAdmin(EONBaseAdmin): # TODO Add Proper List Display pass admin.site.register(Topic,", "from base.models import Topic, Photo class EONBaseAdmin(admin.ModelAdmin): def get_changeform_initial_da...
[ "django.db import models from django.utils.translation import ugettext_lazy as _ class", "########################################################################## from django.db import models from django.utils.translation import ugettext_lazy as", "TERENA by <NAME>, DAASI International GmbH, http://www.daasi....
[ "logger.info('KeyboardInterrupt received, ending...') self.alive = False if self.core.useHotReload: self.dump_login_status() logger.info('Bye.')", "except_self(self, chats_or_dicts): \"\"\" 从聊天对象合集或用户字典列表中排除自身 :param chats_or_dicts: 聊天对象合集或用户字典列表 :return: 排除自身后的列表 \"\"\"", "loginCallback=login_callback, exitCal...
[ "up configuration variables __all__ = ['custom_viewer', 'qglue', 'test'] import os", "detect # the default excepthook is in place and override", "configuration file from .config import load_configuration env = load_configuration() from", "import MatplotlibBackendSetter sys.meta_path.append(MatplotlibBackendSe...
[]
[ "Use our new middleware instead of the old one classes", "will eventually be backported into the main settings file, but", "classes.remove(mw) else: log.warning('Failed to remove middleware: %s', mw) return classes", "them to be able to run the site with the", "'readthedocs.proxito.urls' USE_SUBDOMAIN = Tru...
[ "0, 0, 1, 1, 1] clf = GridSearchCV(estimator=SGDClassifier(loss='hinge'), param_grid=param_grid, cv=3)", "by fits # to individual folds will be caught and", "predict def score(self, X=None, Y=None): if self.foo_param > 1: score", "def test_grid_search_groups(): # Check if ValueError (when groups is None)", ...
[ "Generated by Django 3.2.7 on 2021-09-13 03:52 import uuid from", "POS?\", max_length=100)), ], options={ \"ordering\": [\"-zettle_created\"], \"get_latest_by\": [\"zettle_created\"], }, ),", "the total amount which is VAT\", max_digits=12, ), ), (", "models.DecimalField( decimal_places=2, help_text=\"The par...
[ "== \"=\": sub += next_char new.append(next_char) return sub new.append(lexer.get_char()) return", "* 4 - 2 do skip endwhile else x :=", "endif; y := 1\" input_string = line.strip(\"\\n\") lexer = Lexer(input_string)", "current char. curr_char = lexer.get_char() while (curr_char != None): while", "lexer)) c...
[ "sys sys.path.append('/usr/local/lib/python3.4/site-packages/') from warc_dedup import deduplicate def main(): if len(sys.argv)", "sys.path.append('/usr/local/lib/python3.4/site-packages/') from warc_dedup import deduplicate def main(): if len(sys.argv) ==", "if len(sys.argv) == 1: raise Exception('Please provi...
[ "url = append_fred_token(url) result = requests.get(url) return result.text GEOFRED_SERIES_META_URL =", "xmltodict.parse(curve.content) # This is based around retrieving the n last", "f'{url}&api_key={token}' FRED_SERIES_OBS_URL = FRED_BASE_URL + 'series/observations?' def fred_series(series, file_type=None, re...
[ "webhook verify token can be set here, if set as", "change various variables here to customize and set up the", "Mattermost server '''----------------------------Flask Configuration----------------------------''' #set external IP for the Flask", "as a String mm_channel = None #Set a custom Username", "custo...
[]
[ "import matplotlib.pyplot as plt import cv2.cv2 as cv from functools", "= np.min(img) pmax = np.max(img) img = ((img - pmin)", "# -*- encoding:utf-8 -*- # @Time : 2021/1/3 15:15 #", "for det_cls in result] result = np.vstack(result) _, ids =", "= 0 image_name = '.' # '.' is surely exist,", "encoding:utf-8...
[ "\"\"\"get the margin of the movement\"\"\" self._check_open() return num(self.api.css1(\"span.cfd-order-info-item-value\").text) def", "dom = self.browser return expect(dom.is_element_present_by_css, args=[css_path]) def elXpath(self, xpath, dom=None):", "True elif title == \"Maximum Quantity Limit\": raise ex...
[ "finishes, all files injected will be truncated to zero length.", "is specified \"spec.containers[2]\" (container with index 2 in this pod).", "be set by external tools to store and retrieve arbitrary", "sourceStrategy holds the parameters to the Source build strategy. type:", "30 seconds, the Kubelet will ...
[ "element break else: logger.info(\"region_code NOT found\") return_info = \"Region code", "'statusCode': str(status_code), 'body': json.dumps(message_body), 'headers': { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*'", "str(status_code), 'body': json.dumps(message_body), 'headers': { 'Co...