ngram
listlengths
0
67.8k
[ "节点选择器: 若有同名节点,只输出第一个,不存在,输出None :soup.title 直接子节点: contents、children 孙子节点选择器: descendants 方法选择器: find find_all css选择器: select 获取文本:", "select 获取文本: get_text,string属性 获取属性值: ['key'],attrs['key'] 通过浏览器直接拷贝选择器 ''' from bs4 import BeautifulSoup from urllib3", "方法选择器: find find_all css选择器: select 获取文本: get_text,str...
[]
[ "list(coords[:, 1]) indexx = torch.LongTensor([row, col]) tensor_size = torch.Size([self.data.num_nodes, self.feats_per_node]) degs_out = torch.sparse.FloatTensor(indexx,", "non_exisiting_adj['vals'][indice] all_len = len(label_adj['vals']) + len(non_exisiting_adj['vals']) pos = len(label_adj['vals'])/all_len neg...
[ "* from plugin_system import Plugin plugin = Plugin(\"Отправка сообщения\", usage=[\"напиши [id] [сообщение] -", "ignored_by=uid): return await msg.answer('Вы находитесь в чёрном списке у этого пользователя!') user =", "in await db.execute(Role.select().where(Role.role == \"admin\")): if await get_or_none(Ignor...
[ "# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-21 06:10", "Django 1.10 on 2016-09-21 06:10 from __future__ import unicode_literals from django.db import migrations,", "<filename>cryptonite/challenge/migrations/0010_challenge_users.py # -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-...
[ "delimitador \"?\" comando = '''DELETE FROM Pessoa WHERE cpf=61846350263;''' cursor.execute(comando) print(\"Primeiro Comando Especificado", "# Deletando com uma string sem delimitador \"?\" comando = '''DELETE FROM Pessoa", "'''DELETE FROM Pessoa WHERE cpf=61846350263;''' cursor.execute(comando) print(\"Primei...
[ "if default_driver is None: default_driver = 'Chrome.headless' Driver = _from_env(default_driver=default_driver) return Driver(*args, **kwargs)", "Firefox, Ie, Edge, Opera, Safari, BlackBerry, PhantomJS, Android, Remote] driver_map = {get_driver_name(d): d", "_from_string(webdriver_string) return Driver(*args, ...
[ "import Image, ImageDraw,ImageFont def drawNumberOnIcon(imgpath, number): img = Image.open(imgpath) if (None == img):", "img_size = img.size font = ImageFont.truetype(\"Varela-Regular.otf\", size=int(img_size[1]/4)) text_size = font.getsize(str(number)) draw.text((img_size[0]-text_size[0], 0), str(number),", "I...
[ "anti11 Let f(x) be the number of x length binary strings without 11", "[0, 1, 2] for i in range(2,10001): f.append(g[-1]) g.append((g[-1] + f[-2]) % M)", "Kattis - anti11 Let f(x) be the number of x length binary strings", "number of x length binary strings without 11 ending with 1 Let g(x)", "length binar...
[ "hackerearth solution def oddOneOut(arr : list) : n = len(arr) arr.sort() summation =", "+ (n*2))) print(actual_sum) return actual_sum - summation if __name__ == '__main__' : arr", "one out from hackerearth solution def oddOneOut(arr : list) : n = len(arr)", "summation = sum(arr) actual_sum = int((n+1)/2 * (2...
[]
[ "import PowermeterProfile except: # use stub if powermeter support is not installed from", "pass Profile.__init__(self, values) self['type'] = 'broker' def __hash__(self): return hash(id(self)) def profile_factory(profile): return", "== 'wlan': return WlanProfile(profile) if profile['type'] == 'powermeter': ret...
[ "parameters act, act_param, _, _ = self.agent.act(obs) action = offense_mid_action(act, act_param) while not", "== 'CAPTURED_BY_DEFENSE' timesteps.append(t) returns.append(episode_reward) goals.append(goal) captureds.append(captured) evaluation_results = np.column_stack((returns, timesteps, goals, captureds)) avg...
[ "confusion_matrix, classification_report def read_labels(filename): labels = [] with open(filename) as f: for line", "0 else '-' if diff < 0 else ' ' if diff <", "def main(): parser = argparse.ArgumentParser() parser.add_argument(\"--path\", default=None, type=str, required=True, help=\"Base path\") parser.add_...
[ "path Usage: download_and_extract_zip.py --url=<url> --out_file=<out_file> Options: <url> URL to download zip file from", "with no password) <out_path> Path (including filename) of where to extract the zip", "zip file from (must be a zip file with no password) out_path :", "import zipfile import requests # fr...
[ "\"DERSetting\":\"default\", \"DERModelType\":\"ThreePhaseUnbalanced\", \"DERParameters\":{ \"default\":{ \"solarPenetration\":0.01, \"solarPenetrationUnit\":'kw', \"derId\":\"50\", \"powerRating\":50, \"VrmsRating\":177.0, \"steadyStateInitialization\":True, \"pvderScale\": 1, \"LVRT\":{\"0\":{\"V_threshold\":0.5,...
[ "= variant.get('env_id', None) N = variant.get('N', 100) rollout_length = variant.get('rollout_length', 100) test_p =", "= np.zeros((N, rollout_length, act_dim)) for i in range(N): env.reset() for j in range(rollout_length):", "::-1] cv2.imshow('img', img) cv2.waitKey(1) print(\"done making training data\", fil...
[ "% (branch_name, filename)], stdout=subprocess.PIPE ) return proc.stdout.read().decode() def get_current_branch_name(): \"\"\" Gets the name", ":param branch_name: Name of the branch :return: Contents of the file \"\"\" proc", "files between two branches. :param branch1: name of first branch :param branch2: nam...
[ "To add the default GMT frame to the plot, use ``frame=\"f\"`` in #", "######################################################################################## # Plot frame # ---------- # # By default, PyGMT does not", "marks. fig = pygmt.Figure() # region=\"TT\" specifies Trinidad and Tobago fig.coast(shorelin...
[ "import migrations, models class Migration(migrations.Migration): dependencies = [ ('bot', '0005_auto_20171229_2354'), ] operations =", "[ ('bot', '0005_auto_20171229_2354'), ] operations = [ migrations.AlterField( model_name='user', name='authority', field=models.IntegerField(choices=[(0, 'Master'), (1,", "mig...
[ "elif priority == 9: score_range = (idx.format('9'), '+inf') else: raise ValueError('TODO') return self._redis.zcount(self.name,", "yield value.decode('utf-8') def chunks(iterable, size): \"\"\" A generator which returns chunks of `size`", "the highest to the lowest priority. Only after all items with a high", ...
[ "-> tp.Iterator[str]: # type: ignore return iter(self.__root__) def gen_df(self) -> pd.DataFrame: keys, dfs", "orient=\"columns\") U = tp.TypeVar(\"U\", bound=BaseModelSequence) class BaseModelMapping(tp.Generic[U], BaseModelDf): __root__: tp.Mapping[str, U] def __getitem__(self,", "\"\"\"Get slice of items fro...
[ "import VOAWithIncomeReportRecord from finicityapi.models.prequalification_report_record import PrequalificationReportRecord from finicityapi.models.pay_statement_report_record import PayStatementReportRecord from finicityapi.models.generate_connect_email_response_multiple_borrowers import", "Login Accounts\" Thi...
[ "bound, upper bound, decay rate, cycle length. structure = [784, 256, 128, 10,", "import perceptron as pc import numpy as np def mnist_load(file, samples): raw_data =", "labels = raw_data[:,0] data = np.delete(raw_data, 0, 1)/255.0 return (data, labels) def main():", "= mnist_load(\"mnist_train.csv\", samples...
[ "path = j.sals.fs.join_paths(self.repo_dir, self.repo_name) j.sals.process.execute(f\"git add {file1_name}\", cwd=path) self.git_client.commit(\"commit file 1\", add_all=False) self.info(\"Check", "self.info(\"Check if a new file has been added\") added_file = self.git_client.get_modified_files() self.assertTrue(...
[ "'figure.titleweight': 'bold', 'savefig.dpi': 200, 'axes.titlesize': 18, # main title 'axes.labelsize': 16, # x", "tau = 1. averagePower = totalEnergy / tau #### Reshape to ensure needed", "drawing with matplotlib during debug mode plt._INSTALL_FIG_OBSERVER = True mpl.rcParams.update(plotParams) plt.ion() def P...
[ "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,", "def openListFile(fileName, delim=','): \"\"\" \" Open a file or exit of the program,", "+ fileName + \"'. ABORT.\") sys.exit(-1) text = finput.readlines() finput.close() return text def", "MERCHANTABILITY, FITNESS FOR A PART...
[ "= 0 guess_limit = 3 out_of_guesses = False # while (guess != secret_word):", "secret_word and not(out_of_guesses): if guess_count < guess_limit: guess = input(\"Enter guess: \") guess_count", "program and then the user # will interact with the program to try", "guess = input(\"Enter guess: \") # guess_count ...
[ "generator — netwokrx graph generator, kwargs — generator named arguments ''' self.G =", "self.used_colors = [] self.current_state = np.full(self.n, self.n, dtype=np.uint32) self.done = False self.total_reward =", "#determine by n and m (?) self.edges = np.array(self.G.edges()) self.n = len(self.G.nodes()) self...
[ "works universally def __getattr__(self, name): # Environment variables intentionally override config file. if", "(value := self.value_from_env(name)) is not None: return value if (value := self.value_from_config(name)) is", ":= self.value_from_defaults(name)) is not None: return value self.raise_error(name) de...
[ "lname\") contacts = [ Contact(\"Lex\", \"Luther\"), Contact(\"Firestorm\", \"Lobo\"), Contact(\"Green\", \"Lantern\"), Contact(\"Aquaman\", None), Contact(None,", "In effect, the presentation bias makes the contacts in the on-screen phone book", "return sorted(contacts, key=lambda c: coalesce(c.fname, \"\")) d...
[ "in possible_firmwares: if f.endswith(\"{}.bin\".format(args.firmware)): filename = f break if not filename: print( \"Did", "if d['type'] == 'dir'] possible_revs.sort() return possible_revs def get_goog_sheet(): data = urllib.request.urlopen( \"https://docs.google.com/spreadsheets/d/e/2PACX-1vTmqEM-XXPW4oHrJMD7Qr...
[ "random list of neg value list len 100.\"\"\" return [randint(-1000, 0) for _", "sort algorithm tests.\"\"\" from quick_sort import quick_sort, _quicksort import pytest from random import", "of 10 vals.\"\"\" return [x for x in range(10)] @pytest.fixture(scope='function') def rand_ten(): \"\"\"Make", "[randin...
[ "term. All violations of (1),(2) or (3) will be handled in accordance with", "function, you agree with the following terms: (1) Not sharing your code/solution with", "-------- * a: the index of the action being chosen by the player,", "nose -v test1.py:test_choose_action_explore --- OR ---- python -m nose -v ...
[ "uprtek_import_spectrum - Imports the spectrum from a UPRtek spectrophotometer * uprtek_import_r_vals - Imports", "files Note2: This has only been tested with the UPRtek CV600 and MK350N.", "intensities, e.g.: {380: 0.048, 381: 0.051, ...} \"\"\" def uprtek_import_spectrum(filename: str): return uprtek_file_imp...
[ "auto_gen: return render_to_response('group-add.html', { \"user\": account, \"member_names\":member_names, }, context_instance=RequestContext(request)) group = Group.by_short_name_and_user(short_name, account)", "]+[^,. ])\") s = re.compile(r'(\\A|\\s)@(\\w+)') if isinstance(statuses,Status): temp = [] temp.appen...
[ "ret = p.poll() if ret is not None: processes.remove(p) spawncount = count -", "for p in list(processes): ret = p.poll() if ret is not None: processes.remove(p)", "= list() # In[ ]: def __tick_list(processes, script, count): for p in list(processes):", "list(processes): ret = p.poll() if ret is not None: proc...
[ "check(lst, l): for i in range(l): if lst[0]<=lst[i]: sort = 1 else: sort", "0 break print(sort) T = int(input()) for i in range(T): n = int(input())", "lst[0]<=lst[i]: sort = 1 else: sort = 0 break print(sort) T = int(input())", "sort = 1 else: sort = 0 break print(sort) T = int(input()) for", "T = int(inp...
[ ">= 60: print('Liquidating positions.') api.close_all_positions() sold_today = True else: sold_today = False if", "for _, row in ratings.iterrows(): # \"Buy\" our shares on that day and", "calendar.date) print('Portfolio value on {}: {:0.2f} $'.format(calendar.date.strftime( '%Y-%m-%d'), portfolio_amount) ) if ...
[ "<filename>alfacoins/__init__.py from .gateway import ALFACoins from .exceptions import APIException, ServerException __version__ = '0.1.0a2'" ]
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, softwar...
[ "sdata) resp = sock.makefile() sdata = resp.read(8) size = int(sdata, 0) data =", "def __exit__(self, type, value, traceback): self._stop_daemon() os.remove(self.socket) return False def send(self, test): params", "50 Memory = 4294967296,0 Program = %(path)s/python Channel = /dev/stdin,/dev/stdin,0,0,4294967296...
[ "#plt.plot(data[0],data[1],'co-',label='Simulation') #plt.plot(data[0],180/3.14*np.arctan(data[0]),'lightsalmon',linestyle='--',label='Experience') #plt.ylabel('Repose Angle [deg]') #plt.xlabel('Energy loss coefficient u1 [1]') #plt.legend() #plt.show() plt.figure().dpi=120", "#plt.show() plt.figure().dpi=120 plt...
[ "-> Tuple[tf.Variable, ...]: return tuple(self._model.trainable_weights) def get_loss(self, previous_frame: 'StateFrame', current_frame: 'StateFrame') -> Optional[tf.Tensor]:", "StateFrame from cephalus.kernel import StateKernel from cephalus.modules.interface import StateKernelModule __all__ = [ 'InputPrediction...
[ "directory\") sys.exit(1) args[\"output\"] = val # Get the input file if len(vals) >", "show def help_message(): print(\"usage: minij [OPTIONS] [FILE]\\n\") print(\"OPTIONS:\") print(\" -h, --help Show help", "message if opt in (\"-h\", \"--help\"): args[\"help\"] = True help_message() sys.exit(0) # Get", "= ...
[ "= Contact(\"Test\",\"user\",\"0712345678\",\"<EMAIL>\") test_contact.save_contact() self.new_contact.delete_contact() self.assertEqual(len(Contact.contact_list),1) def test_find_contact_by_number(self): self.new_contact.save_contact() test_contact = Contact(\"Test\",\"user\",\"0711223344\",\"<EMAIL>\") test_contac...
[ "elif(cmd[:3] == 'PUT'): os.chdir('c:/Users/<NAME>/Desktop/client') dosyalar = os.listdir('c:/Users/<NAME>IN/Desktop/client') #göndereceğimiz dosyanın yolunu giriyoruz if cmd[4:]", "l = f.read(buf) print('Tamamlandı') print('Bağlantı kapatılıyor') sys.exit() else: print('Böyle bir dosya bulunamadı') elif(cmd[:3]"...
[ "self.app = app.test_client() def test_page_loads(self): response = self.app.get('/') self.assertEqual(response.status_code, 200) self.assertIn(b'<title>IGV - Integrative", "test_get_data_from_private_dir(self): app.config['PUBLIC_DIR'] = '/static/js' response = self.app.get('static/data/public/gstt1_sample.bam')...
[ "minimum Sky cover for Wx is 50-100% if self._SkyLimit < 50: self._SkyLimit =", "where there is not enough cloud \\ to support the corrsponding PoP. The", "InvalidSkyMask1 = logical_and(less(Sky, PoP * self._factor), less_equal(PoP * self._factor, 100)) InvalidSkyMask2 = logical_and(less(Sky,", "be solicited ...
[ "License is distributed on an \"AS IS\" BASIS, WITHOUT # WARRANTIES OR CONDITIONS", "writing, software # distributed under the License is distributed on an \"AS IS\"", "Unless required by applicable law or agreed to in writing, software # distributed", "See the # License for the specific language governing pe...
[ "of the keys print(key, KEYSIZE) key_index = 0 out = [] decrypted_strings[KEYSIZE] =", "# finds the total number of 1's in the XOR's return sum([1 for", "for x in blocks if len(x) > z]: out_arr.append(ord(i) ^ j) strings[i] =", "if chr(x) in chars]), ord(i))) key += chr(max(answer)[1]) # prints out all of", ...
[ "__init__(self): tk.Tk.__init__(self) #hackish way, essentially makes root window #as small as possible but", "Image, ImageTk import json from rmq import RMQiface urls = [ 'https://cdn.revjet.com/s3/csp/1578955925683/shine.png', 'https://cdn.revjet.com/s3/csp/1578955925683/logo.svg',", "= RMQiface(host, queue, ...
[ "src.core.actions.executable import _validate_pattern from src.core.models import ActionExecution from src.core.px_git import checkout_new_branch from src.core.px_questionary", "self.parameters.source affix = self.parameters.affix pattern = self.parameters.pattern _validate_pattern(source.pattern, source.name, \"...
[ ".models import Artigo, Comentario class ArtigoForm(forms.ModelForm): class Meta: model = Artigo fields =", "Artigo fields = ('titulo', 'texto',) class ComentarioForm(forms.ModelForm): class Meta: model = Comentario fields", "django import forms from .models import Artigo, Comentario class ArtigoForm(forms.Mode...
[ "LICENSE file for more details. \"\"\"Resolvers common.\"\"\" def get_field_value_for_record(record_cls, record_pid, field_name): \"\"\"Return the", "# -*- coding: utf-8 -*- # # Copyright (C) 2018-2019 CERN. # #", "PID.\"\"\" record = record_cls.get_record_by_pid(record_pid) if not record or field_name not in r...
[ "network in Network.objects.all(): _reserve_margin_addresses( network, network.reserved_from_beginning, network.reserved_from_end, IPAddress ) def remove_reserved_ips(apps, schema_editor): IPAddress", "= IPAddress.objects.filter( models.Q( number__gte=network.min_ip + 1, number__lte=network.min_ip + bottom_count ...
[ "django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db", "models.TextField(default=\"\") date_created = models.DateTimeField(auto_now_add=True) last_modified = models.DateTimeField(auto_now=True) completed = models.Boo...
[ "mod = obj.modifiers.new(\"CorrectiveSmooth\", 'CORRECTIVE_SMOOTH') mod.factor = 0.1 mod.scale = 1.5 bpy.ops.object.modifier_apply(modifier=\"CorrectiveSmooth\") bpy.ops.export_scene.gltf( filepath=args[2],", "bpy if __name__ == \"__main__\": args = sys.argv[sys.argv.index('--'):] print(args) bpy.ops.import_scene...
[ "col[6]=col[12]=yaw strLine=\"\" writeCSVLine(f, strLine, col) f.close() def main(): #Parameters if len(sys.argv) < 2:", "\"\\\"></trkpt>\" f.write( strLine ) f.write( \"\\n\" ) f.write( \"</trkseg>\\n\") f.write( \"</trk>\\n\") f.write( \"</gpx>\\n\")", "inProj, outProj) createSCANeRMDL(outfoldername + \"hostv...
[ "that the current user is authenticated.\"\"\" def handle_no_permission(self): return http.JsonResponse({'code': 400, 'errmsg': '用户未登录'})", "import LoginRequiredMixin from django import http class LoginRequiredJSONMixin(LoginRequiredMixin): \"\"\"Verify that the current user", "django.contrib.auth.mixins import...
[ "colors BLACK = 0x00000000 WHITE = 0xffffffff while not win.contents.windowClosed: bmp = AdvanceWin(win)", "# Choose a font font = CreateTextRenderer(\"Courier\", 8, True) # set up the", "# set up the window screen_w = 800 screen_h = 600 win =", "True) # set up the colors BLACK = 0x00000000 WHITE = 0xffffffff...
[ "['create_mapper'] def create_mapper(worklist_series_member_tbl): \"Mapper factory.\" m = mapper(WorklistSeriesMember, worklist_series_member_tbl, properties=dict( worklist_series=relationship(WorklistSeries, uselist=False, back_populates='worklist_series_members'),", "licensing, CONTRIBUTORS.txt for contributor ...
[ "arcsecperpix\") if additional_args is not None: if isinstance(additional_args, str): add_ons = [additional_args] else:", "saturation SATUR_KEY SATURATE # keyword for saturation level (in ADUs) MAG_ZEROPOINT 0.0 #", "ADDING ASTROMETRY for %s', filename) return solved_field SExtractor_config = \"\"\" # Configura...
[ "getpass from ontology.common.address import Address from ontology.ont_sdk import OntologySdk from punica.utils.file_system import (", "Address.address_from_vm_code(hex_avm_code).to_reverse_hex_str() return hex_contract_address @staticmethod def check_deploy_state(tx_hash, project_path: str = '', network: str =",...
[ "like Gecko) Chrome/39.0.2171.95 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Referer': 'http://www.wikipedia.org/', 'Connection': 'keep-alive', } #Know let", "requests from bs4 import BeautifulSoup import urllib.request url = input(\"Paste the website u...
[ "[] voxel_idxs = [] train_txtpath = os.path.join(voxel_txt_dir, 'train.txt') val_txtpath = os.path.join(voxel_txt_dir, 'val.txt') test_txtpath", "= os.path.join(voxel_txt_dir, 'voxel_train.txt') voxel_val_txtpath = os.path.join(voxel_txt_dir, 'voxel_val.txt') voxel_test_txtpath = os.path.join(voxel_txt_dir, 'voxe...
[ "name off the path with no format args. This presumes that # different", "{ \"type\": match_type.value if match_type else None, \"realm\": realm.value if realm else None,", "str, realm: Optional[Realm] = None, ) -> Ladder: \"\"\"Get the ladder of a", "off the path with no format args. This presumes that # dif...
[ "#Exercícios Numpy-15 #******************* import numpy as np arr=np.ones((10,10)) arr[1:-1,1:-1]=0 print(arr) print() arr_zero=np.zeros((8,8)) arr_zero=np.pad(arr_zero,pad_width=1,mode='constant',constant_values=1)", "Numpy-15 #******************* import numpy as np arr=np.ones((10,10)) arr[1:-1,1:-1]=0 print(ar...
[ "struct # Get the stories as json response = requests.get(config['get-stories']) df = pd.DataFrame(response.json())", "i in sp.ents if i.label_ == 'PER') people = [i.strip() for i in", "change the ratio (from inMin to inMax) to an angle (from outMin to", "struct.pack('i', remapped) response = client.publish(c...
[ "= cf.position() if (cfPosition.position.x > wandPosition.position.x): cf.goTo(goal = [wandPosition.position.x + 0.2, wandPosition.position.y, wandPosition.position.z],", "<filename>crazyflie_driver/src/test_follower.py #!/usr/bin/env python import rospy import crazyflie import time import uav_trajectory if __nam...
[ "AccelerationSensor: def __init__(self, measurement_covariance): self.R_meas = measurement_covariance def getMeasurements(self, true_accel): return np.random.multivariate_normal(true_accel, self.R_meas)", "numpy as np class AccelerationSensor: def __init__(self, measurement_covariance): self.R_meas = measurement_...
[ "client import IntentClient class IntentError(Exception): pass # def sendIntent(self, context, action, issuer): #", "IntentClient class IntentError(Exception): pass # def sendIntent(self, context, action, issuer): # client =", "import IntentClient class IntentError(Exception): pass # def sendIntent(self, contex...
[ "if isinstance(queryset, QuerySet) is False: raise TypeError('\"queryset\" must be Queryset') if isinstance(page, int)", "TypeError('\"queryset\" must be Queryset') if isinstance(page, int) is False: raise TypeError('\"page\" must be", "= json.loads(data) _d = [] for x in data: id = x.pop('pk') field_data", "...
[ "should, but that would mean asking for a translation would need to go", "\"\"\" Information regarding the current user locale. TODO should this be its own", "be its own extension? It seems like it should, but that would mean", "should this be its own extension? It seems like it should, but that", "for a tr...
[ "%s\", jobs[0]) response = batch.describe_jobs(jobs=[jobs[0]]) logger.info(\"Job %s state is %s\", jobs[0], response['jobs'][0]['status']) if", "readSamples(args.bamsheet) if samples is False: return -1 # We don't need the last", "to the cache directory (because each job will need to determine what samples", ...
[ "notice and full license details. # \"\"\" WSGI config for pkpdapp project. It", "file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ \"\"\" import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pkpdapp.settings') application", "part of P...
[ "not cnn: model = [nn.Linear(in_features=100, out_features=512), act, nn.Dropout(p=0.5)] model += [nn.Linear(in_features=512, out_features=256), act,", "# 28x28 self.model = nn.Sequential(*model) def forward(self, x): return self.model(x) class Identity(nn.Module): def", "x): return x.view(x.shape[0], *self.out...
[ "= readImageSet(collection, collection, rootpath) self.nr_of_images = len(self.imset) self.knndir = os.path.join(collection, '%s,%sknn,uu,1500' % (feature,", "dist) in neighbors: (userid,tags) = self.textstore.get(name, (None, None)) if tags is None: skip", "in neighbors: (userid,tags) = self.textstore.get(name...
[ "= list(item.items())[0] is_element_value = self._is_intrinsic(value, '_') if is_element_value: value = value['_'] value =", "if isinstance(item, six.string_types) and not self._is_element_type(item): item = {'Inline': item} else: item =", "= value or [] if not isinstance(value, list): raise ValueError('Value s...
[]
[ "inner_table.append(inner) return tabulate(inner_table, tablefmt=\"plain\") @property def _edge_info(self): inner_table = [[\"\", \"Index\", \"Energy\", \"P-ratio\",", "from monty.json import MSONable from pydefect.defaults import defaults from pydefect.util.coords import pretty_coords from", "f\"vbm has accept...
[ "description in self.cursor.description] # gets the column names from nuts table because self.sm.get_cursor().execute()", "self.comp_names) def test_result(self): self.assertEqual(self.sm.result, \"OK\") def tearDown(self): self.sm.__del__() if __name__ == '__main__': unittest.main()", "get the cursor from the ...
[ "<NAME> (<EMAIL>) \"\"\" from scs_core.data.queue_report import QueueReport, ClientStatus # -------------------------------------------------------------------------------------------------------------------- filename = '/tmp/southcoastscience/queue_report.json'", "QueueReport, ClientStatus # --------------------...
[ "# Call preparation callback. if prepare: prepare(p) # Actually parse arguments. arguments =", "run(handler, server=WSSHTTPServer, prepare=None, postparse=None, premain=None): \"\"\" run(handler, server=WSSHTTPServer, prepare=None, postparse=None, premain=None) -> None", "is a (host, port) tuple with explicit v...
[ "sorted(old_contacts, key=Contact.id_or_max) == sorted(new_contacts, key=Contact.id_or_max) if check_ui: # tune db contact data to", "db.get_contact_list() contact = random.choice(old_contacts) app.contact.delete_contact_by_id(contact.id) new_contacts = db.get_contact_list() assert len(old_contacts) - 1 ==", "r...
[ "* np.exp(-y * self.weights_[i] * y_pred) self.D_ = self.D_ / np.sum(self.D_) def _predict(self,", "the current dataset according to sample_weights \"\"\" new_indices = np.random.choice(cur_y.size, size=cur_y.size, p=sample_weights) return", "X: np.ndarray, y: np.ndarray, T: int) -> float: \"\"\" Evaluate perfo...
[ "_decimal128_INF, _decimal128_NaN_ls, ) __all__ = [ \"FieldWalker\", \"FieldWriteError\", \"_no_val\", \"Weighted\", \"gravity\", \"_cmp_decimal\", \"_decimal128_INF\",", ".field_walker import ( FieldWalker, FieldWriteError, _no_val, ) from .weighted import ( Weighted, gravity,", "( FieldWalker, FieldWriteError...
[ "common_ancestors, kinship # Reading and writing files import pydigree.io # Population growth models", "from pydigree.ibs import ibs from pydigree.rand import set_seed # Functions for navigating pedigree", "Functions and classes for doing statistics import pydigree.stats # Functions for identifying shared", "...
[ "========================================================= This file is subject to the MIT license copyright notice. ========================================================= Script", "Script to test speedtest related objects. \"\"\" #imports import pdb from mysql.connector.errors import", "pdb from mysql.conne...
[ "vec3 color2 = texture(Color2, v_text * 6.0).rgb; vec3 color = color1 * (1.0", "7.0).rgb; vec3 color2 = texture(Color2, v_text * 6.0).rgb; vec3 color = color1 *", "uniform sampler2D Cracks; uniform sampler2D Darken; in vec2 v_text; out vec4 f_color; void", "} '''), ]) img0 = Image.open('data/heightmap.jpg').c...
[ "Column(String(256)) tags = Column(String(256)) key = Column(String(256)) create_dt = Column(DATETIME) def __repr__(self): return", "= Column(String(256)) create_dt = Column(DATETIME) def __repr__(self): return \"<PubMed(pmid=%s,title=%s)>\" % (self.pmid, self.title) class", "Column(String(64)) altmetric = Colu...
[ "pv import cv from pyvision.face.CascadeDetector import CascadeDetector from pyvision.face.FilterEyeLocator import FilterEyeLocator def mouseCallback(event,", "and eye detection. Copyright <NAME> Created on Jul 9, 2011 @author: bolme '''", "basic framework for a live demo. In this case the demo is for", "# Gr...
[ "be looked out for when looking for candidates to give loans to. #", "- I followed this from a previous project to see the most important", "# In[1]: # Libraries we need import pandas as pd import numpy as", "= gridCV.best_estimator_ tree_estimator.fit(x_train, y_train) # In[23]: dependent_performance_dt = tr...
[ "Built-in Exceptions try: a=[int(i) for i in input('Enter a list:').split()] except Exception as", "try: a=[int(i) for i in input('Enter a list:').split()] except Exception as e: print(e)", "#Handling Built-in Exceptions try: a=[int(i) for i in input('Enter a list:').split()] except Exception", "<filename>InB...
[ "senha: ') while len(chave) > 8: chave = input('A base só pode ter", "senha novamente: ') for c in range(0, len(chave)): letras.append(chave[c]) senha.append(letras[:]) letras.pop() caracteres =", "ele basicamente pega todo tipo de caractere digitado pelo usuário e depois de", "8 caracteres, digite a base da ...
[ "plt s1 = set(open('wd-inst-of-prot', 'r').readlines()) s2 = set(open('wd-subc-of-prot', 'r').readlines()) s3 = set(open('wd-refseqp', 'r').readlines())", "set(open('wd-subc-of-prot', 'r').readlines()) s3 = set(open('wd-refseqp', 'r').readlines()) #s4 = set(open('t4', 'r').readlines()) venn3([s3,s2,s1], ('RefSeq'...
[ "i in x: y.append(3*i**2 + 5) p_coeff = np.polyfit(x, y, 2) poly =", "stations = build_station_list() import numpy as np def test_polt_water_level_with_fit(): x = np.linspace(1, 1000,", "5) p_coeff = np.polyfit(x, y, 2) poly = np.poly1d(p_coeff) assert int(p_coeff[0]) == 2", "import plot_water_levels, plot_wa...
[ "not edit class KlLEMarkeringSoort(KeuzelijstField): \"\"\"Mogelijke markeringsoorten op een lijvormig element.\"\"\" naam = 'KlLEMarkeringSoort'", "het meestal hoger gelegen trottoir', objectUri='https://wegenenverkeer.data.vlaanderen.be/id/concept/KlLEMarkeringSoort/boordsteen'), 'boordsteen-parkeerverbod': Keu...
[ "self.noise_floor = csv_line[14] self.ampdu_cnt = csv_line[15] self.channel = csv_line[16] self.secondary_channel = csv_line[17] self.local_timestamp", "= csv_line[23] self.len = csv_line[24] string_data = csv_line[25] self.csi_matrix = ESP32CSIFrame.parse_matrix(string_data) @staticmethod def", "self.fec_codin...
[ "activation=activation), dense_value_inflater_builder=None, # unused node_inflater_builder= DecoderCellsBuilder.simple_node_inflater_builder(FLAGS.hidden_cell_coef, activation=activation, gate=FLAGS.decoder_gate)), variable_arity_strategy=FLAGS.dec_variable_arity_strategy) ########### # TRAINING ###########", "ac...