ngram
listlengths
0
82k
[ "class Meta: fields = ( \"id\", \"couverture\", \"usage\", \"millesime\", \"map_color\",", "( \"nom\", \"code_insee\", \"surface\", ) geo_field = \"mpoly\" model =", "\"surface\", ) geo_field = \"mpoly\" model = ZonesBaties2018 class CouvertureSolSerializer(serializers.ModelSerializer):", "GeoJSON serializer....
[ "from django.contrib import admin from .models import SearchResult # Register", "your models here. class SearchResultAdmin(admin.ModelAdmin): fields = [\"query\", \"heading\", \"url\",", "import admin from .models import SearchResult # Register your models", "import SearchResult # Register your models here. c...
[ "nlu_data = await asyncio.gather( file_importer.get_stories(), file_importer.get_nlu_data() ) # if stories.is_empty()", "output_path: Text = DEFAULT_MODELS_PATH, force_training: bool = False, fixed_model_name: Optional[Text]", "train_path = stack.enter_context(TempDirectoryPath(tempfile.mkdtemp())) # bf mod fro...
[ "if prices[j]<=prices[i]: res.append(prices[i]-prices[j]) break if j==len(prices)-1: res.append(prices[i]) res.append(prices[-1]) return res", "in range(len(prices)): for j in range(i+1,len(prices)): if prices[j]<=prices[i]: res.append(prices[i]-prices[j]) break", "List[int]: res = [] for i in range(len(prices)...
[ "self._context['is_redraw'] = False self._is_multi = len(sources) > 1 if not", "self._vim.command('vertical resize ' + str(winwidth)) if not is_current_buffer: self._vim.call('win_gotoid', restore)", "= ( 'Normal:' + self._context['highlight_window_background'] ) self._vim.command(('syntax match deniteSelectedL...
[ "_stdchannel_redirected(stdchannel, dest_filename, mode=\"w\"): \"\"\" A context manager to temporarily redirect", "= None dest_file = None try: if stdchannel is None:", "\"RedirectStderr\"] @contextlib.contextmanager def _stdchannel_redirected(stdchannel, dest_filename, mode=\"w\"): \"\"\" A context manager", ...
[ "\"grey\" app_email = \"<EMAIL>\" app_license = \"MIT\" # Includes in", ": \"public/js/doctype.js\"} # doctype_list_js = {\"doctype\" : \"public/js/doctype_list.js\"} # doctype_tree_js", ": \"public/js/doctype_tree.js\"} # doctype_calendar_js = {\"doctype\" : \"public/js/doctype_calendar.js\"} fixtures =", "\...
[ "= Embedding(self._vocab_size, 64)(question) eb_question = Dropout(0.3)(eb_question) conc = concatenate([eb_story, eb_question],", "KerasModel class SimpleLSTM(KerasModel): \"\"\" Use a simple lstm neural network", "name='story') question = Input((self._query_maxlen, ), name='question') conc = concatenate([stor...
[]
[ "activationName self.bn_name = bnName self.first_output = num_planes self.in_planes = self.first_output", "from easyai.model.base_block.cls.pnasnet_block import CellA, CellB __all__ = ['pnasnet_A', 'pnasnet_B'] class", "def downsample(self, planes): down_block = self.block(self.in_planes, planes, stride=2, bn_n...
[ "def get_access_token(token): resp = None request_count = 0 url =", "CONUS, 30m resolution \" \"SRTM between 60N and 60S, 30m", "global coverage of 1000m.\", \"extensions\": [\"watermask\", \"vertexnormals\", \"octvertexnormals\", ], \"format\":", "{ \"endX\": 1, \"endY\": 0, \"startX\": 0, \"startY\": 0 }", ...
[ "2017 @author: dhingratul \"\"\" import urllib.request import os from selenium", "download after the timeout period, an exceptions is thrown, and", "1 return flag def getDriver(url): driver = webdriver.Chrome() driver.get(url) return", "return driver def is_valid_pdf(fn): \"\"\"Check is the PDF valid \"\"\"",...
[ "the most similar trajectory to a given country? Plots similar", "= len(LINE_STYLES) dist_diff = os.path.join('../exp/results/', 'knn_raw.json') f = open(dist_diff,) dist_diff", "= other_region.replace('*', '') plt.title(f'Comparing confirmed cases in {region} and {other_region}')", "for val in regions: df = ...
[ "context (currently not happening, since unclear, how and why helpful)", "not happening, since unclear, how and why helpful) # self.device", "information needs to be passed to # version D self.training", "* x^{m + 1}|) `C`: Q(x) = (0.1 + |b_0", "import Rational_base class Rational(Rational_base, HybridBlock...
[ "+ yy - 2 * torch.matmul(x, y.t()) dist = dist.clamp(min=1e-12).sqrt()", ": https://github.com/earhian/Humpback-Whale-Identification-1st-/blob/master/models/triplet_loss.py def euclidean_dist(x, y): \"\"\"Computes Euclidean distance.\"\"\" m, n", "+ 1e-12 return num / denom # Source : https://github.com/earhian...
[ "sbahn_munich integration\"\"\" line_dict = { \"name\": \"S3\", \"color\": \"#333333\", \"text_color\":", "integration\"\"\" line_dict = { \"name\": \"S3\", \"color\": \"#333333\", \"text_color\": \"#444444\",", "\"\"\"Tests for the sbahn_munich integration\"\"\" line_dict = { \"name\": \"S3\",", "line_dict =...
[ "flask import render_template from flask_login import login_required homestack = Blueprint(\"homestack\",", "python2.7 # -*- coding: latin-1 -*- from flask import Blueprint", "# -*- coding: latin-1 -*- from flask import Blueprint from", "coding: latin-1 -*- from flask import Blueprint from flask import", "f...
[ "established on :py:class:`StripeModelForm` \"\"\" class Meta: model = Supporter fields", "urls_enabled' }), 'site_url': forms.TextInput(attrs={ 'data-bind': 'value: site_url, enable: urls_enabled' }),", "{ 'public': _('Your name and image will be displayed on", "a receipt'), 'logo_url': _(\"URL of your compa...
[ "self._get_multi_todict def _get_one(self, name, *args, **kwargs): return(self._get_one_raw(name, 'All', 'json')) def", "params = { 'q': symbol, 'type': typ, 'output': output, }", "(result[-1][1] == ','): result.pop() # fix single-quoted strings elif (tokid", "option\" \"vol\": \"the volume of options traded....
[ "embed, rate=1): label_set, len_all = self.preprocess_get_label_set(path) # 获取label转index字典等, 如果label2index存在则不转换了, dev验证集合的时候用", "keras_textclassification.data_preprocess.text_preprocess import load_json, save_json from keras_textclassification.conf.path_config import path_model_dir path_fast_text_model_vocab2in...
[ "for documentation. class PixelExpectations(GpuTestExpectations): def SetExpectations(self): # Sample Usage: #", "LICENSE file. from gpu_tests.gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations", "license that can be # found in the LICENSE file.", "self.Fail('Pixel_CSSFilterEffects...
[ "name='BudgetItem', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('year', models.IntegerField()), ('agency',", "('status_changed_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MOD...
[ "based on SMO algorithm', author_email=\"<EMAIL>\", packages=['pysvm'], license='MIT License', long_description=open('README.md', encoding='utf-8').read(),", "#enables develop setuptools.setup( name='pysvm', version='0.1', description='PySVM : A NumPy implementation", "description='PySVM : A NumPy implementatio...
[ "cv2.imread(PATH_TO_IMAGE) image_expanded = np.expand_dims(image, axis=0) # Perform the actual detection", "boxes and scores around the objects of interest in the", "[1, None, None, 3] # i.e. a single-column array, where", "results') vis_util.visualize_boxes_and_labels_on_image_array( image, np.squeeze(boxes)...
[ "import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E06000027' addresses_name = 'parl.2017-06-08/Version", "data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E060000...
[ "rest_framework.views import APIView from rest_framework.response import Response from rest_framework.decorators import", "category_slug, format= None): category = self.get_object(category_slug) serializer = CategorySerializer(category) return", "category_slug): try: return Category.objects.get(slug=category_sl...
[ "other): return (self.id is None or other.id is None or", "maxsize class Contact: def __init__(self, fname=None, mname=None, lname=None, nick=None, title=None,", "home self.mobile = mobile self.work = work self.fax = fax", "is None or self.id == other.id) and self.fname == other.fname", "email3=None, homepa...
[ "ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,", "in the # documentation and/or other materials provided with the", "\"b\", \"\", 1.0 ), ] ) savePath = os.path.abspath( os.path.join(", "p = IECore.BasicPreset( testObj, testObj.parameters()[\"b\"] ) self.assertTrue( p.applicableTo( testObj,...
[ "a parameter. Based on above, total dimensionality of state vector", "import layout, pacman, game, ghostAgents from .PacmanPackage import graphicsDisplay import", "# Sleep for 0.1 sec def step(self, a): \"\"\" Applies", "eaten stuff for graphics (original code assumes # graphics are", "2]) statespace_limits...
[ "def get_working_directory(template): \"\"\"Return the collection which is the main working", "is the main working directory. template: Template which will be", "\"\"\"Global CMS settings.\"\"\" default_year = zope.schema.Int( title=_(\"Default year\"), min=1900, max=2100)", "default_volume = zope.schema.Int(...
[ "N, M = map(int, input().split()) for i in range(1, M", "j = (i - 2) // 2 print(M + 2", "range(1, M + 1): if i % 2 == 1:", "= (i - 1) // 2 print(1 + j, M", "j) else: j = (i - 2) // 2 print(M", "print(1 + j, M + 1 - j) else: j", "in range(1, M + 1): if i % 2 ==", "% 2 == 1: j = (i - 1) //", "1): if i...
[ "API SDK for Python\", long_description=long_description, license='Apache License 2.0', packages=[ \"facebookbot\",", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR", "fd: m = reg.match(line) if m: __version__...
[ "2.0 (the \"License\"); # you may not use this file", "a decoder. Mask values selected in `[0, 1]`: - 1", "its model (such as downloading or saving, resizing the input", "else: raise ValueError(\"You have to specify either input_ids or inputs_embeds\")", "weights after the attention softmax, used to compute...
[ "from eth2.beacon.validation import ( validate_slot, ) if TYPE_CHECKING: from eth2.beacon.state_machines.base", "self.get_chaindb_class()(base_db) # # Helpers # @classmethod def get_chaindb_class(cls) -> Type['BaseBeaconChainDB']:", ") state, imported_block = self.get_state_machine(base_block_for_import).import...
[ "send command to the device device_access.send(\"ter len 0\\nshow run \\n\")", "FOR SINGLE COMMAND, FOR MULTIPLE COMMANDS CODE BELOW # send", "client.invoke_shell() for line in f2: device_access.send(line) time.sleep(1) output = device_access.recv(55000).decode('ascii')", "= input('Provide IP address to conne...
[ "10 # k = n % 10 # if n", "返回出去的列表 for i in l1: re_l1.append(i) def jisuan(str_num): he1 =", "# 返回出去的列表 for i in l1: re_l1.append(i) def jisuan(str_num): he1", "** 3 + k ** 3: # print(n) # 第一道题(16)", "# l1 = s1.split(' ') # l2 = [] #", "re_l1.append(i) def jisuan(str_num): he1 = 0 global out_l1 for i", ...
[ "need to run early, so they get a high priority", "long lists, but adds a little complexity and doesn’t really", "default arguments for the alias Dagoba.addPipetype(newname, function() {}) # because", "Dagoba.addTransformer(function(program) { return program.map(function(step) { if(step[0] != newname) return ...
[ "110 POLLING = 120 CALLBACK = 130 SUCCESS = 200", "300 # 任务重试 FAILURE = 400 # 任务执行失败 REVOKED =", "# 任务重试 FAILURE = 400 # 任务执行失败 REVOKED = 500", "2020-12-2 @desc: ... \"\"\" class JobStatus(object): PENDING = 0 #", "\"\"\" class JobStatus(object): PENDING = 0 # 任务等待执行 STARTED =", "-*- \"\"\" @auth: cml @da...
[ "carnê. \"\"\" def __init__(self, file_descr, landscape=False): # Tamanhos em px", "para modelo de página inteira :param boletoDados: Objeto com os", "= 27 self.fontSizeValue = 12 self.title = 'Boleto bancário' self.fileDescr", ":type boletoDados2: :class:`pyboleto.data.BoletoData` \"\"\" raise NotImplemented...
[ "= 0 i = 0 while i < 5: summary", "0 while i < 5: summary = summary + i", "5: summary = summary + i print(summary) i = i", "= summary + i print(summary) i = i + 1", "= 0 while i < 5: summary = summary +", "i = 0 while i < 5: summary = summary", "0 i = 0 while i < 5: summary =", "while i < 5: summary =...
[ "imtreat img = imtreat.imageManagerClass.openImageFunction(\"../images/soleil.png\", 0) img = imtreat.definedModesClass.detailEnhanceFunction(img) imtreat.imageManagerClass.saveImageFunction(\"/Téléchargements/\", \"image_1\",", "img = imtreat.imageManagerClass.openImageFunction(\"../images/soleil.png\", 0) img =...
[ "RAM implies 512MB of RAM allocated at startup. Possible values:", "service or its path is in the PATH environment variable", "path to an ``mkisofs.exe`` installation. \"\"\"), cfg.StrOpt('vswitch_name', help=\"\"\" External virtual", "a VHD, otherwise the config drive will remain an ISO.", "provided, the f...
[ "input(\"Chemin d'écriture ? (words.txt) \") if path == \"\": path", "x: len(x) > 4, words_list.split('\\n')) path = input(\"Chemin d'écriture ?", "4, words_list.split('\\n')) path = input(\"Chemin d'écriture ? (words.txt) \") if", "= input(\"Chemin d'écriture ? (words.txt) \") if path == \"\":", "len(x) > ...
[ "gallery_path, 's3://testbucket/path/', '--exclude', '.DS_Store']) # Test upload to bucket without", "prefix uploader.upload_gallery('testbucket/path/', gallery_path) subprocess_run.assert_called_with( ['aws', 's3', 'sync', gallery_path, 's3://testbucket/path/', '--exclude',", "# Test upload to bucket without t...
[ "self.label_add_subject.setText(_translate(\"Dialog_add_subject\", \"ADD SUBJECT\", None)) self.label_year.setText(_translate(\"Dialog_add_subject\", \"YEAR\", None)) self.label_semester.setText(_translate(\"Dialog_add_subject\", \"SEMESTER\", None))", "file will be lost! from PyQt4 import QtCore, QtGui try:", ...
[ "test_pre_syncdb_args(self): r = PreSyncdbReceiver() signals.pre_syncdb.connect(r, sender=models) management.call_command('syncdb', database=SYNCDB_DATABASE, verbosity=SYNCDB_VERBOSITY, interactive=SYNCDB_INTERACTIVE,", "OneTimeReceiver(object): \"\"\" Special receiver for handle the fact that test", "= 'defaul...
[ "\"127.0.0.1\" root_node = self.resolve_root_node_address(root_node) os.environ[\"MASTER_ADDR\"] = root_node log.debug(f\"MASTER_ADDR: {os.environ['MASTER_ADDR']}\") return", "last 4 numbers in the job id as the id", "if default_port: # use the last 4 numbers in the", "os.environ.get(\"SLURM_JOB_ID\") if defa...
[ "python import time import os import math from trackball import", "xautomation?\") while True: up, down, left, right, switch, state =", "math.copysign(y**2, y) cmd = 'xte \"mousermove {} {}\"'.format(int(x), int(y)) os.system(cmd)", "when the switch is pressed. Press Ctrl+C to exit! \"\"\")", "= 'xte \"mous...
[ "spec. Return: list[str]: List of key(str) for the network outputs.", "tfp from garage.experiment import deterministic from garage.tf.models import GaussianMLPModel class", "function for the weight of output dense layer(s) in the", "trainable=False) y_std_var = tf.compat.v1.get_variable( name='y_std_var', sha...
[ "= datasets.ImageFolder(valdir, transform_test) num_classes=1000 testloader = torch.utils.data.DataLoader(testset, batch_size=1000, shuffle=False, pin_memory=True,", "True, True) pred = pred.t() correct = pred.eq(target.view(1, -1).expand_as(pred)) res", "test_loss = 0 correct_1 = 0 correct_5 = 0 total", "len...
[ "= { 'adadelta': optim.Adadelta, 'adagrad': optim.Adagrad, 'adam': optim.Adam, 'adamax': optim.Adamax,", "as optim from .search import SamplingSearch, GreedySearch, BeamSearch SEARCH_FACTORY =", "SamplingSearch, 'greedy': GreedySearch, 'beam': BeamSearch, } OPTIMIZER_FACTORY = { 'adadelta':", "} OPTIMIZER_FAC...
[ "= lv._inference_posteriors( [np.random.randn(num_data, 3), np.random.randn(num_data, 2)] ) q_mu = posteriors.parameters[\"loc\"]", "2.0 (the \"License\"); # you may not use this file", "expected_loss = [tf.reduce_mean(posteriors.kl_divergence(prior))] np.testing.assert_equal(lv.losses, expected_loss) # also ch...
[ "PUT /trust/{relationship}}/{actorid} with a json body to change details on", "to create trust relationship') return self.response.headers.add_header( \"Location\", str(Config.root + myself.id", "myself.deleteReciprocalTrust(peerid=peerid, deletePeer=True) if not deleted: self.response.set_status(502, 'Not able...
[ "strategy for 3D lines that go past the camera. Formerly", "prediction data in python. - Skyborg \"\"\", '1.1.3': \"\"\" -", "Skyborg - Java bots will now shut down when the", "to another team in the GUI no longer breaks the", "in python. - Skyborg - Java bots will now shut", "the position, velocity, etc ...
[ "for FullyConnectedHead Args: unique_id: A unique identifier for the head.", "size for the fully connected layer. \"\"\" super().__init__(unique_id, num_classes) assert", "typing import Any, Dict import torch.nn as nn from classy_vision.generic.util", "be attached to a model, and unique_id is used to", "ide...
[ "entry in warning_stations: print(entry[0].name,entry[1]) if __name__ == \"__main__\": print(\"*** Task", "import stations_highest_rel_level def run(): stations = build_station_list() warning_stations = stations_highest_rel_level(stations,10)", "if __name__ == \"__main__\": print(\"*** Task 2C: CUED Part IA", ...
[ "`__copy_create__()` method. All variables, that could not be set via", "objects, that should be copyable. The public method `copy()` first", "constructor takes parameters. Returns ------- copy A freshly instantiated copy", "set via the constructor, are then copied via `__copy_fill__()`, starting", "All var...
[ "import HomeAssistant from wyzeapy.base_client import Device, AccessTokenError from wyzeapy.client import", "= latest_event.event_ts else: self._on = False self._last_event = latest_event.event_ts else:", "-> List[Device]: try: return client.get_cameras() except AccessTokenError as e: _LOGGER.warning(e)", "la...
[ "BRDF 16-day Level 3 products, MCD43C1 (0.05 degree horz res),", "horz res), \"\"\" def __init__ (self,Path,lon,lat,Verb=1): \"\"\" Reads files for", "'Snow_BRDF_Albedo', 'BRDF_Albedo_Ancillary', ) ) ALIAS = dict ( BRDF_Albedo_Parameter1_Band1 =", "( LAND = ('BRDF_Albedo_Parameter1_Band1','BRDF_Albedo_Paramet...
[ "x = Input(shape=(3, 2)) layer = wrappers.TimeDistributed(layers.BatchNormalization()) _ = layer(x)", "mask_outputs = [model.layers[0].compute_mask(model.input)] mask_outputs += [model.layers[1].compute_mask(model.layers[1].input, mask_outputs[-1])] func = K.function([model.input],", "need learning_phase to be ...
[ "from tornado.platform import interface class Waker(interface.Waker): \"\"\"Create an OS independent", "socket.error as detail: if (not hasattr(errno, 'WSAEADDRINUSE') or detail[0] !=", "# assigned (host, port) pair try: self.writer.connect(connect_address) break # success", "first try). See the long thread a...
[ "pathymetric data. The file current named mapserv.png was obtained using", "\"--num-leds\", dest=\"num_leds\", help=\"Number of LEDs in strip (ex: 60)\", default=config[\"num_leds\"])", "if args: print(\"Unknown parameters: \" + args) # grab the", "strip (ex: 70,-110)\", default=config[\"location\"]) parser.a...
[ "in data[key].items(): if multi_value: multi_selects.append(multi_key) output[key] = ', '.join(multi_selects) else:", "for key in data: # flatten list values if isinstance(data[key],", "numbers and building application number elif phone_appnum_key is not None:", "output) else: multi_selects = [] for multi_key...
[ "yield address_info # The code after the yield will run", "= trainer.fit() # If loading from a state dict, a", "def test_torch_linear(ray_start_4_cpus, num_workers): def train_func(config): result = linear_train_func(config) assert len(result)", "= ray.data.range(3) predictions = predict_dataset.map_batches( ...
[ "LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A", "**kwargs): # type: (*Any, **Any) -> Union[str, None] \"\"\"Executes the", "Specifies the rate at which IxNetwork sends learn frames to", "item in kwargs.items(): payload[item[0]] = item[1] return self._execute('applyITWizardConfiguration', payl...
[ "rest_framework import serializers from core import models class AssetSerializer(serializers.ModelSerializer): class", "import models class AssetSerializer(serializers.ModelSerializer): class Meta: model = models.Asset fields", "import serializers from core import models class AssetSerializer(serializers.ModelS...
[ "\"\"\" c(2). p(1). a(2). d(2,2,1). okay(X):- c(X), #count{V:a(V),d(V,X,1)} = 1.", "= 1. ouch(X):- p(X), #count{V:a(V),d(V,X,1)} = 1. \"\"\" output =", "\"\"\" output = \"\"\" {a(2), c(2), d(2,2,1), okay(2), p(1)} \"\"\"", "ouch(X):- p(X), #count{V:a(V),d(V,X,1)} = 1. \"\"\" output = \"\"\" {a(2),", "p(X), ...
[ "str(salt) + \"&sign=\" + sign ) async with ClientSession() as", "langdetect import detect, detect_langs from aiohttp import ClientSession from nonebot", "def _(session: CommandSession): arg = session.current_arg_text.strip() if session.is_first_run: parser =", "= \"en\" else: session.state[\"to\"] = \"zh\" e...
[ "function.\" lib.set_add_rowmode(self.lp, 0) const.fill_buffers(self.colbuff, self.rowbuff) ret = lib.set_obj_fnex(self.lp, len(const.vars), cast(self.rowbuff,", "constraint into the model.\" assert const.optype is not None, \"You", "vtype): lib.set_binary(self.lp.lp, self.index, (vtype == \"int\")) def __rmul_...
[ "id=lb.id, provisioning_status=constants.ERROR) self.assertEqual(2, repo.ListenerRepository.update.call_count) repo.ListenerRepository.update.has_calls( [mock.call('TEST', listeners[0].id, provisioning_status=constants.ERROR), mock.call('TEST', listeners[1].id,", "id=L7RULE_ID) # Test the revert mock_l7rule_repo_...
[ "'3', 'url': 'recruitment'}, #{'id': '4', 'url': 'software'}, #{'id': '5', 'url':", "error connection at url : \" + str(e)) finally: print('done')", "+ \"/\" + city html_search = requests.get(url_search) soup_search = BeautifulSoup(html_search.content,", "+ str(number_of_pages)) elif int(str(number_of_pages_w...
[ "dagster.core.errors import DagsterInstanceMigrationRequired from dagster.core.instance import DagsterInstance, InstanceRef from dagster.utils.test", "runs: instance.all_logs(run.run_id) def test_0_6_6_sqlite_exc(): test_dir = file_relative_path(__file__, 'snapshot_0_6_6/sqlite') with restore_directory(test_dir):...
[ "= df.groupby(['CATEGORY']).size().to_frame('Crimes') labels = ['Trespassing', 'Vehicle theft', 'General Theft', 'Damage", "/ len(df) grouped = grouped.drop(columns='Size') grouped.index = grouped.index.astype(int) p =", "By Year') p.get_legend().remove() plt.savefig('../charts/year.png') def group_by_territory...
[ "2]), 5) self.assertEqual(monroescore_flowbased(profile, [2, 1, 5]), 4) self.assertEqual(monroescore_matching(profile, [2, 1,", "3, 4, 5]], \"av\": [[0, 1, 4, 5], [0, 2,", "2, 4, 5]], \"cc-noilp\": [[0, 1, 2, 3], [0, 1,", "1, 2], [0, 1, 3], [0, 2, 3]]) # this", "msg=rule + \" failed with resolute=True\") de...
[ "# Solve index reading problem, pandas add 2 index to", "'139807', '139808', '139809', '139810', '139811', '139812' ] # The list", "me_df.reset_index(drop=True, inplace=True) # Read rahavard 365 data for calculating returns", "month ME into two groups conditions = [ ( portfo_const_df['market_cap']", "] port...
[ "calcurated_checksum = hashlib.sha256(f.read()).hexdigest() if checksum not in calcurated_checksum: print('ERROR: checksum", "print('ERROR: checksum is different. download is failed') return False with", "license_key, 'suffix': suffix} data = urllib.parse.urlencode(values) try: urllib.request.urlretrieve( url +...
[ "Y[j] = yRef[j] MInv = MM.invertMatrix(M) for i in range(size):", "2.0 (the \"License\"); # you may not use this file", "'baseline' logging_name = 'isce.mroipac.baseline' parameter_list = (BASELINE_LOCATION,) # Calculate the", "not (len(xRef) == len(yRef)): print(\"Error. Expecting input vectors of same", "...
[ "import Card class Deck: \"\"\" Class representing a deck. The", "rank in Card.STR_RANKS: for suit, val in Card.CHAR_SUIT_TO_INT_SUIT.items(): Deck._FULL_DECK.append(Card.new(rank +", "this object and shuffles it. \"\"\" _FULL_DECK = [] def", "i in range(n): cards.append(self.draw()) return cards def __str__(...
[ "LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A", "just remove this token. self._delete_token(self.last_returned_uuid) return None refresh_result = self._refresh_token(self.last_returned_uuid)", "= urlencode(rquery) authz_url = '%s?%s' % (self._idp_url('Authorization'), query) print('Please visit...
[ "False), **attrib) def _encode_param_common(prm, title_required=True): \"\"\" Encode common sub-elements of", "notice shall be included in all # copies of this", "dtype.encode(range_.minval))) if range_.maxval is not None: elms.append(OWS(\"MaximumValue\", dtype.encode(range_.maxval))) if range_.spacing", "LI...
[ "' bucket. ERROR\\n%s' %e) raise return archive_object def build(vp_save={}): '''", "raise ValueError() archive_file = __archive_key(save_data) + '/' + vp_save_pk +", "to ' + bucket + ' bucket. ERROR\\n%s' %e) raise", "for the archive. This value is required. :param str vp_save_pk:", "return vp_save def arc...
[ "=========== This example presents the basic usage of brokenaxes \"\"\"", "Basic usage =========== This example presents the basic usage of", "brokenaxes import brokenaxes import numpy as np fig = plt.figure(figsize=(5,2))", "import brokenaxes import numpy as np fig = plt.figure(figsize=(5,2)) bax", "import...
[ "all.add(stmt) elif prefix == \"org\": stmt = (subject, RDF.type, URIRef(\"https://jpsearch.go.jp/term/type/Organization\"))", "> 20: continue # ln = obj[\"uri\"].split(\":\")[1] ''' wiki_path =", "(subject, RDF.type, URIRef(\"https://jpsearch.go.jp/term/type/Time\")) all.add(stmt) elif prefix == \"place\": stm...
[ "# The first two board answers the ping board_answers =", "in range(1, 3)] + [None] read_can_datagram.return_value = iter(board_answers) write_command_retry.return_value =", "@patch('utils.write_command_retry') @patch('utils.write_command') @patch('utils.read_can_datagrams') @patch('builtins.print') def test_ne...
[ "msg = await diary_embed(username) except LetterboxdError as err: msg =", "err await send_msg(ctx, msg) async def check_if_two_args(ctx): msg = ctx.message.content.split()", "except LetterboxdError as err: msg = err await send_msg(ctx, msg)", "await ctx.send('Sorry, the command crashed. :/') logging.error(ctx...
[ "= [] for (k, s) in store.list_workflow(): if s ==", "-> ray.ObjectRef: \"\"\"Resume a workflow asynchronously. See \"api.resume()\" for details.", "\"\"\" store = get_global_storage() assert ray.is_initialized() if workflow_id is None:", "= workflow_storage.get_workflow_storage(workflow_id) meta = store.load...
[ "from .compose import Compose # noqa from .signature import BinarySignature,", "from .signature import BinarySignature, Signature, MemorySignature # noqa from .username", "import Compose # noqa from .signature import BinarySignature, Signature, MemorySignature", "Compose # noqa from .signature import BinarySi...
[ "x,y,v_x,v_y = u r=np.hypot(x,y) #r= 1.521e+06 #M,G=1.989e+30,6.7e-11 M,G=20,110 f=G*M/r**3 return", "u+(k1+2*k2+2*k3+k4)/6 def RK4_int(f,y0,tspan): y=np.zeros([len(tspan),len(y0)]) y[0,:] =y0 for k in range", "0.0, 10, 10]) sol_rk4=RK4_int(orbit,y0,t) x,y,v_x,v_y = sol_rk4.T plt.grid() plt.plot(x,y) plt.show()...
[ "in apps.get_app_configs(): factory_app_generator = FactoryAppGenerator(app) created_files += factory_app_generator.create_files() self.stdout.write(self.style.SUCCESS('Successfully created", "+= factory_app_generator.create_files() self.stdout.write(self.style.SUCCESS('Successfully created factories:')) for crea...
[ "if args.skip: return {'chunks': [{'__mem_gb': h5_constants.MIN_MEM_GB}]} chunks = [] #", "chunk_outs] analysis_io.combine_h5_files(chunk_h5s, outs.diffexp_h5, [analysis_constants.ANALYSIS_H5_DIFFERENTIAL_EXPRESSION_GROUP, analysis_constants.ANALYSIS_H5_KMEANS_DIFFERENTIAL_EXPRESSION_GROUP]) for csv_dir in chunk_...
[ "permutations as sets. This is used for testing purposes. Since", "import get_symmetric_group_sgs >>> from sympy.combinatorics import Permutation, PermutationGroup >>> g", "size - 2)) S = PermutationGroup(sgens) D = PermutationGroup([Permutation(x) for", "= v[i] v1.append((base_i, gens_i, [[]]*n_i, sym_i)) si...
[ "localhost = \"http://localhost/\" # your local host database = \"mysql://root@localhost/vaticChecker\"", "videos to be considered recaptcha_secret = \"\" # recaptcha secret", "recaptcha secret for verification duplicate_annotations = False # Should the", "to be considered recaptcha_secret = \"\" # recaptcha ...
[ "value def now(): \"\"\" Returns an aware or naive datetime.datetime,", "by settings.TIME_ZONE. \"\"\" if hasattr(_active, \"value\"): del _active.value class override(object):", "by the current time zone, unless another time zone is", "= timezone elif isinstance(timezone, basestring) and pytz is not None:", ...
[ "resp.xpath_text('/wps:Capabilities' '/wps:ProcessOfferings' '/wps:Process' '/ows:Identifier') assert sorted(names.split()) == [ 'download', 'esgsearch',", "resp = client.get(service='wps', request='getcapabilities', version='1.0.0') names = resp.xpath_text('/wps:Capabilities' '/wps:ProcessOfferings' '/wps:Proces...
[ ":: Python :: 3.7\", \"Programming Language :: Python :: Implementation", "author_email=\"<EMAIL>\", url=\"https://github.com/alexdlaird/pyngrok\", download_url=\"https://github.com/alexdlaird/pyngrok/archive/{}.tar.gz\".format(__version__), keywords=[\"ngrok\", \"tunnel\", \"tunneling\", \"webhook\", \"localhost...
[ "arguments=[\"train.py\"], ).apply(gcp.use_gcp_secret() )#.set_gpu_limit(1) def serve_op(): return dsl.ContainerOp( name='serve', image=\"{}:{}\".format(KUBECTL_IMAGE, KUBECTL_IMAGE_VERSION),", "\"kubeflow\", \"--command\", \"apply -f /src/k8s/serve.yaml\", ] ).apply(gcp.use_gcp_secret()) def resultsgen_op(): ret...
[ "publish_event, publisher, TICK_2_MINUTES, network, secs, mins) if mins % 5", "secs, mins) if mins % 60 == 0: utils.do_stuff_with_exponential_backoff(rabbitmq_exceptions, publish_event,", "import utils from infrabbitmq import factory as infrabbitmq_factory from infrabbitmq.rabbitmq", "def main(network): publi...
[ "a pretrained model), or - the model was saved using", "let the specific kwargs override the common ones in case", "be instantiated as a transformer architecture with one of the", "2.0 (the \"License\"); # you may not use this file", "been done) - If a configuration is not provided, ``kwargs``", "containi...
[ "python_callable=mean_homem, dag=dag ) def mean_mulher(): df = pd.read_csv('/usr/local/airflow/data/train.csv') med =", "} # Dag definition dag = DAG( 'treino-03', description=\"Extrai dados", "med = df.loc[df.Sex == 'male'].Age.mean() print(f'Media de idade dos homens", "de idade dos homens no Titanic: {med}...
[ "variable.\\n\" \"In that case it will list only the system", "Dictionary of types from Tcl command, needs to be ordered", "collections.OrderedDict([ ('selection', str), ]) # Dictionary of types from Tcl", "from Tcl command, needs to be ordered , this is", "unnamed_args: :return: \"\"\" if 'selection' in ar...