ngram
listlengths
0
67.8k
[ "import commands from discord.utils import get class c8(commands.Cog, name=\"c8\"): def __init__(self, bot: commands.Bot):", "@commands.command(name='Sacrosanct_Devouring_Pyre', aliases=['c8']) async def example_embed(self, ctx): embed = discord.Embed(title='Sacrosanct Devouring Pyre', color=0xBC5A84) embed.set_t...
[ "from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import StratifiedKFold # Open preproccessed csv df", "print(\"Min Accuracy:\", np.min(accuracies)) print(\"Mean of Accuracies:\", np.mean(accuracies)) print(\"STD of Accuracies:\", np.std(accuracies)) # print(\"RUNNING", "...
[ "from rsterm import EntryPoint from red_dwarf.project import provide_project_context, ProjectContext class InitProject(EntryPoint): @provide_project_context def", "import provide_project_context, ProjectContext class InitProject(EntryPoint): @provide_project_context def run(self, project_context: ProjectContext) ...
[ "split_line[5] bases = \"\" # Replace the '.' and ',' signs with the", "'\\n'); # sys.stderr.write('line:\\n'); # sys.stderr.write(line.strip() + '\\n'); # most_common_base_count = 0; # Allow", "= %s\\tbase_counts = %s\\tinsertion_counts = %s\\tdeletion_counts = %s\\t%s\" % ( position, ref_name, int(coverage),"...
[ "OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). #", "# GNU Affero General Public License for more details. # # You should", "from openerp.osv import fields, osv class account_payment_populate_statement(osv.osv_memory): _name = \"account.payment.populate.statemen...
[ "course. Widget requirements: keyring_. .. _keyring: https://pypi.org/project/keyring/ \"\"\" defaults = [ ('mbox', '\"INBOX\"',", "(changing out <userid> and <password> for your userid and password): 1) create the", "TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT."...
[ "get_game_def_response.status_code == 200 assert get_game_def_response.data == post_game_def_response.data def test_game_def_not_found_by_int_id(api_client): post_game_def_response = create_game_definition(api_client) assert", "post_game_def_response.data def test_game_def_not_found_by_int_id(api_client): post_ga...
[ "a Program That Reads a list of strings. Each string is repeated N", "repeated N times, where N is the length of the string. Print the", "Write a Program That Reads a list of strings. Each string is repeated", "output_string = \"\" for string in strings: N = len(string) output_string += string", "N times, w...
[ "get_arg_parser, ArgumentParser from cloudkeeper_plugin_cleanup_aws_loadbalancers import CleanupAWSLoadbalancersPlugin def test_args(): arg_parser = get_arg_parser() CleanupAWSLoadbalancersPlugin.add_args(arg_parser) arg_parser.parse_args()", "import CleanupAWSLoadbalancersPlugin def test_args(): arg_parser = get...
[ "dependencies = [ ('metadata', '0010_auto_20180823_2353'), ] operations = [ migrations.AlterField( model_name='documentmetadata', name='value', field=models.CharField(blank=True,", "name='name', field=models.CharField(help_text='Name used by other apps to reference this metadata type. Do not", "-*- # Generated ...
[ "now = queue.pop(0) print(now, end=' ') for n in graph[now]: if not visited[n]:", "visited[n]: dfs(n) def dfs_s(V): stack = [V] visited[V] = True while stack: now", "graph = [[] for _ in range(N + 1)] for i in range(M):", "n in graph[now]: if not visited[n]: stack.append(n) visited[n] = True def bfs(V): visit...
[ "__author__ = \"<NAME>, <NAME>, and <NAME>\" __copyright__ = \"Copyright 2013-2015 UKP TU Darmstadt\"", "import webapp from google.appengine.ext.webapp.util import run_wsgi_app __author__ = \"<NAME>, <NAME>, and <NAME>\" __copyright__", "self.redirect(\"/argunit/home\") def post(self): self.redirect(\"/argunit/...
[ "final. Use instead :: from imgaug import augmenters as iaa and then e.g.", "Augmenter class Fliplr(Augmenter): # pylint: disable=locally-disabled, unused-variable, line-too-long \"\"\" Flip/mirror input images horizontally.", "keypoints_on_image.shape[1] for keypoint in keypoints_on_image.keypoints: keypoint.x...
[ "l2.val tempsum += carry if tempsum > 9: carry = tempsum//10 tempsum %=", "tempsum//10 tempsum %= 10 else: carry = 0 temp.next = ListNode(tempsum) temp =", "= temp = ListNode() while l1 is not None and l2 is not", "not None and l2 is not None: tempsum = l1.val + l2.val tempsum", "= ListNode(tempsum) temp = ...
[ "init hidden layers to be near deterministic for layer in dgp.layers[:-1]: layer.q_sqrt.assign(layer.q_sqrt *", "import Gaussian from deep_gp import DeepGP np.random.seed(0) tf.random.set_seed(0) def get_data(): Ns = 300", "Xs, X, Y, Z def make_deep_GP(num_layers, X, Y, Z): kernels = [] layer_sizes", "range(1...
[ "= executor self.storage = executor.storage self.bucket, raw_prefix = sm_storage['centroids'] self.prefix = f\"{raw_prefix}/{self.ds_hash}\" self.config_key", "None moldb_cache.clear() if cached_val: db_data_cobjs, peaks_cobjs = cached_val logger.info( f'Loaded {len(db_data_cobjs)} DBs, {len(peaks_cobjs)}", "va...
[ "= list() # for each connection get the node connected to the bottom", "to provide top connector functionality \"\"\" def __init__(self, index, nodeItem, nodeEditor, parent=None): super(ConnectorTopItem,", "is a top connector (implementation for parent class) \"\"\" return True def isInPlace(self):", "parent)...
[ "Commons Clause Restriction # # The Software is provided to you by the", "keys are present in cache. :param connection: connection to Ignite server, :param cache:", "defined below, subject to # the following condition. # # Without limiting other", "Union from pyignite.queries.op_codes import * from pyignite.d...
[ "path + \"/report\" report_file = report_path + \"/wrt-manifest-tizen-tests.xml\" report_summary_file = report_path + \"/summary.xml\"", "path + \"/result\" path_allpairs = path + \"/allpairs\" path_resource = path + \"/resource\"", "sh_path = path + \"/script\" log_path = report_path + \"/log_\" device_path = ...
[ "move the pipettes and gantry over the trash # do not home plunger", "thermocycler_hardware is not None: await thermocycler_hardware.open() return OpenLidResult() class OpenLid(BaseCommand[OpenLidParams, OpenLidResult]): \"\"\"A command", "from __future__ import annotations from typing import Optional, TYPE_CHE...
[ ":param text: :param chars_to_mapping: :return: \"\"\" import re pattern = \"|\".join(map(re.escape, chars_to_mapping.keys())) return", "function is used to replace a dictionary of characters inside a text string", "multiple_replace(text: str, chars_to_mapping: dict): \"\"\" This function is used to replace a d...
[ "models.CharField(max_length=500) repo_name = models.CharField(max_length=512, blank=True, null=True) user_name = models.CharField(max_length=512, blank=True, null=True) def __str__(self):", "here. class Gamedoc(models.Model): link = models.URLField(max_length=500) title = models.CharField(max_length=500) repo_na...
[ "django.contrib import admin from users.models import Friendship admin.site.register(Friendship) # Register your models here.", "from django.contrib import admin from users.models import Friendship admin.site.register(Friendship) # Register your models" ]
[ "number: %s' % len(doc.paragraphs)) print('1st paragraph: %s' % doc.paragraphs[0].text) print('2nd paragraph: %s' %", "% len(doc.paragraphs)) print('1st paragraph: %s' % doc.paragraphs[0].text) print('2nd paragraph: %s' % doc.paragraphs[1].text) print('paragraphs", "%s' % doc.paragraphs[0].text) print('2nd para...
[ "from BD.util.paths import Paths def sims_analysis_BD(): input_folder = Paths.rest_path + 'archive/beh/qlp-ml-opt/qlp-ml/' sims_analysis(input_folder, Paths.local_path", "= Paths.rest_path + 'archive/beh/qlp-ml-opt/qlp-ml/' sims_analysis(input_folder, Paths.local_path + 'BD/to_graph_data/qlp_ml_onpolicy__stats.cs...
[ "** 32 - 1)) | ((v << 24) & (2 ** 32 -", "re.search(r'#define SW2_SEED (0x[a-fA-F0-9]{8})', code) assert match is not None, 'SW2_SEED not found!' return", "= code.split('#elif defined(__GNUC__)')[3] for syscall_name in syscall_names: regex = re.compile('NTSTATUS ' + syscall_name", "function_name, old_hash in ...
[ "code ({}): {}\".format(abs(response.returncode), errmsg) return response.returncode, stderr def execute(cmd, workdir=None, timeout=60): cmd =", "dict): errmsg = errmsg[\"descr\"] else: errmsg = response.stderr stderr = \"Exit code ({}):", "errmsg[\"descr\"] else: errmsg = response.stderr stderr = \"Exit code (...
[ "targets: target = targets[self.name] self.update(target) else: logger.warn(\"Port forward setting named \" + self.name", "update(self, target): if self.forward_type is not None: target[\"type\"] = self.forward_type if self.remote_host is", "not None: target[\"local_port\"] = self.local_port if self.ssh_server ...
[ "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, software # distributed", "StringIO import traceback import unittest from xTool import atfork class AtforkTest(unittest.TestCase): def setUp(self):", "parent error\" in er...
[ "path.rglob(). :param Path path: path to list recursively :return list: list of Path", "bool file: Boolean, does the given path end with a file? If not,", "= [] for file in path.rglob('*'): files.append(file) return files def scan_and_create_dir_tree(path, file=True): \"\"\"", "the supplied path \"\"\" levelt...
[ "class indices node.out_port(2).set_data_type(in_data_type) if node.is_out_port_connected(3): node.out_port(3).set_data_type(np.int32) # the fourth output contains batch indices", "def backend_attrs(self): return [ ('class_agnostic_box_regression', lambda node: str(bool(node['class_agnostic_box_regression'])).low...
[ "f.lower().startswith('.') and f.lower().endswith('psv'): files.append(f) if not os.path.isdir(output_directory): os.mkdir(output_directory) # Load model. model =", "data def save_challenge_predictions(file, scores, labels): with open(file, 'w') as f: f.write('PredictedProbability|PredictedLabel\\n') for (s,", ...
[ "\"w\") f.write(cls.outputString) f.close() @classmethod def report(cls): \"\"\" \"\"\" # Duration durationStatement = cls.duration()", "cls.plotData() @classmethod def plotData(cls): \"\"\" \"\"\" print('-----------------------------------------') print(cls.popsData) data = list(cls.popsData.values())[0] # Plots...
[]
[ "else: raise ValueError(\"Your sample sheet must have a Sample_ID column, or (Sentrix_ID and", "['x_median', 'y_median', 'predicted_sex', 'X_fail_percent', 'Y_fail_percent'] - color is sex, pink or blue -", "<reponame>FoxoTech/methylcheck<filename>methylcheck/predict/sex.py import pandas as pd import numpy as n...
[ "'0002_auto_20201115_1531'), ] operations = [ migrations.AlterField( model_name='customuser', name='user_id', field=models.IntegerField(blank=True, null=True, unique=True, validators=[django.core.validators.MaxValueValidator(99999), django.core.validators.MinValueValidator(10000),", "= [ migrations.AlterField( mo...
[ "tip1plainbody = fix_line_endings( \"Modify your last commit before pushing with `git commit --amend`.\\n\"", "it doesn't crashfail\"\"\" subprocess.check_call([\"git-fortune\"]) captured = capfd.readouterr() assert \"GIT TIP #\" in captured.out", "TIP #\" in captured.out # from the box format def test_category...
[ "# conv_out_channels=512, # num_keypoints=5, # loss_keypoint=dict(type='MSELoss', loss_weight=50.0)), keypoint_decoder=dict(type='HeatmapDecodeOneKeypoint', upscale=4), bbox_roi_extractor=dict( type='SingleRoIExtractor', roi_layer=dict(type='RoIAlign', output_size=7,", "1.0]), loss_cls=dict( type='CrossEntropyLos...
[ "All Rights Reserved. import torch, math from torch import nn from torch.autograd import", "bs, ch, h, w, zsize, sampling_ratio, ) return grad_input, None, None, None, None", "output = _C.roi_align_rotated_3d_forward( input, roi, spatial_scale, output_size[0], output_size[1], output_size[2], sampling_ratio ) # ...
[ "sequenceLength = _padSequences(sequences, padtok, maxLength) elif nlevels == 2: maxLengthWord = max([max(map(lambda x:", "tagType = tagName.split('-')[-1] return tagClass, tagType def getChunks(seq, tags): \"\"\"Given a sequence of", "f: line = line.strip().split(' ') word = line[0] if word in dictionary: embe...
[]
[ "# pylint: disable=W0640 df = df.fillna(\"\") df.set_index(\" \", inplace=True) # Debug user output", "= df[col].map(lambda x: value.format(x)) # pylint: disable=W0640 df = df.fillna(\"\") df.set_index(\" \", inplace=True)", "[WSJ] Currencies\" embed = disnake.Embed(title=title, colour=cfg.COLOR) embed.set_imag...
[ "queries allows searching up the chain # for attributes. If not found in", "recipe_name[-4:] == '.yml': recipe_name = recipe_name[:-4] elif recipe_name[-5:] == '.yaml': recipe_name = recipe_name[:-5]", "if len(RECIPES) == 1 and name != 'default': RECIPES['default'] = RECIPES[data['name']] for recipe", "yaml.l...
[ "from .torch2onnx import torch2onnx from .onnx2trt import onnx2trt from .torch2trt import torch2trt from", ".torch2onnx import torch2onnx from .onnx2trt import onnx2trt from .torch2trt import torch2trt from .base", "from .onnx2trt import onnx2trt from .torch2trt import torch2trt from .base import load, save", ...
[ "7, 'Note that this error indicates losing other scores!' vid_names, all_scores = [],", "s).sum(-1) score = intersection / union return score def forward_loss(self, batch_data, step=None): enc_outs", "rel_edges) return { 'sent_embeds': sent_embeds, 'sent_lens': sent_lens, 'verb_embeds': verb_embeds, 'verb_lens'...
[ "authentication.interfaces.token import verify_token router = APIRouter() security = HTTPBasic(auto_error=True) api_key = APIKeyHeader(name=\"x-api-key\", auto_error=True)", "\"secret\": authorization.password}, ) if not profiles: raise HTTPException(status_code=HTTP_401_UNAUTHORIZED) user[\"acl\"] = jsonable_enc...
[ "print (next_waypoint) q.put((takeoff_drone, { \"drone_id\" : drone_id, \"waypoints\" : waypoints[next_waypoint:] })) def create_new_drone(kwargs):", "value): node.update_drone(drone_id, { \"heading\": value }) mq.put((attach_listener, { \"attach_fn\" : drone.add_attribute_listener, \"attr\" :", "waypoints.inde...
[ "# 将字符串按照其长度进行分组 dp = {} for word in words: pool[len(word)].append(word) for key in", "dp[j] + 1) (0 <= j < i 且 words[j] 是 words[i] 的前身)", "if length < 2: # return length # dp = [1 for _", "20:35:25 # @Runtime: 144 ms # @Memory: 13.3 MB class Solution: # #", "True # # return False # # word2 去除任意一个位置的字符后与 wo...
[ "import partial def duplicateChain(*args): global ogChain global chainLen global switcherLoc global side global", "True) cmds.rename(shapeList, ikFootControl + \"Shape\") ikFootControlGrp = cmds.group(em=1, n=ikFootControl + \"_grp\") cmds.parent(ikFootControl, ikFootControlGrp)", "channels and then connect the...
[ "= 0 while not results.empty(): # Safe because all jobs have finished result", "size))) newImage = oldImage.subsample(stride) newImage.save(targetImage) return Result(0, 1, targetImage) def summarize(summary, concurrency): message", "not os.path.exists(args.target): os.makedirs(target) return args.size, args.sm...
[ "set `delete` to False and run # test once. Then also set `index`", "this method also asserts that we can instantiate a local ES client pointing", "= self._check_endpoint(endpoint=config.service_endpoint(), path=f'/fetch/repository/files/{file_uuid}', query=dict(catalog=catalog)) response = json.loads(response)...
[ ":type user: str :param data_transformation: An old DataTransformationto be updated :type data_transformation: dict", "noqa: E501 \"\"\"List all instances of DataTransformation Gets a list of all instances", "https://w3id.org/okn/o/sd#DataTransformation) # noqa: E501 :param user: Username :type user: str :param...
[ "matplotlib.pyplot as pl import matplotlib except ImportError: warnings.warn(\"matplotlib could not be loaded!\") pass", "pass from . import labels from . import colors def truncate_text(text, max_len): if", "None: feature_names = features.columns features = features.values pl.figure(figsize=(10,3)) ys = shap_v...
[ "wszystko co możliwe, nie ma pliku, zly master itp. i zwrocic 1 wyjątek", "file + \".yaml\").get_all() for srv in servers: if view == 'tree': print(\"| +-\",", "dla keepasa def do_setMaster(self,args): \"Set master password\" if sys.stdin.isatty(): # jezeli jako shell", "wykonywać print(\"Exec on:\") for file...
[ "parallelisation (where possible), sets the internal variables for evaluating the exact solution and", "fempde2.exec_time 3.830256175994873 >>> fempde2.mem_consumption 76705792 \"\"\" def __init__(self, show_gui, max_ndof=50000): super().__init__(show_gui) # init", "Attributes ---------- max_nodf: int the maxim...
[ "plotting import matplotlib.pyplot as plt for i in range(12): #plot edges for j", "2.3405 1.0868 1.5293 2.2197 1.0148 1.2083 1.3041 \"\"\")# network power demands # graph", "2; 4; 7\") # maximum generator power c = np.matrix(\"4; 8; 5; 3\")", "0 1 0 0 1 ; 0 0 0 0 0 0 0", "0 0 0 0 0 0 0 0 0 0 0 1 0", "text...
[ "between values of any two nodes. # # Example: # # Input: #", "which is the difference between 2 and 1 (or between 2 and 3).", "# Input: # # 1 # \\ # 3 # / # 2", "# # 1 # \\ # 3 # / # 2 # #", "# Output: # 1 # # Explanation: # The minimum absolute difference is", "and 1 (or between 2 and 3). # Definition f...
[ "= '%Y-%m-%dT%H:%M:%S.%f%z' def in_error(self, message): self.message = message def backend_error(self, msg): raise BackendError(msg)", "BackendError import datetime, logging logger = logging.getLogger(__name__) CHOICES_APE = dict(choices.APE) CHOICES_LEGALFORM = dict(choices.LEGALFORM)", "date): return datetim...
[ "engine = create_engine(SQLALCHEMY_DATABASE_URL) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db():", "Base = declarative_base() def get_db(): db = SessionLocal() try: yield db finally: db.close()", "= create_engine(SQLALCHEMY_DATABASE_URL) Sessio...
[ "get_all(self): for (name, _) in self.storage_classes.iteritems(): yield name class RPlacementTarget: def __init__(self, name,", "try: cur[name][var] = cfg.getint(section, var) except ConfigParser.NoOptionError: pass for var in bool_config_opts: try:", "import yaml import ConfigParser import rados from boto.s3....
[]
[]
[ "0], \"B\": [10, 30], \"C\": [0, 10], \"D\": [0, 0]} result = is_intersect(**args)", "{\"prev_center\": [0, 0], \"current_center\": [10, 0]}, # Right {\"prev_center\": [10, 0], \"current_center\": [0,", "[0, 10], \"current_center\": [0, 0], \"expect\": True}, \"bottom\": {\"prev_center\": [0, 0], \"current_cent...
[]
[ "= ps.create_runs_upto(3) self.assertEqual([r.id for r in runs], [0, 1, 2]) self.assertEqual([r.seed for r", "self.assertEqual([r.seed for r in runs], [0, 1, 2]) def test_is_finished(self): ps = ParameterSet.find_or_create(0,", "caravan.tables import Tables from caravan.parameter_set import ParameterSet class P...
[ "indirect=True) @pytest.mark.parametrize(\"test_s3_enabled\", [True], indirect=True) def test_correct_enabled( self, test_s3_enabled: bool, test_s3_autocreate_buckets: bool, test_s3_manager_settings: OverhaveS3ManagerSettings,", "bool) -> None: settings = OverhaveS3ManagerSettings(enabled=test_s3_enabled) assert ...
[ "of the remainder of the line. 4. Typing an empty line repeats the", "list. \"\"\" return [] def completenames(self, text, *ignored): dotext = 'do_'+text return [a[3:]", "AttributeError: try: doc=getattr(self, 'do_' + arg).__doc__ if doc: self.stdout.write(\"%s\\n\"%str(doc)) return except AttributeError: pass"...
[ "has_add_permission(self, request): return False @admin.register(receiverInfo) class receiverInfoAdmin(admin.ModelAdmin): date_hierarchy = 'created_at' list_display = ('id',", "= 25 search_fields = ('user__phone_number', 'user__email', 'code') readonly_fields = ('user','cart', 'receiver', 'payment_mode', 'shippin...
[ "Node(val, self.head) self._size += 1 def append(self, val): \"\"\" appends node to the", "in reversed(iter): self.insert(item) def __repr__(self): \"\"\" assumes head will have a val and", "if current._next.val == val: new_node._next = current._next current._next = new_node self._size += 1", "= None self._si...
[ "= cms.untracked.uint32(1) ) process.load(\"Configuration.StandardSequences.MagneticField_cff\") process.load(\"Geometry.CMSCommonData.cmsIdealGeometryXML_cfi\") process.load(\"Geometry.CommonTopologies.globalTrackingGeometry_cfi\") process.load(\"RecoMuon.DetLayers.muonDetLayerGeometry_cfi\") process.load(\"Geomet...
[ "predicted_B.extend(torch.argmax(outputs[1], axis=1).cpu().numpy().tolist()) del model return original_A, original_B, predicted_A, predicted_B def train_and_save(self, texts, labels,", "np.array(labels) skf = StratifiedKFold(n_splits=splits) original = [] predicted = [] for train_index, test_index", "attention_...
[ "data=None): self.action = action self.data = data class Rsponse: def __init__(self): self.status =", "Message class Implementation # @author: <NAME> <<EMAIL>> class Message: class Request: def __init__(self,", "class Message: class Request: def __init__(self, action=\"\", data=None): self.action = action self....
[ "#!/usr/bin/python from mod_pywebsocket import msgutil import time def web_socket_do_extra_handshake(request): pass # Always accept.", "msgutil import time def web_socket_do_extra_handshake(request): pass # Always accept. def web_socket_transfer_data(request): time.sleep(3) msgutil.send_message(request,", "mod_...
[ "an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND,", "distributed on an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY", "super().__init__(**kwargs) if not (command or powershell): raise ValueError(\"Must provide either 'command' or 'powershell'\")", "express or implied. See th...
[ "convert_group_settings(group_name, setting): \"\"\"Convert UserGroupSettings to UserGroupSettingsWrapper.\"\"\" return api_pb2_v1.UserGroupSettingsWrapper( groupName=group_name, who_can_view_members=setting.who_can_view_members, ext_group_type=setting.ext_group_type, last_sync_time=setting.last_sync_time) def", ...
[ "= relation self.query_executer = kg_query_interface self.quality = quality self.quality_aggregation = quality_aggregation self.labels_indexer=Indexer(store=kg_query_interface.type, endpoint=kg_query_interface.endpoint,", "'') else: out_str = str(p) out_file.write(out_str) out_file.write('\\n') with open(out_file...
[ "return any(filename.endswith(extension) for extension in IMG_EXTENSIONS) def dataloader(filepath): left_fold = 'image_2/' train =", "'.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', ] def is_image_file(filename): return any(filename.endswith(extension)", "IMG_EXTENSIONS = [ '.jpg', '.JPG', '.j...
[]
[ "def get_quote_list(request): \"\"\" Get list of quotes IDs. \"\"\" page = int(request.params.get(\"page\", \"0\"))", "from weaver.processes.types import PROCESS_APPLICATION, PROCESS_WORKFLOW from weaver.processes.wps_package import get_package_workflow_steps, get_process_location from weaver.store.base import", ...
[ "col1, col2, col3, strava_button @st.cache(show_spinner=False) def get_activities(auth, page=1): access_token = auth[\"access_token\"] response =", "STRAVA_CLIENT_ID, \"redirect_uri\": APP_URL, \"response_type\": \"code\", \"approval_prompt\": \"auto\", \"scope\": \"activity:read_all\" } ) return request.url", ...
[ "import gettext progName = ufw.common.programName gettext.install(progName)#, unicode=True) # for i18n; fixes '_' not", "else: run('allow ' + pp) def deny(port=None, protocol=None): # port int; protocol str", "ufw.reset() # restore defaults # ufw.status() # return status string (default verbose=True) #", "pr ...
[ "test_funcs() libsalt.simulationStep() step = libsalt.getCurrentStep() libsalt.close() print(\"Python: Simulation End!!!\") def test_funcs(): standbys =", "<reponame>etri-city-traffic-brain/traffic-simulator import libsalt def test(salt_scenario): libsalt.start(salt_scenario) libsalt.setCurrentStep(25200) step = ...
[ "-15, -10), \"Copy\", sizeStyle='small', callback=self.buttonCallback) self.w.setDefaultButton( self.w.copybutton ) # Load Settings: if not", "c<0): scale_y = scale_y * -1 rotation = math.atan2(b, a) * (180/math.pi) return", "layer\" for i in range( num_into )[::-1]: del targetLayer.paths[i] if num_from > 0:", ...
[ "in enumerate(codes): filename = \"filename%i\" % idx contents[filename] = code start = code.index(\"S\")", "S____ E \"\"\"), \"\"\"\\ at filename0 line 1: S____ ~~~~~\"\"\") def test_describes_multi_file_location(self): self.assertEqual(", "If a copy of the MPL was not distributed with this file, #", "1: S ~...
[ "bind = config[\"BIND\"], cont = config[\"CONT\"] benchmark: \"benchmarks/star_SP/{samples}.tsv\" message : \"Running STAR second", "= ancient(config[\"REF\"] + \"REindexing_done.txt\"), R1 = config[\"TRIMMED\"] + \"{samples}_trim.fastq.gz\", genomeDir = ancient(config[\"REF\"]) output:", "# # Inputs: # - sampl...
[ "= models.EmailField() job_title = models.CharField(max_length=60) job_description = models.TextField() salary = models.PositiveIntegerField() city =", "company_name = models.CharField(max_length=50) company_email = models.EmailField() job_title = models.CharField(max_length=60) job_description = models.TextField...
[ "comment=comment, created_on=datetime.now()) comment_content.save() profile.comments_number = profile.comments_number + 1 profile.save() return redirect('index') else: print('form", "login(request,user) return redirect('index') else: messages.error(request, 'Error occured during registration') context = {'reg_for...
[ "in xml_lexicon: lemgrams = [] for saldo, match in list(xml_lexicon[lem].items()): lemgrams.append(PART_DELIM1.join([saldo, match])) picklex[lem]", "log.info(\"OK, read %d words\", len(self.lexicon)) def lookup(self, lem): \"\"\"Lookup a word in the", "out_annotation.append(util.AFFIX + util.DELIM.join(set(sald...
[ "= os.path.abspath(os.path.join(os.path.dirname(__file__), \"../config\")) return config_path def get_data_path(): data_path = os.path.abspath( os.path.join(os.path.dirname(__file__), \"../../../data/\") )", "import os def get_root_path(): current_path = os.path.abspath(os.path.dirname(__file__)) root_path = os.p...
[ "import hooks @hooks.register('insert_editor_js') def enable_source(): return format_html( \"\"\" <script> registerHalloPlugin('hallohtml'); </script> \"\"\" )", "django.utils.html import format_html from wagtail.wagtailcore import hooks @hooks.register('insert_editor_js') def enable_source(): return format_html(...
[ "200, r.text assert r.json() == { \"notify_url\": \"/v2/notify\", \"subscriptions_url\": \"/v2/subscriptions\", \"entities_url\": \"/v2/entities\", \"types_url\":", "requests.get('{}'.format(api_url)) assert r.status_code == 200, r.text assert r.json() == { \"notify_url\": \"/v2/notify\", \"subscriptions_url\":",...
[ "d = step.runCommand(cmd) d.addCallback(lambda res: self.commandComplete(cmd)) return d def commandComplete(self, cmd): # False", "to make a build step conditional to existence of some file. For example", "existence on the worker. I return True if the file with the given", "not any other file # system object....
[ "(env.compute_terminal(whos_turn=Color.Blue) is not WinEnum.NoWin) if current_episode.is_terminal:# Blue won the game! blue_won_the_game=True else: #####", "EVALUATE) env.take_action(Color.Red, action_red) # take the action! current_episode.is_terminal = (env.compute_terminal(whos_turn=Color.Red) is not WinEnum.N...
[ "generates the joint, outer and inner distributions. Attributes ---------- channel : core.Channel Channel", "joint_t.T def _reduce_hyper(self): \"\"\"Given the hyper-distribution generated by _generate_posteriors remove columns with zeros", "arange(self.inners.shape[1]): for j in arange(i+1, self.inners.shape[1...
[ "- Control how the priority rule sets the priority of interfaces in the", "health_check: \"<your_own_value> (source system.virtual-wan-link.health-check.name)\" id: \"102\" src: - name: \"default_name_104 (source firewall.address.name firewall.addrgrp.name)\"", "str required: false username: description: - Fort...
[ "print(\"Ahora estas en la habitacion\", habitacion.id) if habitacion.hijos[0] == None: pass else: if", "self.lado1=None def get_abierta(self): return self.abierta def print_cosas(self): print(\"hola\") def set_abierta(self, value): self.abierta =", "set_lado2(self, value): self.lado2 = value def espuerta(self)...
[ "bounce_ball(self, ball): if self.collide_widget(ball): ball.velocity_x *= -1 print('hello world') class PongBall(Widget): velocity_x =", "from random import randint class PongPaddle(Widget): score = NumericProperty(0) def bounce_ball(self, ball): if", "PongGame(Widget): ball = ObjectProperty(None) player1 = Ob...
[ "class SceneRelation: def __init__(self): self.on_ground = set() self.on_block = {} self.clear = set()", "SceneRelation: def __init__(self): self.on_ground = set() self.on_block = {} self.clear = set() def", "= set() self.on_block = {} self.clear = set() def print_relation(self): print(self.on_ground) print(sel...
[ "0: opening_suit = card // 13 hands[player_idx].remove(card) cards_played.append(card) # Get the winning card.", "they beat their partner? self.partner_win(valid_cards, agent_valid_cards, card, cards_played, partners_cards) \"\"\"''''''''''''''''''''''''''''''''''''''''''''''''''''''''' \" \" PLAY", "== 12: p +...
[ "hacs.hass = HomeAssistant() hacs.hass.config.config_dir = tmpdir hacs.configuration = Configuration() await data.async_write() @pytest.mark.asyncio async", "hacs.hass.config.config_dir = tmpdir hacs.configuration = Configuration() hacs.system.status.background_task = False hacs.system.disabled = False await", ...