ngram
listlengths
0
82k
[ "k8s_client.delete_cluster_role_binding(crb_name) print(f\"\\nsuccessfully deleted: {crb_name}\") except Exception as e: print(f\"\\n{shipper_name} cluster", "namespace=namespace) elif dep['kind'] == 'Deployment': k8s_client = client.AppsV1Api() k8s_client.create_namespaced_deployment(body=dep, namespace=namespac...
[ "os.environ.get(\"NATLAS_AGENT_ID\") or None # Authentication token that agents can use", "for local development # Necessary to test versioned host data", "to scan local addresses? # By default, agents protect themselves", "Used for database lookup and stored in scan output self.agent_id", "data templates b...
[ "new_lc['fluxerr'][band_cut] = np.sqrt((error_floor*max_flux_in_band)**2+data.fluxerr[band_cut]**2) new_lc = Table(new_lc, meta=lc.meta) return new_lc def", "= (3000, 7000) if model_name=='salt2' else None save_path = os.path.join(save_dir,", "= os.path.join(save_dir, '{}.pkl'.format(name)) try: minuit_result, ...
[ "msg): inputs['C2.x'] = bad_val # assign list to array inputs['C2.x']", "promotes=['*']) g2.add_subsystem('C1', ExecComp('b=2*a'), promotes=['a', 'b']) model = Group() model.add_subsystem('G1', g1,", "Group() g1.add_subsystem('Indep', indep, promotes=['a', 'x']) g2 = g1.add_subsystem('G2', Group(), promotes=['*...
[ "in database.\"\"\" res = pd.read_sql(\"select name from sqlite_master\", connection) return", "and predictions.\"\"\" db_name = f'{sample}.db' db_path = os.path.join(config.DATADIR, db_name) conn", "index=False) conn.execute(f\"create index idx_{tbl}_user_id on {tbl}(user_id)\") def main(argv=None): if argv", ...
[ "time.sleep(3) task() api.text = \"ok\" r = api.requests.get(api.url_for(route)) assert r.ok", "== dump def test_background(api): @api.route(\"/\") def route(req, resp): @api.background.task def", "view(req, resp): raise ValueError r = api.requests.get(api.url_for(view)) assert not r.ok", "resp): resp.media =...
[ "test.Y, batch_size = BATCH_SIZE) try: np.savetxt(\"nlpd_meanvar.csv\", nlpd_meanvar, delimiter=\",\") # N", "period = 144) ]) for i in range(output_dim)] k_f =", "leave f independent # order of block_struct is rows, node", "-*- coding: utf-8 -*- \"\"\" Script to execute example covarying", "model class pre...
[ "self.sut.get_position() # Test self.sut.left(1.0, 2.0) # Assert duration = 1.0", "Assert self.param_mock.set_value.assert_has_calls([ call('stabilizer.controller', '2') ]) def test_that_take_off_raises_exception_if_not_connected( self, sleep_mock): #", "'1'), call('kalman.resetEstimation', '0') ]) def test_tha...
[ "2008. \"\"\" from __future__ import print_function from __future__ import division", "pos tags set if pos is None: pos = {'NOUN',", "__future__ import absolute_import from onmt.keyphrase.pke.unsupervised import SingleRank from onmt.keyphrase.pke.base import", "for input_file, similarity in expanded_documents...
[ "from aws_cdk import core from fagate_serverless.fagate_serverless_stack import FagateServerlessStack app =", "#!/usr/bin/env python3 from aws_cdk import core from fagate_serverless.fagate_serverless_stack import FagateServerlessStack", "import core from fagate_serverless.fagate_serverless_stack import FagateSe...
[ "\"dash[celery]\"\\n\"\"\" ) from missing_imports if not isinstance(celery_app, celery.Celery): raise ValueError(\"First", "is None: self.clear_cache_entry(key) else: if self.expire: # Set/update expiration time", "json.loads(result) # Clear result if not caching if self.cache_by is", "if job is None: return ...
[ "credentials: None :param str base_url: Service URL \"\"\" def __init__(self,", "the MIT License. See License.txt in the project root for", "._configuration import TokenApiClientConfiguration from .operations import BotSignInOperations from .operations import", "self.config, self._serialize, self._deserialize...
[ "of test_sample.py def inc(x: int) -> int: return x +", "content of test_sample.py def inc(x: int) -> int: return x", "test_sample.py def inc(x: int) -> int: return x + 1", "# content of test_sample.py def inc(x: int) -> int: return" ]
[ "from django.db import migrations from saleor.order import OrderStatus def match_orders_with_users(apps,", "3.0.4 on 2020-04-06 09:56 from django.db import migrations from saleor.order", "OrderStatus def match_orders_with_users(apps, *_args, **_kwargs): Order = apps.get_model(\"order\", \"Order\") User", "mat...
[ "regex_pattern.split(text, 1) else: # find_mode == 'all' return regex_pattern.split(text) for", "\"\" else: return result.group() else: # find_mode == 'all' return", "elif pattern == 'user_dictionary': raw_pattern = user_pattern_dict.get(user_dict_pattern) if raw_pattern is", "transformation_mode == 'extract'...
[ "= '24h' else: raise ValueError(\"Invalid `freq` argument value: {}\".format(freq)) if", "norm_start is None: norm_start = in_dataframe.index[0] if norm_end is None:", "e = pd.Series(index=dd.index, dtype='float64')#, dtype='datetime64[ns]') #e[~np.isnan(tmp)] = dd.index[tmp[~np.isnan(tmp)].astype(int)] # @TCC"...
[ "Kratos import KratosMultiphysics import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication import KratosMultiphysics.CSharpWrapperApplication as", "BEGIN VALIDATION SUITE ### # For very long tests that", "o test_classes to create the suits ## SMALL TESTS ##", "a test suit wit...
[ "from sqlalchemy.orm import relationship from .database import Base class Post(Base):", "\"codes\" id = Column(Integer, primary_key=True, nullable=False, index=True) code = Column(Integer,", "= \"codes\" id = Column(Integer, primary_key=True, nullable=False, index=True) code =", "image = Column(String) owner_...
[ "import request app=Flask(__name__) app.config['MONGO_DBNAME']='stud' app.config['MONGO_URI']='mongodb://localhost:27017/stud' mongo=PyMongo(app) \"\"\" @app.route('/add') def add():", "in data.find(): record.append({\"Rollnumber\":rec[\"Rollnumber\"],\"StudentName\":rec[\"StudentName\"],\"Address\":rec[\"Address...
[ "accessibility_viewpoint_hearing, accessibility_value_green, accessibility_value_red): \"\"\" Resource is wheelchair accessible, not hearing", "level=UnitAuthorizationLevel.manager) return user @pytest.mark.django_db @pytest.fixture def general_admin(): return get_user_model().objects.create( username='test_gener...
[ "data.find(' INCLUDE(CAM_INTF_META_HISTOGRAM') end = data.find('} metadata_data_t;') data = data[start:end] metadata", "foo[0].replace('INCLUDE', 'PRINT') metalist.append(foo[0] + \", pMetadata);\") with open('list.txt', 'w') as", "pMetadata);\") with open('list.txt', 'w') as f: for item in metalist:", "end =...
[ "result += t return result A, B = map(int, input().split())", "(2 * n) * n + max(A % (2 *", "- 1, t)) % 2 == 1: result += t", "// (2 * n) * n + max(A % (2", "def g(A, n): if A == -1: return 0 return", "if (g(B, t) - g(A - 1, t)) % 2", "result = 0 for i in range(48): t = 1", "t return result A, B = map...
[ "logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) self.logger.addHandler(ch) '''", "- %(message)s') ch.setFormatter(formatter) self.logger.addHandler(ch) ''' logger = MyLog(\"test\",\"log\\\\text.txt\") logger.logger.debug('debug message')", "logging.handlers ...
[ "fiesta.views import views from rest_framework.urlpatterns import format_suffix_patterns # \"http://django-sdmx.org/wsrest/\" #", "import format_suffix_patterns # \"http://django-sdmx.org/wsrest/\" # \"http://django-sdmx.org/ws/\" register_converter(converters.ResourceConverter, 'res') register_converter(converte...
[ "while len(array) > 0: item = array.pop(0) if item ==", "item = array.pop(0) if item == 0 and not type(item)", "new_array = [] new_index = 0 while len(array) > 0:", "len(array) > 0: item = array.pop(0) if item == 0", "end, preserving the order of the other elements. def move_zeros(array):", "# Write an al...
[ "data = { '_name': tag_name, '_attrs': attrs or [], '_value':", "addr_data['address'] = address return addr_data def construct_transaction_data(ctransfer, transaction): transaction_information =", "'PmtInf'] message['header'] = construct_header(ctransfer) message['payment_information'] = construct_payment_infor...
[ "= selector_size*4 window = Window (window_size,window_size,selector_map,selector_size,selector_size) # set actions here", "Window (window_size,window_size,selector_map,selector_size,selector_size) # set actions here from functools import partial", "\"',something,'\"'))) window.actions[D.NW] = partial (say,'nor...
[ "serializers.CharField(max_length=140) slug_name = serializers.CharField(max_length=40, validators=[UniqueValidator(queryset=Circle.objects.all())]) about = serializers.CharField(max_length=255, required=False) def", "= serializers.CharField() slug_name = serializers.SlugField() rides_taken = serializers.IntegerF...
[ "import _dictdraw, sys d = {} surface = _dictdraw.draw_dictionary(d, [4])", "<gh_stars>10-100 import _dictdraw, sys d = {} surface = _dictdraw.draw_dictionary(d,", "_dictdraw, sys d = {} surface = _dictdraw.draw_dictionary(d, [4]) surface.write_to_png(sys.argv[1])" ]
[ "chunk = list(chunks(proxies, 10)) print(\"\") print_status(\"Video complaint attack is on!\\n\")", "ret == \"n\"): print_status(\"Please have a maximum of 50 proxies", "import print_status from libs.utils import parse_proxy_file from libs.proxy_harvester import find_proxies", "ret = ask_question(\"Would you ...
[ "= ansatz.qubits if isinstance(hamiltonian, openfermion.DiagonalCoulombHamiltonian): one_body = hamiltonian.one_body elif isinstance(hamiltonian,", "'ansatz, trotter_algorithm, order, hamiltonian, atol', [ (SwapNetworkTrotterAnsatz(diag_coul_hamiltonian, iterations=1), LINEAR_SWAP_NETWORK, 1,", "time evolution ...
[ "not value model.setData(index, to_qvariant(value)) return elif value is not np.ma.masked:", "btn_layout = QHBoxLayout() btn_layout.setAlignment(Qt.AlignLeft) btn = QPushButton(_( \"Format\")) # disable", "of a column without loading more, # so we can", "self._data[j] else: value = self._data[i, j] return sel...
[ "= self._client.transport.perform_request('GET', '/_alias/' + alias) assert name in resp assert", "pattern = self.default_pattern() name = alias + \"-\" + pattern", "indices=[], policies=[]): indices = list([x for x in indices if", "alias): resp = self._client.transport.perform_request('GET', '/_alias') for n...
[ "\"\"\" Collects the data points that are within the bounds", "need to reproduce the first point as the last point.", "self.width, self.height) gc.set_stroke_color(self.effective_edge_color) gc.set_line_width(self.edge_width) gc.set_line_dash(self.edge_style_) gc.set_fill_color(self.effective_face_color) gc.lin...
[ "REMEMBER_COOKIE_DURATION = timedelta(days=1) SQLALCHEMY_TRACK_MODIFICATIONS = False SECRET_KEY = \"\" API_TOKEN", "= \"https://invest-public-api.tinkoff.ru/rest/\\ tinkoff.public.invest.api.contract.v1.MarketDataService/GetLastPrices\" SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, '..', 'webapp....
[ "IN THE SOFTWARE. \"\"\" import os import logging import math", "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO", "OTHER DEALINGS IN THE SOFTWARE. \"\"\" import os import logging", "mappings gene_names=store.Names(config.gene_family_name_mapping_file) delimiter=config.output_file...
[ "for i in range(0,3): num1 = int(input('Enter first number: '))", ")) t1 = threading.Thread(target=take_numbers, args=(q, )) t2.start() t1.start() t2.join() t1.join()", "results.append(num1+num2) results2.append(num1-num2) q = Queue() t2 = threading.Thread(target=add_num, args=(q, ))", "t2.join() t1.join() q....
[ "* n for i in range(m): for j in range(n):", "输入: m = 3, n = 2 输出: 3 解释:", "Solution: def uniquePaths(self, m: int, n: int) -> int: dp", "条路径可以到达右下角。 1. 向右 -> 向右 -> 向下 2. 向右 ->", "链接:https://leetcode-cn.com/problems/unique-paths ''' class Solution: def uniquePaths(self, m: int, n: int)", "输入: m = 7, n = 3...
[ "not None: labels = labels[: self.amount] return [ Graph(x=x, a=a,", "e=e, y=y) for x, a, e, y in zip(x_list, a_list,", "the data (-1, to use all available cores). \"\"\" url", "[1, 6, 7, 8, 9] BOND_TYPES = [1, 2, 3,", "debugging). - `n_jobs`: number of CPU cores to use for", "atomic_num = label_to_one_ho...
[ "if cpx.switch: print(\"Slide switch off!\") cpx.pixels.fill((0, 0, 0)) continue else:", "G = 0 B = 0 x, y, z =", "= G + abs(int(y)) if z: B = B +", "if z: B = B + abs(int(z)) cpx.pixels.fill((R, G, B))", "abs(int(x)) if y: G = G + abs(int(y)) if z:", "blue, at levels related to the x, y and z", "x, y a...
[ "and i<100: name = '0'+str(i) elif i>=100: name = str(i)", "car1_long_pos 3 car1_long_vel 4 car1_lateral_pos 5 car1_lateral_displacement 6 car2_long_pos 7", "mpl import matplotlib.patches as patches def load_data(file_name, car_flag): if car_flag", "'data_'+str(i)+'_1.txt' file_name_2 = 'data_'+str(i)+'_2.txt...
[ "equityClass == EquityClass.LIABILITY: equityType = self.uns.request_enum(LiabiltyType) else: raise Exception(f\"Unknown equity", "relevant_mos = self.uns.request_int(\"Number of past months: \") account = dsvca.account_by_name(accountName)", "equityName) def record_value(self): accountName = self.uns.request_f...
[ "the interceptor from SnapSearch import Client, Detector, Interceptor interceptor =", "django WSGI application from django.core.wsgi import get_wsgi_application application = get_wsgi_application()", "deploy the interceptor from SnapSearch.wsgi import InterceptorMiddleware application = InterceptorMiddleware(ap...
[ "a directory'.format(ent, dst)) fulltarg = os.path.join(targdir, dst) for targ in", "if not ent: continue if ent in ('APPENDONCE:', 'MERGE:', 'REPLACE:'):", "optparts = v.split() v = optparts[0] optparts = optparts[1:] else:", "tempfile.mkdtemp('.syncto{}'.format(node)) output = '' try: for ent in sl.replacem...
[ "[0, 20000] Q = 0.5*rho*V**2 # Drag model if M", "Drag model if M < 0.93: Cd0 = 0.02 elif", "gamma, = state.ravel() a = control # temperature if y", "if y <= 11000: Tmp = 288.16 - 0.0065*y else:", "= 33000 elif t < self.t2: m = 113.205 -", "90.035 T = 0 # density and dynamic pressure rho", "density and ...
[ "train_set, holdout_set = torch.utils.data.random_split(full_data, [len_train, len(full_data) - len_train] ) validation_set", "range(input_size): for j in range(input_size): inp = torch.zeros(2 * input_size)", "# Copyright (c) Facebook, Inc. and its affiliates. # This", "Copyright (c) Facebook, Inc. and its a...
[ "algorithm https://www.nayuki.io/page/next-lexicographical-permutation-algorithm \"\"\" def next_lexo(S): b = S[-1] for i,", "+ 1] + sorted(F[-i + 1 :]) return \"\".join(F) else:", "F[: -i + 1] + sorted(F[-i + 1 :]) return", "= F[: -i + 1] + sorted(F[-i + 1 :])", "\"\"\" Next lexicographical permutation alg...
[ "filename) with open(filepath) as file: contracts_summary = json.loads(file.read()) if msg:", "int number\") if s < MIN_VAL or s > MAX_VAL:", "as file: contracts_summary = json.loads(file.read()) if msg: print(f'Config file retrieved", "bool = True): if msg: print('Retrieve config file...') filename =", "tr...
[ "commands auto generated by Alembic - please adjust! ### op.create_table(", "please adjust! ### op.drop_table(\"topics\") # ### end Alembic commands ###", "used by Alembic. revision = \"816ea3631582\" down_revision = \"<KEY>\" branch_labels", "- please adjust! ### op.drop_table(\"topics\") # ### end Alembic c...
[ "character != '.': break level += 1 return _bootstrap._gcd_import(name[level:], package,", "'invalidate_caches'): finder.invalidate_caches() def find_loader(name, path=None): \"\"\"Find the loader for the", "the full Python module import sys from . import machinery", "to the finders. None is returned if no lo...
[ "def __init__(self, img: PImage.Image): self.img = img \"\"\"The wrapped pillow", "def thumbnail(self, *args, **kwargs): \"\"\"Convert this image into a thumbail.", "None, image: Optional[Image] = None, ) -> Image: \"\"\"Apply color", "* np.sin(2*y* np.pi) img = image.colorramp(values) First this function wil...
[ "enc, dec = False, False @yaml_info(yaml_tag_ns='yaml.tests') class FooLegacy(YamlAble): # __yaml_tag_suffix__", "e.dumps_yaml() def test_abstract_parent(): \"\"\"This tests that we can define an", "return vars(self) == vars(other) # instantiate f = FooValid(1, 'hello')", "(StringIO is one) StringIO.close(sel...
[ "@param name: The child resource @type name: C{bytes} @return: A", "issuer, k, v): \"\"\"Remote version of setHeader; same interface.\"\"\" self.setHeader(k,", "and contentType is None and self.defaultContentType is not None and", "The root of the resource hierarchy. All request traversal for", "the resourc...
[ "= create_bitcoinish_network( symbol=\"DOGE\", network_name=\"Dogecoin\", subnet_name=\"mainnet\", wif_prefix_hex=\"9e\", address_prefix_hex=\"1e\", pay_to_script_prefix_hex=\"16\", bip32_prv_prefix_hex=\"<KEY>\", bip32_pub_prefix_hex=\"<KEY>\")", "import create_bitcoinish_network network = create_bitcoinish_netw...
[ "# merge new number into hamming set hamming = hamming.union(new_hamming)", "for i in hamming: new_hamming.add(i * 2) new_hamming.add(i * 3)", "hamming: new_hamming.add(i * 2) new_hamming.add(i * 3) new_hamming.add(i * 5)", "3.5: new_hamming = {1} for i in hamming: new_hamming.add(i *", "x = 1 while len(ham...
[ "from needlestack.servicers.merger import MergerServicer from examples import configs logging.getLogger(\"kazoo\").setLevel(\"WARN\") def", "health_pb2, health_pb2_grpc from grpc_health.v1.health import HealthServicer from needlestack.apis import servicers_pb2_grpc", "needlestack.servicers import factory from n...
[ "False) return USIEngine(board, commands, cfg.get(\"usi_options\", {}), cfg.get(\"go_commands\", {}), silence_stderr) class", "wtime, binc, winc): cmds = self.go_commands moves = [m.usi() for", "if name: rating = game.opponent.rating if game.opponent.rating is not None", "print_handler_stats(self): pass def g...
[ "from CGAL.CGAL_Alpha_shape_2 import GENERAL, EXTERIOR, SINGULAR, REGULAR, INTERIOR from CGAL.CGAL_Alpha_shape_2", "lst.append(Point_2(44, 5)) lst.append(Point_2(444, 51)) lst.append(Point_2(14, 1)) t = Alpha_shape_2(lst, 0,", "t.make_alpha_shape(lst) for d in t.alpha(): print(d) for v in t.finite_vertices():",...
[ "<reponame>pavithra-mahamani/TAF ''' Created on Jan 18, 2018 @author: riteshagarwal '''", "''' java = False rest = False cli = False", "''' Created on Jan 18, 2018 @author: riteshagarwal ''' java", "2018 @author: riteshagarwal ''' java = False rest = False", "18, 2018 @author: riteshagarwal ''' java = False...
[ "< 340: self.label_node.position = (x+2, y) else: self.start_flag = False", "def setup(self): self.label_node = scene.LabelNode('A', position=(100,400), parent=self) self.start_flag = False", "(x+2, y) else: self.start_flag = False def touch_ended(self, touch): self.start_flag", "if self.start_flag: x,y = sel...
[ "self._call(user, _bot, update, **kwargs) def _call(self, user, _bot, update, **kwargs):", "active chat.' _SUCCESS_MESSAGE = 'Disconnected from chat' def _callback(self, user,", "= 'Close currently active chat.' _SUCCESS_MESSAGE = 'Disconnected from chat'", "import BaseCommand import mongo class DisconnectCom...
[ "List[str] = [] for char in self.value: if _whitespace(char) and", "code: int): self._code = code self._value = output_body @property def", "-> ShellCommandOutput: result = subprocess.run(self.run_args, stdout=subprocess.PIPE, env={ **os.environ, **(extra_environ if", "__iter__(self) -> Iterator[str]: return ...
[ "{ProtectionMode.inheriting} super(IndicoProtectionField, self).__init__(*args, enum=ProtectionMode, **kwargs) def render_protection_message(self): protected_object = self.get_form().protected_object", "isinstance(protected_object.protection_parent, db.m.Category): parent_type = _('Category') else: parent_type = ...
[ "= 'NameID' c_namespace = NAMESPACE c_children = NameIDType_.c_children.copy() c_attributes =", "# no consent is needed. CONSENT_INAPPLICABLE = \"urn:oasis:names:tc:SAML:2.0:consent:inapplicable\" # Subject", "initiate authentication # authenticate the request with login credentials AUTHN_PASSWORD", "[OneTime...
[ "in range(100): action = env.action_space.sample() obs, reward, done, info =", "space: \", env.observation_space) print(env.observation_space.high) print(env.observation_space.low) for episode in range(20): env.reset()", "done: print(\"Episode {} finished after {} timesteps\".format(episode, t+1)) break env.clo...
[ "if w not in board[:, j] and w not in", "(j // 3) * 3 # check all squares in", "9): for j in range(9): if board[i][j] == 0: print(\"", "+= 1 if count % 1000 == 0: print('\\rCurrent number", "= position[0] j = position[1] for w in range(1, 10):", "solve(): return True board[i][j] = 0 return False def find(...
[ "return T.vector() def make_matrix(): \"\"\" Returns a new Theano matrix.", "\"\"\" Returns a new Theano vector. \"\"\" return T.vector() def", "def make_vector(): \"\"\" Returns a new Theano vector. \"\"\" return", "theano matrix b: A theano vector Returns the matrix-vector product", "rng.rand(5).astype(b....
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR", "= self._project_id(context, req) quotas = QUOTAS.get_project_quotas(context, project_id, usages=True) if api_version_request.is_supported(", "may obtain # a co...
[ "they get to the replay buffer. \"\"\" # TODO(b/127641485): create", "metric.tf_summaries(train_step=step_metric.result()) checkpoint_manager.save() if i % 100 == 0: saver.save(os.path.join(root_dir, 'policy_%d'", "a function that writes checkpoints.\"\"\" trackable_objects = {metric.name: metric for", "durin...
[ "between checks when waiting for Manila share \" \"deletion.\"), cfg.FloatOpt(", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR", "may obtain # a copy of the License at #", "deprecated_group=\"benchmark\", h...
[ "Session, url: str): content = get_content.get_invoice_info(url) grocery_store_id = insert.insert_grocery_store_info( db,", "sqlalchemy.orm.session import Session from app import crud from .utils import", "import Session from app import crud from .utils import insert,", "crud from .utils import insert, get_co...
[]
[ "s = self.__parseCStructCompounddef(c) self.add(s) def __parseCTypedefMemberdef(self, node): if not Project.__canBeWrapped(self,", "self.__generateEnum(cenum, enumsNode) if len(project.classes) > 0: classesNode = ET.SubElement(apiNode, 'classes')", "+= \"\\t'\" + arg.name + \"' parameter not documented\\n\"; f"...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "OF ANY # KIND, either express or implied. See the", "-*- encoding: utf-8 -*- # Licensed to the Apache Software", "Software Foundation (ASF) under one # or more contributor license", "more contributor license agreements....
[ "Exception('This should show up'), 'timedelta': timedelta(microseconds=20), 'list': [1, 2, 3]", "= combined.keys() utils.clean(combined) self.assertEqual(combined.keys(), pre_clean_keys) def test_clean_with_dates(self): dict_with_dates = {", "= dict(simple.items()) combined.update(complicated.items()) pre_clean...
[ "row[:] for r in range(4): m2[point][r] = (m1[0][r] * tmp[0]", "return [ [-1, 3, -3, 1], [3, -6, 3, 0],", "m1 by m2, modifying m2 to be the product #m1", "4): m = [] for c in range(cols): m.append([]) for", "s = '' for r in range(len(matrix[0])): for c in", "0 #multiply m1 by m2, modifying m2 to be the", ...
[ "print(anime_list.get_num_status(1)) print(anime_list.get_total()) print(anime_list.get_days()) print(anime_list.exists(11734)) print(len(anime_list.get_ids())) print(len(anime_list.get_titles())) print(anime_list.get_status(1)) print(anime_list.get_score(10)) print(anime_list.exists_as_status(11734, 1))", "impor...
[ "------------------------------------------ # # Django REST Framework # # ------------------------------------------ #", "'apps.user.serializers.UserCreateSerializer' } } # ------------------------------------------ # # Simple JWT #", "a field in User model to be used as login", "'django.contrib.auth.middlewa...
[ "\"Flask\" cfg = configparser.ConfigParser() cfg.read(dir_path if debug else \"/var/www/html/flaskApp/cfg.ini\") self.debug", "= \"Flask-debug\" if debug else \"Flask\" cfg = configparser.ConfigParser() cfg.read(dir_path", "debug else \"/var/www/html/flaskApp/cfg.ini\") self.debug = cfg.getboolean(section, \"DE...
[ "= 'ha_router_agent_port_bindings' __table_args__ = ( sa.UniqueConstraint( 'router_id', 'l3_agent_id', name='uniq_ha_router_agent_port_bindings0port_id0l3_agent_id'), model_base.BASEV2.__table_args__", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "distributed on an \"A...
[ "with application.app_context() as context: init(); migrate(message=\"Production migration\"); upgrade(); adminRole =", "userRole = Role(name=\"user\"); database.session.add(adminRole); database.session.add(userRole); database.session.commit(); admin = User( jmbg=\"0000000000000\",", "Role(name=\"user\"); datab...
[ "test_precision = float(line[1]) if 'test roc' in line: line =", "return -1, -1, -1 with open(file_path, 'r') as f: lines", "6, 7, 8, 9, 10, 11, 12] } for model", "[ 'random_forest_classification', 'xgboost_classification', 'xgboost_regression', 'single_deep_classification', 'single_deep_regression' ] model_p...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR", "self._msg_locator(level) # NOTE(tsufiev): we cannot use self._turn_off_implicit_wait() at this #", "may obtain # a copy of the License at #", "agreed to in w...
[ "'init_cond': 0.001, 'plot': False, 'equation': diff_eq_B} } return variables def", "keyboard_keys(): \"\"\" Returns a dictionnary of user defined keys of", "are added internally to the dictionnary of variables. Each observable", "integer), \"help\" (str, to be displayed in help message). Additionnal", "of ...
[ "all default inputs other than o2_lim f_name_i=f_name+\"{:.1f}\".format(u_lim_o2[0])+\"-\"+\"{:.1f}\".format(u_lim_o2[1]) lim[0,1,1]=u_lim_o2[0] lim[0,2,1]=u_lim_o2[1] ee.solve_eq(t_max,dt,y0,p,mu,lam,r,K,delta,rho,lim,f_name_i)", "solve_eq function with all default inputs other than o2_lim f_name_i=f_name+\"{:.1...
[ "range(1, 325): file_path = f\"./data/附件1:UWB数据集/{kind}数据/{i}.{kind}.txt\" original_data, final_processed_data = data_process(file_path) save_data(f\"cleaned_data/{kind}数据/{i}.{kind}.csv\",", "# process variance # allocate space for arrays xhat =", "Measures.append(measure) Measures = np.array(Measures) # Measu...
[ "'phpanalyzer', 'class' : ProgpilotAnalyzer, 'language' : 'all', 'issues_data' : issues_data,", ": ProgpilotAnalyzer, 'language' : 'all', 'issues_data' : issues_data, }, }", "from .analyzer import ProgpilotAnalyzer from .issues_data import issues_data analyzers =", "issues_data analyzers = { 'phpanlyzer' : { ...
[ "trim_chap_name(cmd) if chap in book_sections: #chap is actually a section", "line = f.readline() if line[:6] != '%!Mode': section_text = '%!Mode::", "= '' with open(file_model) as model_file: model = model_file.read() model", "pdffile if not os.path.isfile(old_pdffile): return False pdf_mtime = os.path.getmt...
[ "Data Terminal Ready\"\"\" if self.fd is None: raise portNotOpenError if", "setup baud rate try: ispeed = ospeed = getattr(TERMIOS, 'B%s'", "self._xonxoff: iflag |= (TERMIOS.IXON|TERMIOS.IXOFF) #|TERMIOS.IXANY) else: iflag &= ~(TERMIOS.IXON|TERMIOS.IXOFF|TERMIOS.IXANY) else:", "with current settings. This may...
[ "Base from sqlalchemy import Column, String, Integer, ForeignKey, DateTime, Float", "'vendors' id = Column(Integer, primary_key=True) name = Column(String(255)) agent_url =", "Column(Integer, default=0) company = Column(Integer, ForeignKey('vendors.id')) amount = Column(Float) class", "PendingTransaction(Base...
[ "= rospy.get_param(\"~positive_nonzero_categories\") categories = string.strip(categories).split(\" \") categories = [float(x) for", "cnt = collections.Counter() for f in exampleSetFiles_const: data = ExampleSet.load(os.path.join(exampleSetDir,", "if the number of training examples is below this, load", "len(...
[ "Monate from Kronos_heureka_code.Zeit.Datum.Jahr import Jahr, Zeitrechnung from Kronos_heureka_code.Zeit.Datum.Tag import Tag", "Kronos_heureka_code.Zeit.Uhrzeit import Uhrzeit, Stunde, Minute, Sekunde from Kronos_heureka_code.Zeit.Datum.Monat import Monate", "Minute, Sekunde from Kronos_heureka_code.Zeit.Datum...
[ "silent=False): if fname is None: logging.basicConfig( level=logging.INFO if not silent", "logging.CRITICAL, format='%(name)-12s: %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filemode='w' ) else: logging.basicConfig(", "is None: logging.basicConfig( level=logging.INFO if not silent else logging.CRITICAL...
[ "is attribute or event, depends on the called function\"\"\" if", "obj = build_generic_object(template, args) return add_object(event_id, obj) except ValueError as", "return [galaxy.get('Name') for galaxy in event.get('Galaxy')] def event_to_human_readable_object_list(event): event_objects =", "for i in range...
[ "settings from redminelib import Redmine as DefaultRedmine from .validator import", "key = key or settings.REDMINE_API_KEY super().__init__(url=url, key=key) self.validator = RedmineInstanceValidator(client=self)", "errors += self.validator.score_field_errors return errors def instance_valid(self) -> bool: retu...
[ "= df['webdev_science_ratio_self'].value_counts(sort=False) ratio_others = df['webdev_science_ratio_others'].value_counts(sort=False) # Let's draw a bar", "= df['webdev_science_ratio_others'] \\ .replace(CONVERSION.keys(), CONVERSION.values()) print(f'Self:\\t\\t{self_numeric.mean().round(2)} web devs / scientist...
[ "def __init__(self, cfg): super(MaskPred, self).__init__() self.in_channels = cfg.MODEL.EMBEDMASK.MASK_BRANCH.OUT_CHANNELS self.mask_out_stride =", "(1 - gt_sorted.float()).cumsum(0) jaccard = 1. - intersection / union", "per_im in gt_instances]) gt_bitmasks = gt_bitmasks[gt_inds].unsqueeze(dim=1).to(dtype=pixe...
[ "\"ssh {opts} {user}@{host} 'echo ok'\".format(opts=ssh_opts, user=dst_user, host=dst_host) try: rr.run(cmd) except", "2.0 (the \"License\"); # you may not use this file", "(\"iscsiadm is not available on the local host. Please \"", "raise exception.AbortMigrationError(msg) def _check_local_sudo_password_set(...
[ "call to the `route` method. >>> Bongo().routes() {\"routes\": [1234, 5678,", "self.get(endpoint, **kwargs) def stops(self): \"\"\" Same as an empty call", "== 'application/json': data = response.json elif 'stoplist' in response.url: #", "9999]} \"\"\" return self.stop() def predict(self, number, **kwargs): \...
[ "Utility function def print_status() -> None: global thread_num thread_num_mutex.acquire(True) thread_num", "dos = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: dos.connect((ip, port)) msg = f\"GET", "support thread_num = 0 thread_num_mutex = threading.Lock() # Utility function", "progress...\") thre...