ngram
listlengths
0
67.8k
[ "= self.read_option('odo_uri', None) self.flatson = Flatson(schema) self.logger.info('ODOWriter has been initiated. Writing to: {}'.format(self.odo_uri))", "items to a odo destination. https://odo.readthedocs.org/en/latest/ Needed parameters: - schema (object) schema object.", "flattened_lines = (self.flatson.f...
[ "that maketests is working. Call maketests via: >>> from x7.shell import *; maketests('x7.sample.needs_tests')", "maketests is working. Call maketests via: >>> from x7.shell import *; maketests('x7.sample.needs_tests') \"\"\"", "Simple file to validate that maketests is working. Call maketests via: >>> from", ...
[ "the CHI function in a practically noiseless computer simulation (see \"chi_cpa.py\") takes around", "MSB to LSB for i in range(len(IV0s)-1, -1, -1): # addressing \"MSB\" of", "hash.update(IV) # needs to be copied again because of object orientation hash_copies[nz] =", ">>= 1 nz += 1 # initialize hash to the ...
[ "ordered route list from start to finish with all node ids needed to", "output += p[i-1] # Consider the next node i += 1 # We’ve", "if len(p) == 2: return p # Compile an output path output =", "the last item in the input while i < len(p)-1: # Do the", "output list output += p[i-1] # Consider the next node i...
[ "Event: def __init__(self): self.handlers = set() def subscribe(self, func): self.handlers.add(func) def unsubscribe(self, func):", "class Event: def __init__(self): self.handlers = set() def subscribe(self, func): self.handlers.add(func) def unsubscribe(self,", "subscribe(self, func): self.handlers.add(func) d...
[ "an environment variable. supported types: None Integer String @param env_var_name: environment variable name", "variable name @return: string of the type name. \"\"\" try: val = os.getenv(env_var_name)", "ex: return \"None\" try: int_val = int(val) return 'Integer' except ValueError: return 'String'", "def c...
[ "fields = \"__all__\" class AlbumSerializer(serializers.ModelSerializer): sound = serializers.SerializerMethodField() class Meta: model = Album", "fields = [\"name\" , \"song_image\" , \"pk\" , \"like\" , \"played\" , \"tag\"", ", \"sound\"] depth = 1 def get_sound(self , obj): print(\"WORKING\") return SoundSe...
[ "near top'), ('tracker-head-bottom', 'Head - near bottom'), ('tracker-body-top', 'Body - near top'), ('tracker-body-bottom',", "the Admin for where to put each tracker. It defaults to the obvious", "of 3-ples in the settings file under ADDITIONAL_TRACKER_POSITIONS. (2-letter-code, description, block name), e.g....
[ "import APIRouter router = APIRouter() @router.get(\"\", tags=[\"health\"]) async def get_health(): return { \"results\":", "fastapi import APIRouter router = APIRouter() @router.get(\"\", tags=[\"health\"]) async def get_health(): return {", "= APIRouter() @router.get(\"\", tags=[\"health\"]) async def get_hea...
[ "open('../data/' + 'inputsize.txt', 'r') as f: reqsize = int(f.readline().split('\\n')[0]) #print(reqsize) #image_filename = '../data/'", "from PIL import Image import json import time import cv2 PATH_TO_FROZEN_GRAPH = '../data/mobilenet_v2_1.4_224/mobilenet_v2_1.4_224_frozen.pb'", "if cat != 'classes': categor...
[ "where user=\"{user}\" '''.format(user = user.user), as_dict=True) for setting in user_settings: data = frappe.parse_json(setting.get('data'))", "+ timespan_map[f[3]] f[2] = 'Timespan' if update: data[key]['filters'] = filters update_user_settings(user_setting['doctype'], json.dumps(data), for_update=True)", "u...
[ "steps), let us know that the training # is still running if current_step%50000", "10 training_size = 100000 # the amount of hidden units was set by", "= 0.005 # the amount of steps was set by trial and error", "dw): # Every now and then (every 50k steps), let us know that", "n_max = 10 training_size = 1000...
[ "name\", required=True) parser.add_argument('-s', '--service_account', help=(\"Path to gcloud service account, is for circleCI usage.", "def add_private_packs_from_dummy_index(private_packs, dummy_index_blob): downloaded_dummy_index_path = 'current_dummy_index.zip' extracted_dummy_index_path = 'dummy_index' dummy...
[]
[ "**img_norm_cfg), dict(type='GaussianNoise', sigma_range=(0, 0.04), clamp_range=(0., 1.)), dict(type='RandomFlip', prob=0.5, direction='horizontal'), dict(type='RandomFlip', prob=0.5, direction='vertical'), dict(", "= dict( translates=(0.05, 0.05), zoom=(1.0, 1.5), shear=(0.86, 1.16), rotate=(-10., 10.)) relative...
[ "x def dim_op(op, *args): args = [wrap_dim(x) for x in args] raw_args =", "# Represents a combo_op of MULTIPLY in a contraction def __mul__(self, rhs): return", "value.encode('utf-8')) elif isinstance(value, ffi.CData) and ffi.typeof(value) is ffi.typeof('plaidml_value*'): ffi_obj = value else: raise", "pass ...
[ "(c) 2018 Intel Corporation Licensed under the Apache License, Version 2.0 (the \"License\");", "import se_resnet50, se_resnet101, se_resnet152 from .backbones.resnet import resnet50 from .backbones.se_resnext import se_resnext50, se_resnext101,", "dropout ratio of the model\"\"\" @abstractmethod def get_input_...
[ "= msg % args # Exceptions must be formatted (they are not JSON-serializable", "class JSONFormatter(logging.Formatter): \"\"\"Simple JSON formatter for the logging facility.\"\"\" def format(self, obj): \"\"\"Note", "obj is a LogRecord instance.\"\"\" # Copy the dictionary ret = dict(obj.__dict__) #", "% args...
[ "# Orthogonal linear system solver tests from math import sqrt import numpy as", "orthogonal matrix A = np.matrix('2 -2 1;' '1 2 2;' '2 1 -2',", "= np.matrix('2 -2 1;' '1 2 2;' '2 1 -2', float) A =", "3') # Solve the system x = orthogonal(A, b, 1) # Check if", "##############################################...
[ "files\"), (\"❌\", \"Failed to upload processed data files to the huggingface hub\"), )", "\"\"\"Build a Project from the API response, JSON-encoded\"\"\" return cls( proj_id=json_resp[\"id\"], name=json_resp[\"proj_name\"], user=json_resp[\"username\"],", "f\"{CYAN_TAG}{self.dataset_id}{RESET_TAG}\", \"\", ] +...
[ "including the alert text. aps['alert'] = alert encoded = escape.utf8(json.dumps(escape.recursive_unicode(data), separators=(',', ':'), ensure_ascii=False))", "import base64 import json import struct import time from tornado import escape _MAX_PAYLOAD_BYTES", "representation rather than \"\\u1234\" escaping). T...
[ "= dev.wires.tolist() ############################################################################## # Let us now define the quantum circuit that realizes", "We will forgo one tiny step, but it can be shown that for", "some imports: from pennylane import numpy as np import matplotlib as mpl np.random.seed(1359)...
[ "#draw board gameboard.draw(screen,font) #update da screeeeeen pygame.display.update() #end the game if gameboard.is_solved() and", "[] for i in range(0,self.size): new.append(self.content[(i+1)%self.size][y]) for i in range(0,self.size): self.content[i][y] = new[i]", "##VARIABLES TO CHANGE width = 500 height =...
[ "for i in range(1,11): if i == 6: continue; print(i); print(i); print(i); print(i);", "# for문에서 continue 사용하기, continue = skip개념!!! for i in range(1,11): if i", "사용하기, continue = skip개념!!! for i in range(1,11): if i == 6: continue;", "skip개념!!! for i in range(1,11): if i == 6: continue; print(i); print(i); pr...
[ "and the following disclaimer in the documentation # and/or other materials provided with", "version string # External Name: ncs5k-goldenk9-x.iso-6.3.1.11I.0, Internal Name: ncs5k-goldenk9-x-6.3.1.11I if not match and", "(c) 2016, Cisco Systems # All rights reserved. # # Redistribution and use", "EXPRESS OR I...
[ "an object Usage: >>> setElementByTag(FromUserName='the_wechat_server',ToUserName='the_wechat_client',Content='Hello dude!') # In this way we can then", "'voice', 'video', 'location', 'link', 'event']: # Check if the incomingMessage has tag 'Recognition'", "## Load the template #for i in tpl_list: # if MsgType ...
[]
[ "colors['darkred'] = latex2htmlcolor('0.8,0,0') colors['middlered'] = latex2htmlcolor('0.9,0,0') colors['lightred'] = latex2htmlcolor('1,0,0') colors['darkgreen'] = latex2htmlcolor('0,0.6,0') colors['middlegreen']", "return arg.strip() else: try: red = green = blue = float(arg) except ValueError:", "- m * (1 - ...
[ "Transparente\\033[m\") print(\" - - - Testando os 30 - - -\") print(\"\\033[0;37;40mTeste\\033[m\") print(\"\\033[0;31;40mTeste\\033[m\")", "print(\"\\033[0;30;42mVerde\\033[m\") print(\"\\033[0;30;43mAmarelo\\033[m\") print(\"\\033[0;30;44mRoxo\\033[m\") print(\"\\033[0;30;45mLilás\\033[m\") print(\"\\033[0;30;...
[ "Relational Mappers (SQLAlchemy) The latest development version is available in the `TurboGears Git", "= \"\"\"Copyright 2005-2020 <NAME>, <NAME>, <NAME>, <NAME>, <NAME> and contributors\"\"\" license = \"MIT\"", ".. _TurboGears Git repositories: https://github.com/TurboGears \"\"\" url=\"http://www.turbogears....
[ "done.') ## STORING dic = dict() all_var2export = ['em'] for v in all_var2export:", "mean em = e.mean(axis=0) print('e mean done.') ## STORING dic = dict() all_var2export", "em = e.mean(axis=0) print('e mean done.') ## STORING dic = dict() all_var2export =", "pass ## U,V,H mean em = e.mean(axis=0) print('e me...
[ "the boggle grid. None if given invalid grid. \"\"\" if self.trie is None:", "a boggle grid, from top left to bottom right. \"\"\" for y in", "import trie if sys.version < '3': range = xrange class BoggleSolver(object): \"\"\" This", "' + words_file) print('creating dictionary...') root = trie.Trie() word_cou...
[ "pytest from ocs_ci.framework.testlib import ( managed_service_required, skipif_ms_consumer, tier4, tier4a, ) from ocs_ci.ocs import", "scaled down incidents = measure_corrupt_pg.get(\"pagerduty_incidents\") target_label = constants.ALERT_CLUSTERERRORSTATE # TODO(fbalak): check the whole", "constants.ALERT_CLUS...
[ "open(modelfile, \"w\") as file: file.write(\"\"\" data { int N; // the number of", "data.info() feature_names = data.columns.str.startswith(\"var_\") predictors = data[data.columns[feature_names]] labels = data[\"Target_Practice\"] ix_training = data.train", "ix_training.sum().tolist(), 'N2': ix_testing.sum()....
[ "an 'error' event if the load fails. Automatically runs as a daemon \"\"\"", "the queue to report the results into \"\"\" threading.Thread.__init__(self) self.queue = queue self.filename", "from tsv is completed {} entries\".format(len(res))) else: error(\"Async remote mats loader failed -", "res: with open(s...
[ "return item class LuoxiaImagePipeline(ImagesPipeline): def get_media_requests(self, item, info): for url in item['image_urls']: yield", "# Define your item pipelines here # # Don't forget to add your", "to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipel...
[ "tf.estimator.inputs.numpy_input_fn( x={'x': train_data}, y=train_labels, batch_size=100, num_epochs=None, shuffle=True ) # Evaluate the model and", "with 1024 neurons # Input Tensor Shape: [batch_size, 7 * 7 * 64]", "strides=2) # Flatten tensor into a batch of vectors # Input Tensor Shape:", "# Flatten tenso...
[ "in self._pub_pose_map: topic_ns = \"/autoware_debug_tools/stop_reason2pose/\" self._pub_pose_map[snake_case_stop_reason] = self.create_publisher( PoseStamped, topic_ns + snake_case_stop_reason, 1", "KIND, either express or implied. # See the License for the specific language", "if nearest_pose_id: self._update...
[ "default, leaving asyncio clean. .. note:: In the most common cases you don't", "new event loop everytime. After completion, the loop is closed and then recreated,", "async def async_add(x, y, delay=0.1): await asyncio.sleep(delay) return x + y async def", "y async def async_one(): await async_nested_exc() as...
[ "gotoy = gotoy - 28 for counter in range(6): star(9,5,'white') t.setheading(0) t.forward(84) t.penup()", "t.setheading(-90) rectangle(40,988,'#B22234') t.setheading(-90) t.forward(80) t.penup() t.setheading(0) t.goto(-494,260) t.pendown() rectangle(494,280,'#3C3B6E') t.goto(-474,245) for counter in", "bigangle ...
[ "10, -18, 20, 25] s3 = [2, 3, -5, 10, 10, -5, -5,", "remove consecutive nodes that sums up to zero # https://www.careercup.com/question?id=5717797377146880 from util import", "= [2, 3, -5, 10, 10, -5, -5, 20, 5, -5] samples =", "not new: new = Node(start.value) root = new elif not zero and new:", "total += ...
[ "( MapsAccountCreateParameters, Sku) ACCOUNT_LOCATION = 'global' logger = get_logger(__name__) def create_account(client, resource_group_name, account_name,", "= prompt_y_n(hint) if not option: raise CLIError(client_denied_terms) # Submit query sku = Sku(name=sku_name)", "to the user logger.warning(terms) # Pro...
[ "Timer from recommenders.utils.constants import SEED from recommenders.models.deeprec.deeprec_utils import ( prepare_hparams ) from recommenders.datasets.amazon_reviews", "\"model_20220118_20k_0.8923\", 'step_20000')) with Timer() as train_time: model = model.fit(train_file, valid_file, valid_num_ngs=9, eval_metr...
[ "ctypesgen, CtypesType and its subclasses are completely independent of the parser module. The", "py_string(self, ignore_can_be_ctype=None): return \"%s_%s\" % (self.variety, self.tag) last_tagnum = 0 def anonymous_enum_tag(): global", "versions of ctypesgen, CtypesType and its subclasses are completely indepen...
[ "def r(self, r): self._r = r @property def col(self): return self._col @col.setter def", "def y(self): return self._y def respawn(self): self._x = randint(self._r, Screen.width - self._r) self._y", "f\"Score: {self.score}\", (Screen.bg - 2) % 16) class Circle: def __init__(self): self._r =", "self.respawn() @...
[ "DB(Constants.DB_BACKUP) db_backup.update_or_insert_value( self.mark_of_local_verification, b'1') self.messenger.code_type = Constants.BACKUP_SCHEDULED self.messenger.set_message = 'backup scheduled' except Exception", "Utils() self.messenger = Messenger() self.mark_of_local_verification = b'varidb_execute_file_v...
[ "scanning of unaltered VM using every profile according to input. Also perform remediation", "logging.error(\"Nothing has been tested!\") snapshot_stack.delete() # depending on number of profiles we have", "domain_ip = ssg_test_suite.virt.determine_ip(dom) has_worked = False profiles = get_viable_profiles(optio...
[ "each option. If a one-argument callable, this callable will be passed model instance", "= valuelist[0] def pre_validate(self, form): if not self.allow_blank or self.data is not None:", "process_formdata(self, valuelist): if valuelist: try: lat, lon = valuelist[0].split(',') self.data = u'%s,%s' %", "select. ...
[ "If collect_data is on, the players are selected randomly each game from: [\"Random\",", "when collect_data is off\") modes = players #Simulates num_games of games scores =", "run the game with the default params if unchanged. If collect_data is on,", ".xlsx file if collect_data: filename = \"PlayData/data\" ...
[ "in this module.\"\"\" pass class DecodeError(DottedMarkupLanguageException): \"\"\"Raised when there is an error decoding", "for all exceptions in this module.\"\"\" pass class DecodeError(DottedMarkupLanguageException): \"\"\"Raised when there is", "class DottedMarkupLanguageException(Exception): \"\"\"Base c...
[ "def load_voc_instances(dirname: str, split: str): \"\"\" Load licenseplates VOC detection annotations to Detectron2", "np.loadtxt(f, dtype=np.str) dicts = [] for fileid in fileids: anno_file = os.path.join(dirname, \"annotations\",", "Visualizer(img[:, :, ::-1], metadata=MetadataCatalog.get(dataset_name), scal...
[ "open(f, \"rb\") as fin: result = fin.read() end = time.time() print(\"%.1f images/s\" %", "as fin: result = fin.read() end = time.time() print(\"%.1f images/s\" % (10000 /", "import glob import time import random filelist = glob.glob('/mnt/lustre/chenyuntao1/datasets/imagenet/train/*/*') random.shuffle(filelis...
[ "inp_dict.get_value('function', required_type='any') description = 'boundary condititon for %s' % var_name self.velocity = verify_field_variable_definition(", "( CodedExpression, OcellarisCppExpression, OcellarisError, verify_field_variable_definition, ) class OcellarisDirichletBC(dolfin.DirichletBC): def __init_...
[ "import count_inversions class TestCountSplitInversions(unittest.TestCase): def test_count_inversions(self): input = [1, 3, 5, 2, 4,", "test_count_inversions(self): input = [1, 3, 5, 2, 4, 6] result = count_inversions(input) self.assertEqual(result,", "import unittest from count_split_inversions import count_in...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "# Copyright 2016 The BigDL Authors. # # Licensed under the Apache License,", "writing, software # distributed under the License is distributed on an \"AS IS\"", "400 input_feature_num = 10 output_feature_num = 2 past_seq_len = 10 ...
[ "event = conn.krpc.add_event(expr) with event.condition: event.wait() print('Booster separation') vessel.control.activate_next_stage() mean_altitude = conn.get_call(getattr, vessel.flight(),", "krpc conn = krpc.connect(name='Sub-orbital flight') vessel = conn.space_center.active_vessel vessel.auto_pilot.target_pi...
[ "def get_columns(a): return list(a.T) def main(): np.random.seed(0) a=np.random.randint(0,10, (4,4)) print(\"a:\", a) print(\"Rows:\", get_rows(a))", "<gh_stars>0 #!/usr/bin/env python3 import numpy as np def get_rows(a): return list(a) def get_columns(a):", "as np def get_rows(a): return list(a) def get_column...
[ "private_leaderboard = _compute_leaderboard(session, submissions, 'private', event_name, with_links=False) time_list = (['train time [s]', 'validation", "contributivity'] if (df[contrib_columns] == 0).all(axis=0).all(): df = df.drop(columns=contrib_columns) df = df.sort_values( \"bag {}", "best_df[['public ' + ...
[ "for 1/10th of a second if indent_Increasing: indent = indent + 1 if", "Python import time, sys indent = 0 # How many spaces to indent", "while True: # The main program loop print(' ' * indent, end='') print('********')", "20: indent_Increasing = False else: indent = indent - 1 if indent ==", "indentation i...
[ "'\\Compensation: %s' % compensation['original_filename'] print 'Samples:' if sample: print '\\t%s' % sample['original_filename'] else:", "{'site_pk': site['id']} if subject: sample_kwargs['subject_pk'] = subject['id'] sample_list = get_samples(*sample_args, **sample_kwargs) if not", "compensation_choice = raw_...
[ "static from . import views from . import jobs urlpatterns = [ url(r'^choose_company/(?P<company_id>.*)/$',", "[ url(r'^choose_company/(?P<company_id>.*)/$', views.choose_company, name='choose_company'), url(r'^cleanlogs/$', jobs.cleanlogs, name='cleanlogs'), url(r'^primecache/$', jobs.primecache, name='primecach...
[ "\"Intended Audience :: End Users/Desktop\", \"License :: OSI Approved :: MIT License\", \"Operating", "long_description=long_description, long_description_content_type=\"text/markdown\", version=\"1.1.0\", url='https://github.com/einzigartigername/i3-workspace-swap', license='MIT', author='<NAME>', author_email=...
[ "specify the generated XML files # generated_xml = [_msg_serializable_xml_name(f) for f in sorted(msg_types)]", "RIGHTS RESERVED. United States Government Sponsorship # acknowledged. Any commercial use must be", "States Government Sponsorship # acknowledged. Any commercial use must be negotiated with the", "#...
[ "with pytest.raises(NotebookDifference): compare_notebooks(ref, test, 'py:light', allow_expected_differences=False) def test_dont_raise_on_different_outputs(): ref = new_notebook(cells=[new_code_cell('1+1')]) test =", "def test_raise_on_different_cell_metadata(): ref = new_notebook(cells=[new_code_cell('1+1')]) t...
[ "str = None): \"\"\"sp00ktober by camiel.\"\"\" if datetime.date.today().month == 10: # make it", "*{}*\\'s snoot - it feels satisfying.', 'you happily boop *{}*, it\\'s lovely!', 'you", "no one there.', 'you look around the channel for someone to boop.', 'you", "'you boop *{}*.', '*{}* feels annoyed from you...
[ "else full_config['gamma'] elif full_config['exp_name'] == \"IMP\": full_config['gamma'] = 0.9 if full_config['gamma'] is None", "# \"exp_name\": \"AsymCoinGame\", \"pseudo\": False, \"grid_size\": 3, \"lola_update\": True, \"opp_model\": False, \"mem_efficient\": True,", "== \"CoinGame\" or full_config['exp_na...
[ "json_data_func(instance): ''' Return json format data, ready for passing into AmCharts. Contains 2", "into AmCharts. Contains 2 items - name of the month and count of", "add results above result = [] for month in range(1, len(month_name)): count_use =", "import string import random import json from calendar ...
[ "None: print \"The XML file \", user_info_config, \" seems to be invalid, using", "print exit(1) else: exit(0) else: exit(0) exit(0) def admin_user_info( config_parser ): user_info_config =", "'hgweb_config_dir' ) hgweb_config_file = os.path.join( hgweb_dir, 'hgweb.config' ) if not os.path.exists( hgweb_config_...
[ "get_shard_iterator(self): arn = self._get_param(\"StreamArn\") shard_id = self._get_param(\"ShardId\") shard_iterator_type = self._get_param(\"ShardIteratorType\") sequence_number = self._get_param(\"SequenceNumber\")", "from .models import dynamodbstreams_backends from six import string_types class DynamoDBStre...
[ "ZerosFrontExtractor(FrontExtractorOp): op = '_zeros' enabled = True @classmethod def extract(cls, node): attrs =", "SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.mxnet.extractors.utils import", "openvino.tools....
[ "= j.do.pullGitRepo(url) # res = j.sal.process.executeWithoutPipe(\"cd %s;%s install\" % (cdest, self.npm)) # #", "= \"https://github.com/Famous/engine-seed\" # cdest = j.do.pullGitRepo(url) # res = j.sal.process.executeWithoutPipe(\"cd %s;%s install\" %", "# @property # def npm(self): # if self._npm == False: ...
[ "RF state PC.update(new_PC) # Update PC cycle += 1 MEM.dump() # Print memory", "instruction IM.imgx.append(cycle) IM.imgy.append(PC.PC) halted, new_PC, new_regs = EE.execute(Instruction, RF.asdct(), IM, cycle) # Update", "plot warnings.filterwarnings(\"ignore\") MEM = IMACC(sys.stdin.read()) # Load memory from ...
[ "= self._get_id_match(argument) or re.match(r\"<(?:@(?:!|&)?|#)([0-9]{15,20})>$\", argument) if match is None: raise discord.errors.ObjectNotFound(argument) result =", "user is None: tag = re.match(r\"#?(\\d{4})\", argument) if tag: if ctx.guild: test =", "sorted(filter(lambda x: x.isdigit(), argument)) argumen...
[ "except ValueError: structure_klifs_ids = np.genfromtxt(fname=args_input[0], dtype=int).tolist() else: structure_klifs_ids = [int(i) for i in", "\"\"\" import numpy as np from kissim.api import encode from kissim.cli.utils import configure_logger", "structures. Parameters ---------- args : argsparse.Namespace C...
[ "tsB[i : i + m])) if selfJoin: trivialMatchRange = (max(0, idxToProcess - m", "(distanceProfile, np.full(n - m + 1, idx, dtype = float)) if __name__ ==", "1, 0, 0, -1, 1])), 3) array([[ 2. , 2.828, 2. ], [", "tsB is None: selfJoin = True tsB = tsA query = tsA[idx :", "= False if tsB is None: selfJoin = True...
[]
[ "self.app.setStyleSheet(self.sheets[1]) self.sheets = [self.sheets[1], self.sheets[0]] ######################################################################## class AboutWidget(QDialog): \"\"\"显示关于信息\"\"\" # ---------------------------------------------------------------------- def __init__(self,", "as wgs #from...
[ "line_bot_api.reply_message(event.reply_token,TextSendMessage(text=notice)) elif 'del' == mage[0]: notice = del_item(mage[1],user_id) line_bot_api.reply_message(event.reply_token,TextSendMessage(text=notice)) elif 'list' == mage[0]:", "WHERE user_id LIKE '%s'\"%(user_id)) sub_item = cursor.fetchall() price_list =...
[ "FixedMarginBusiness(country, 'BUS', profit_margin=.025) Market(country, 'GOOD') Market(country, 'LAB') TaxFlow(country, 'TAX', taxrate=.2) # At time", "= mod.GetTimeSeries('k') Rat = mod.GetTimeSeries('DEBT_GDP') Def = mod.GetTimeSeries('GOV__INC') spend = mod.GetTimeSeries('GOV__DEM_GOOD') p =", "Quick2DPlot ...
[ "user_settings: self._user_settings = user_settings self.defaults = defaults or DEFAULTS self._cached_attrs = set() @property", "hasattr(self, '_user_settings'): delattr(self, '_user_settings') app_settings = AuthSettings(None, DEFAULTS) def reload_app_settings(*args, **kwargs): setting =", "'SIGNUP_SERIALIZER'...
[ "django.db import models from shorty.manager import UrlManager class Url(models.Model): long_url = models.URLField() short_id", "models.URLField() short_id = models.SlugField() counter = models.IntegerField(default=0) def __str__(self): return \"%s -- %s\"", "import UrlManager class Url(models.Model): long_url ...
[ "(Edit for \"area\" only) User is allowed to edit category (Edit for \"category\"", "contact (View for \"contact\" only) User is allowed to access customer (View for", "only) (Retire for \"room\" only) User is allowed Edit on (Edit for \"daily_record\":", "View on it_project if it_project is non-confidential ...
[ "r = map(int, input().split()) if x >= s: best = max(best, r) print(best)", "map(int, input().split()) for i in range(n): s, r = map(int, input().split()) if x", "s, r = map(int, input().split()) if x >= s: best = max(best, r)", "while tc: tc -= 1 best = 0 n, x = map(int, input().split())", "tc -= 1 best = ...
[ "'Johnson') def test_insert_helper(self): w = self.wrp w.query_mode = 'dict' res = w.insert('users', first_name='Dave',", "w.list_tables() self.assertIn('users', tables) self.assertIn('items', tables) w.drop_schemas() tables = w.list_tables() self.assertNotIn('users', tables) self.assertNotIn('items', tables)", ...
[ "depends_on('mpi', when='+mpi') depends_on('blas') depends_on('lapack') depends_on('scalapack', when='+mpi') depends_on('metis') depends_on('parmetis', when='+parmetis') depends_on('scotch~metis', when='+scotch') depends_on('scotch~metis+mpi', when='+scotch+mpi')", "dense rank-structured matrices, i.e., matrices ...
[ "from rasa_sdk.forms import FormAction from rasa_sdk.events import UserUtteranceReverted, UserUttered, FollowupAction # from rasa_core.events", "Frendy Shopping\" }); return [UserUttered(text=\"/greet\", parse_data={ \"intent\": {\"confidence\": 1.0, \"name\": \"greet\"}, \"entities\": []", "1.0, \"name\": \"gr...
[ "for sensor in [\"p1\", \"p2\", \"p3\"]: series = dataframe[sensor] scatter = go.Scatter(x =", "series, name = f\"Sensor {sensor}\", opacity = 0.4) pressure_plots.append(scatter) pressure_figure = go.Figure( data", "timeseries ''' def generate_timeseries_plot(self, dataframe): pressure_plots = [] for sensor in ...
[ "Changes may cause incorrect behavior and will be lost if the code is", "resource Id. :type key_vault_id: str :param key_vault_secret_name: Key Vault secret name. :type key_vault_secret_name:", "\"\"\"Key Vault container ARM resource for a certificate that is purchased through Azure.", "Key Vault secret. Poss...
[ "\"\"\" :param TypeInputUser user_id: :param str title: :param str short_name: :param List[TypeInputStickerSetItem] stickers:", "bytes(self.sticker), struct.pack('<i', self.position), )) @classmethod def from_reader(cls, reader): _sticker = reader.tgread_object() _position =", "= masks # type: Optional[bool] as...
[ "files for Paraview\", \"Parameters\" : { \"model_part_name\" : \"FluidModelPart.Parts_patch_surface\", \"output_control_type\" : \"step\", \"output_frequency\"", "3, \"output_sub_model_parts\" : false, \"write_deformed_configuration\" : true, \"folder_name\" : \"test_vtk_output\", \"save_output_files_in_folder\"...
[ "getlist(self) -> list[dict[str, str]]: ENTRY = r\"{http://www.w3.org/2005/Atom}\" MEDIA = r\"{http://search.yahoo.com/mrss/}\" YOUTUBE = r\"{http://www.youtube.com/xml/schemas/2015}\"", "xml.etree.ElementTree class RSS10Parser: def __init__(self, url: str) -> None: self.url = url def", "YOUTUBE = r\"{http://ww...
[ "= 9559 simulation = False with pepper_interface.get(IP,PORT,simulation) as pepper: time.sleep(1.0) values,time_stamp = pepper.laser.get()", "import pepper_interface IP = \"192.168.0.147\" PORT = 9559 simulation = False with pepper_interface.get(IP,PORT,simulation)", "print values[\"Front\"] print print \"Left\...
[ "doc = ____(\"I like tree kangaroos and narwhals.\") # Selecionar o primeiro token", "kangaroos and narwhals.\") # Selecionar o primeiro token first_token = doc[____] # Imprimir", "objeto nlp from ____ import ____ nlp = ____ # Processar o texto", "criar um objeto nlp from ____ import ____ nlp = ____ # Process...
[ "Questionnaire' } resp = self.client.post('/questionnaire/' + eq_id + '/' + form_type_id + '/789/introduction',", "form_type_id + '/789/introduction', data=post_data, follow_redirects=False) self.assertEqual(resp.status_code, 302) block_one_url = resp.location resp = self.client.get(block_one_url,", "from tests...
[ "= _compute_mask_indices( (batch_size, sequence_length), mask_prob=self.config.mask_time_prob, mask_length=self.config.mask_time_length, min_masks=2, ) hidden_states = tf.where( tf.cast(mask_time_indices[:, :,", "length of the convolutional layers \"\"\" def _conv_out_length(input_length, kernel_size, stride): # ...
[ "random.choice(wordlist) # end of helper code # ----------------------------------- # load the list of", "valid words. Words are strings of lowercase letters. Depending on the size of", "anywhere in the program wordlist = load_words() def partial_word(secret_word, guessed_letters): \"\"\" Return the", "' + st...
[ "auto_sdk on 2016.04.13 ''' from top.api.base import RestApi class FenxiaoRefundMessageAddRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain,", "= None self.sub_order_id = None def getapiname(self): return 'taobao.fenxiao.refund.message.add' def getMultipartParas...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "help=\"Max iterations.\") parser.add_argument(\"--save-interval\", type=int, default=50000, help=\"Interval for saving models.\") parser.add_argumen...
[ "print(\"-\" * 60) f.seek(0) my_content = f.readlines() print(\"\\nUse readlines method\") print(\"-\" * 60)", "f = open(\"my_file.txt\") print(\"\\nLoop directly over file\") print(\"-\" * 60) for line in", "f.seek(0) my_content = f.read() print(\"\\nUse read + splitlines\") print(\"-\" * 60) for line", "for...
[ "= str(uuid.uuid4()) cls.created_dataset: DatasetType = cls.client.create_dataset( name=cls.unique_name, dataset_format='ini', content='aGVsbG8sIHdvcmxkIQ==', tags=['test_tag'] ) @classmethod def", "None: self.client.update_dataset( dataset_uuid=self.created_dataset['uuid'], name=f'{self.created_dataset[\"name\"]...