seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
const uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
const lowercase = 'abcdefghijklmnopqrstuvwxyz';
const numbers = '0123456789';
const specialChars = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ ';
export const symbols = uppercase + lowercase + numbers + specialChars;
export const limitedSymbols = uppercase + lowercase + numbers;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'http':'http://localhost:5555/random'
}
print(proxie)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public static void SetCurrentRagdollDefinition(RagdollDefinition definition)
{
currentDefinition = definition;
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if not latent:
for k in np.arange(K):
assert np.all(L[k]==0)
dim = ((p ** 2 + p) / 2).sum() # number of elements of off-diagonal matrix
D1 = np.sqrt(sum([np.linalg.norm(Omega[k])**2 + np.linalg.norm(Lambda[k])**2 for k in np.arange(K)] ))
D2 = np.sqrt(sum([np.linalg.norm(Theta[k] - L[k])**2 + np.linalg.norm(Theta[k])**2 for k in np.arange(K)] ))
D3 = np.sqrt(sum([np.linalg.norm(X0[k])**2 + np.linalg.norm(X1[k])**2 for k in np.arange(K)] ))
e_pri = dim * eps_abs + eps_rel * np.maximum(D1, D2)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<h3 class="tile-title">Add Skill</h3>
<form action="{{ route('skills.store') }}" method="POST">
@csrf
<div class="tile-body">
<div class="form-group">
<label class="control-label" for="skill_name">Skill Name <span class="text-danger">*</span></label>
<input id="skill_name" class="form-control" type="text" placeholder="Enter skill name" name="skill_name" value="{{ old('skill_name') }}">
</div>
<div class="form-group">
<label class="control-label" for="skill_icon">Skill Icon <span class="text-danger">*</span></label>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from rest_framework import throttling
class ApplicationRateThrottle(throttling.SimpleRateThrottle):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
depends_on('cuda@10.1.0:11.0.2', when='@7.6.3.30-10.1-linux-x64')
depends_on('cuda@10.1.0:11.0.2', when='@7.6.3.30-10.1-linux-ppc64le')
depends_on('cuda@10.1.0:10.1.999', when='@7.5.0.56-10.1-linux-x64')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.filter(pk__in=pks[start:end])
model._default_manager \
.using(self.dest_db) \
.bulk_create(objs)
def _collect_related_pks(self, model):
related_fields = [
field for field in model._meta.fields
if (field.one_to_one or field.many_to_one) and field.related_model != model]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for x in range (5,0,-1):
for y in range(x,0,-1):
print(" ",end="")
print(str(num)*inc)
num += 2
inc += 2 | ise-uiuc/Magicoder-OSS-Instruct-75K |
# shuffle the data
permutation = self._rand.permutation(n_train_data)
# for each batch
for batch_start in range(0, n_train_data, batch_size):
# get batch
batch_data = X[permutation[batch_start:batch_start+batch_size]]
batch_target = y[permutation[batch_start:batch_start+batch_size]]
# forward pass
outputs[0] = batch_data
for layer, i in zip(self.layers, range(len(self.layers))):
outputs[i+1] = layer(outputs[i])
# backward pass
self.zero_grad()
current_grad = self.loss.gradient(batch_target, outputs[-1])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in 0..100 {
// TODO Warmup
}
for i in 0..num_iteration {
match unsafe { MultipleAddrCacheSideChannel::prepare(self, &mut batch) } {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
StringEncryptor stringEncryptor;
@Test
public void encryptPwd() {
// 将上面的加密码放在对应的application.yml中 ENC(8s8U3PNKC/PLgzK4nUzkqFwRBy0exXWv)
// ENC(+MMpFNWpyeg99/Jpa6ewEQWvjncpFn0L) eocpviiluqamdjhe
String gmail = stringEncryptor.decrypt("MOJAVmMYz5sp3pl1b7b6qGzu/wC9MzNA");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self._check_init()
self._closed = True
coros = []
for con in self._connections:
coros.append(con._before_stop())
await asyncio.gather(*coros, loop=self._loop)
coros = []
for con in self._connections:
coros.append(con._stop())
await asyncio.gather(*coros, loop=self._loop)
self._reset()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
("user_led", 2, Pins("18"), IOStandard("LVCMOS33")),
# Buttons.
("user_btn", 0, Pins("15"), IOStandard("LVCMOS33")),
("user_btn", 0, Pins("14"), IOStandard("LVCMOS33")),
# Serial
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django_rq import job
from inline_static.css import transform_css_urls
logger = logging.getLogger(__name__)
@job
def calculate_critical_css(critical_id, original_path):
from .exceptions import CriticalException
from .models import Critical
| ise-uiuc/Magicoder-OSS-Instruct-75K |
java -jar $JARFILE $@ | ise-uiuc/Magicoder-OSS-Instruct-75K |
HS512 = HMACAlgorithm(hashlib.sha512)
class RSAAlgorithm(AbstractSigningAlgorithm):
def __init__(self, hash_fun: object) -> None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
False
>>> cache_session['cat'] = "dog"
>>> cache_session.modified
True
>>> cache_session.pop('cat')
'dog'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
The methods specified by the record type are available through the
underlying object.
"""
class AssessmentPartFormRecord(abc_assessment_authoring_records.AssessmentPartFormRecord, osid_records.OsidRecord):
"""A record for an ``AssessmentPartForm``.
The methods specified by the record type are available through the
underlying object.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return position - Vector(x=1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
optimizer.load_state_dict(checkpoint['optimizer'])
start_iter = checkpoint['iteration']
scheduler = lr_scheduler.ReduceLROnPlateau(optimizer, 'min',patience=60000)
train_iterations(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Tunnel established:
TunnelPtr tunnel = any_cast<TunnelPtr>(conn->getContext());
TcpConnectionPtr appServerConn = tunnel->appServerConn();
// Shouldn't get data from appClientConn while appServerConn isn't established
// Error! Stop connect, close tunnel and close this conn
if (!appServerConn)
{
tunnel->close();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn tag_pass(&self, tag: Tag, pass: bool) {
tracing::info!(?tag, ?pass, "check");
assert_eq!(
self.check_tag(tag.clone()).unwrap(),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lista_end = get_rec(g,code_list,recursive_list)
lista_end_int = [int(key) for key in lista_end]
# Load concepts
concepts_df = pd.read_csv(concepts_file, sep="\t")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if not os.path.exists(path):
os.makedirs(path)
with open(os.path.join(path,'abstract.txt'),'w') as fout:
fout.write(abstracts[abstract]) | ise-uiuc/Magicoder-OSS-Instruct-75K |
parser.add_argument('--loss_function', default='binary_crossentropy', type=str,
help='loss function (binary_crossentropy | crossentropy)')
parser.add_argument('--optimizer_function', default='adam', type=str, help='optmizer function')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = ['replicate', 'scatter', 'parallel_apply', 'gather', 'data_parallel',
'DataParallel', 'DistributedDataParallel', 'DistributedDataParallelCPU']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Migration(migrations.Migration):
dependencies = [
('currency', '0008_auto_20200323_1117'),
]
operations = [
migrations.AlterModelOptions(
name='rate',
options={},
),
migrations.AlterField(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@mark.parametrize("test_file", [("baseline_tag-notes_labels.ris")])
def test_asreview_labels_ris(test_file, tmpdir):
fp_in = Path("tests", "demo_data", test_file)
asr_data = ASReviewData.from_file(fp_in)
tmp_ris_fp_out = Path("tmp_labels.ris")
asr_data.to_ris(tmp_ris_fp_out)
asr_data_diff = ASReviewData.from_file(tmp_ris_fp_out)
# Check if input file matches the export file
assert list(asr_data.title) == list(asr_data_diff.title)
assert list(asr_data.labels) == list(asr_data_diff.labels)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from ..base import AsyncPRAWBase
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div class="row">
@foreach ($brand->products as $product)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.app = app
self.mongo = mongo
self.vfs = None
if app is not None:
self.app = app
self.init_app(app, **kwargs)
def init_app(self, app, **kwargs):
self.app = app
config = app.config.get('VFS', {})
self.vfs = VirtualFileSystem(app,
rid=config.get(u'RID', u'0000-0000-0000-0000'),
root=config.get(u'ROOT', None),
devices=config.get(u'DEVICES', None))
setattr(self.app, 'vfs', self.vfs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_utf8_query():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*
* @codeCoverageIgnore
* @author nacho
*/
class ReadabilityTextExtractor implements HTMLTextExtractor{
/**
*
* @param string $html
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fileexists = os.path.isfile(os.path.join(filepath, filename))
if fileexists:
print 'Adding', filename, 'to database'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tf.app.flags.DEFINE_string('face_detector', 'NFD', """Face detector (NFD/HFD)""")
WRITE_TB_DATA = False
FLAGS.num_preprocess_threads = 1
FLAGS.prev_frame_init = False
FLAGS.patch_size = 14
FLAGS.batch_size = 7
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pAgricultureBSLsep = 0.7
nBuildings = {'FSH': 505, 'REH': 1010, 'SAH': 680, 'BAH': 100}
pAgents = {'FSH': 0.9, 'REH': 0.9, 'SAH': 0.85, 'BAH': 0.75}
pPHHagents = {'FSH': 0.8, 'REH': 0.8, 'SAH': 0.6, 'BAH': 0.9}
pAgriculture = {'FSH': 0.2, 'REH': 0.2, 'SAH': 0.0, 'BAH': 0.0}
# district heating and PV
pDHN = {'FSH': 0.1, 'REH': 0.1, 'SAH': 0.1, 'BAH': 0.1}
pPVplants = 0.2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
class EffectViewModel
{
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/N/neutron mag. mom. to Bohr magneton ratio.py
constants.physical_constants["neutron mag. mom. to Bohr magneton ratio"] | ise-uiuc/Magicoder-OSS-Instruct-75K |
print(a)
b = a[-1:] | ise-uiuc/Magicoder-OSS-Instruct-75K |
if (!Sounds.TryGetValue(name, out s)) return;
AL.SourceStop(s.Source);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Son = Family('Kevin', 'Smith', 'Brown')
print(Daughter.eyes)
print(Son.eyes)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class AHKSteps(AHK, Base):
@Base.given(u'the mouse position is ({xpos:d}, {ypos:d})')
def given_mouse_move(self, xpos, ypos):
self.mouse_move(x=xpos, y=ypos)
@Base.when(u'I move the mouse (UP|DOWN|LEFT|RIGHT) (\d+)px', matcher=RegexMatcher)
def move_direction(self, direction, px):
px = int(px)
if direction in ('UP', 'DOWN'):
axis = 'y'
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>chrisns/cks-notes
#!/bin/sh
gcloud compute instances start cks-master cks-worker
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// - completion: Kind of completion provided to the user for this option.
/// - transform: A closure that converts a string into this property's type or throws an error.
public init(
name: NameSpecification = .long,
parsing parsingStrategy: SingleValueParsingStrategy = .next,
help: ArgumentHelp? = nil,
completion: CompletionKind? = nil,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set -euo pipefail
source ~/miniconda3/etc/profile.d/conda.sh
conda env create -f environment.yml
conda activate fis
jupyter labextension install @axlair/jupyterlab_vim @jupyterlab/toc @ryantam626/jupyterlab_code_formatter
jupyter lab build --name='fis'
cd notebooks
jupytext --to ipynb templ.py
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func waitUntil(element: XCUIElement, condition: elementStatus, timeout: TimeInterval = TimeInterval.init(5)) {
let expectation = XCTNSPredicateExpectation(predicate: NSPredicate(format: condition.rawValue), object: element)
let result = XCTWaiter.wait(for: [expectation], timeout: timeout)
if result == .timedOut {
XCTFail(expectation.description)
}
}
func tap(element: XCUIElement) {
waitUntil(element: element, condition: .exist)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import skimage
from skimage.color import rgb2gray
from skimage import data
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams['font.size'] = 18
import numpy as np
def Invert(image):
grayim = rgb2gray(image)
a, b = np.shape(grayim)
inverted = np.empty([a, b])
for k in range(a):
for i in range (b):
inverted[k,i] = 255 - grayim[k,i]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Pipe::message_id msg)
{
SecureQueue* q = get(msg);
if(q)
return q->read(output, length);
return 0;
}
/*
* Peek at data in a message
*/
size_t Output_Buffers::peek(byte output[], size_t length,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .command_runner import LocalCommandRunner
from .platform_domain import CommandNotAvailableIssue
from .platform_domain import OperatingSystem
from .platform_domain import PlatformIssue
from .platform_domain import PlatformScope
from .platform_domain import UnsupportedOperatingSystemIssue
from .platform_exceptions import UnsupportedOperatingSystemException
from .platform_exceptions import UnsupportedPlatformException
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class CreateListForm(forms.Form):
name = forms.CharField(label="Name ", max_length=300)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// Generated file. Do not edit.
//
import FlutterMacOS
import Foundation
import assets_audio_player
import assets_audio_player_web
import path_provider_macos
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#fukcija rezukzivno crta stablo s dva lista
| ise-uiuc/Magicoder-OSS-Instruct-75K |
hand_names = ["High Card", "Pair", "Two Pair", "3 of a Kind", "Straight",
"Flush", "Full House", "4 of a Kind", "Straight Flush"]
def hand_percentage(n=700*1000):
"""Sample n random hands and print a table of percentages for each type
of hand.
Args:
n: int indicates total number of hands to be dealt.
"""
counts = [0]*9
for i in range(n/10):
for hand in deal(10):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
previousQuery = query;
previousBitSet = bitSet;
assertThat(cache.getBitSet(queryBuilder.toQuery(shardContext), leafContext), sameInstance(bitSet));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TestPop:
def test_pop_multiple(self):
_dict = {"ec": "none", "edgecolor": "none"}
with pytest.raises(TypeError):
daft._pop_multiple(_dict, "none", "ec", "edgecolor")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
df = ''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* "id": 1, "atirbuto1": "Valor nuevo" }
*
* @param id corresponde a la Boleta a actualizar.
* @param espectaculo corresponde al objeto con los cambios que se van a
* realizar.
* @return El espectaculo actualizado.
* @throws BusinessLogicException
*
* En caso de no existir el id del Espectaculo a actualizar se retorna un
* 404 con el mensaje.
*/
@PUT
@Path("{id: \\d+}")
public EspectaculoDetailDTO updateEspectaculo(@PathParam("id") Long id, EspectaculoDetailDTO espectaculo) throws BusinessLogicException, UnsupportedOperationException {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[np.sin(q[i]), np.cos(q[i]), 0 , 0],
[0, 0, 1, 0],
[0, 0, 0, 1]])
# else:
# Case in which there are prismatic joints.
## Tel = np.array([[1, 0, 0, 0],
## [0, 1, 0, 0],
## [0, 0, 0, q[i]]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fixture = TestBed.createComponent(FilterEventTwoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public bool PaintBack
{
get { return _PaintBack; }
set { _PaintBack = value; }
}
//------ End Properties -------//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# The LOCATION var stores what repo symlink was used. It becomes part of the
# path where images are stored.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* @Description: Password encryption method
* @param {string} password
* @return {*}
*/
makePassword(password: string): string {
return this.nodeAuth.makePassword(password);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .views import (
HomeView,
MyBitlyRedirectView,
)
urlpatterns = [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
width = 1800
heigth = 1200
for item in os.listdir(inputDir):
split = item.split(".")
if split[-1] == "svg":
filename = '.'.join(split[:-1])
print "Converting "+filename
os.system("inkscape.exe -z -e "+outputDir+filename+".png -w " + str(width) + " -h " + str(heigth) + " "+inputDir+item)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else {
return temp * temp * (1/x);
}
}
}
}; | ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "First Parameter : $1"
echo "Second Parameter : $2"
echo "Quoted Values: $@"
echo "Quoted Values: $*"
echo "Total Number of Parameters : $#"
# $* 和 $@ 都表示传递给函数或脚本的所有参数,不被双引号(" ")包含时,都以"$1" "$2" … "$n" 的形式输出所有参数。
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// recommendations: change namespace, explain use of this class
// __ ___ ____ _____ ______ _______ ________ _______ ______ _____ ____ ___ __
*/
//own header
#include "INetEndpoint.h"
#include "net_functions.h"
#include <string.h>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Get an array that is the interesction of minerals and lemmas
minerals_found = list(set(minerallist).intersection(set(lemmas)))
# Store ages found
ages_found = []
# Store location words found
locations_found = []
# Record all words tagged as 'LOCATION' in ners
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>
</head>
<body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0">
<table width="744" cellspacing="0" cellpadding="0" border="0">
<tr><td width="474"><a name="Top"></a><?php include "../../legacy-includes/TopLogo.htmlf" ?></td>
<td width="270"><?php include "../../legacy-includes/TopAd.htmlf" ?>
</td></tr></table>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sc = mobilenet.training_scope(is_training=True)
self.assertIn('is_training', sc[slim.arg_scope_func_key(slim.batch_norm)])
sc = mobilenet.training_scope()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import jady.nlg_server
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Executes the main method
pub fn main(&mut self) -> Result<(), InterpreterError> {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func fetchFileContent(from fileName: String) -> String?
func saveDocumentationOutputFile(with content: String,
documentName: String?,
path: String?)
func createEmptyFile(with fileName: String?)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
except:
cpu_serial = "ERROR000000000"
return cpu_serial
def write_db(tmp, hum, device_id):
json_body = [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert len(results) == len(expected_results)
for actual, expected in zip(results, expected_results):
assert actual.type_name == expected['TypeName']
assert actual.text == expected['Text']
assert actual.resolution['value'] == expected['Resolution']['value']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super().__init__('keys_to_twist')
self._key_sub = self.create_subscription(String, 'keys', self.key_callback)
self._twist_pub = self.create_publisher(Twist, 'cmd_vel', QoSProfile(depth=10))
self.g_last_twist = Twist()
self.create_timer(0.1, self.send_last_velocity)
def key_callback(self, msg):
if len(msg.data) != 0 and msg.data in self.key_mapping:
vels = self.key_mapping[msg.data]
self.g_last_twist.angular.z = vels[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with raises(TypeError):
assert_nullable_type(GraphQLNonNull(ObjectType))
def describe_get_nullable_type():
def returns_none_for_no_type():
assert get_nullable_type(None) is None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cout << water + sugar << " " << sugar << endl;
return 0;
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
impl Model {
fn shade_views(&mut self) -> bool {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print('Você está na idade de se alistar. Não perca tempo!')
else:
print('Você passou do prazo de alistamento.')
print(f'Sua idade é {idade_alistamento} anos, já passou {idade_alistamento - 18} anos. Regularize a situação!') | ise-uiuc/Magicoder-OSS-Instruct-75K |
if block:
print(' "block.libvulpes.{}{}": "{} {}",'.format(objType.lower(),mat.name, human_mat, human_type))
else:
print(' "item.libvulpes.{}{}": "{} {}",'.format(objType.lower(),mat.name, human_mat, human_type))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const createSelect = fn => {
const store = SelectFactory.store;
if (!store) {
throw new Error('SelectFactory not connected to store!');
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const string templateSource = "<img src=\"http://sub.domain.com/@(Model).png\">";
var template = Template.Compile(templateSource);
foreach (var image in images)
{
var expected = string.Format("<img src=\"http://sub.domain.com/{0}.png\">", image);
var actual = template.Render(image);
Assert.AreEqual(expected, actual);
}
}
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
|| exit 1;
echo ""
echo "####################"
echo "### END TRAINING ###"
echo "####################"
fi
if [ $stage -le 2 ]; then
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.D = DiscreteGaussianDistributionIntegerSampler(RR(sigma))
self.n = ZZ(n)
self.P = P
def __call__(self):
"""
Return a new sample.
EXAMPLES::
sage: from sage.stats.distributions.discrete_gaussian_polynomial import DiscreteGaussianDistributionPolynomialSampler
sage: sampler = DiscreteGaussianDistributionPolynomialSampler(ZZ['x'], 8, 12.0)
sage: sampler().parent()
Univariate Polynomial Ring in x over Integer Ring
sage: sampler().degree() <= 7
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class _BareReprMeta(type):
def __repr__(cls) -> str:
return f'<{cls.__name__}>'
class _NONE(metaclass=_BareReprMeta):
"""Sentinel type used to represent 'missing'."""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
agent_shopping_moment[i].append([])
#agent_shopping_moment[0][0].append(1)
#agent_shopping_moment[0][1].append(2)
#for moment, shop in agent_shopping_moment[0]:
#print moment, shop
print agent_shopping_moment
'''
#M0,M1,M2,Sh0,Sh1,Sh2,S = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lastv = hidden
layers.append(nn.Linear(lastv, out_dim))
self.layers = nn.Sequential(*layers)
# self = MLP(
# (layers): Sequential(
# (0): Linear(in_features=580, out_features=256, bias=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
field=models.URLField(blank=True, help_text='Public URL for the conference and/or conference program', max_length=500, verbose_name='URL'),
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/* Inserts a new record to the indexing system
* @param int hf: hash function that we are touching
* @param string record: new record
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('Jones', 'Accounting', 45000, 37000),
('Adams', 'Accounting', 50000, 37000),
('Moore', 'IT', 34000, 34000),
('Wilkinson', 'IT', 60000, 34000),
('Johnson', 'Management', 80000, 80000),
('Miller', 'Management', 100000, 80000),
('Smith', 'Marketing', 38000, 38000),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for _, _, files in os.walk(dataset_root_dir):
for name in files:
all_files.append(os.path.splitext(name)[0])
all_files = np.unique(all_files)
random.shuffle(all_files)
train_names = all_files[test_num_files:]
test_names = all_files[:test_num_files]
with open(os.path.join(dataset_root_dir, CONFIG_NAME), 'w') as outfile:
json.dump({'test': test_names.tolist(), 'train': train_names.tolist()}, outfile, indent=4)
return get(dataset_root_dir)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[TR(generate_test_description, {}, [], [])]
)
results = runner.run()
for result in results.values():
assert not result.wasSuccessful()
# Make sure some information about WHY the process died shows up in the output
out, err = capsys.readouterr()
assert 'Starting Up' in out
assert 'Process had a pretend error' in out # This is the exception text from exception_node
# Run some known good tests to check the nominal-good test path
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mars_data['hemisphere_image_urls'] = hemisphere_image_urls
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const apollo = new ApolloServer({
schema,
plugins: [
ApolloServerPluginDrainHttpServer({ httpServer }),
{
async serverWillStart() {
return {
async drainServer() {
cleanServer.dispose();
}
};
}
},
| ise-uiuc/Magicoder-OSS-Instruct-75K |
)
assert 'invalid email' in str(excinfo.value)
def test_send_with_wrong_from_email(self, emaillib_yandex):
'''
Отправка письма с неверным email отправителя
'''
with pytest.raises(endem.EmailSenderError) as excinfo:
emaillib_yandex.send(
'wrong', 'password',
'<EMAIL>',
'subject', 'message'
)
assert 'invalid email' in str(excinfo.value)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
++VertexIndex2;
}
// Left and right faces of box
VertexIndex1 = 2 * ( WP * LP + HP * LP );
VertexIndex2 = VertexIndex1 + HP * WP;
IndexIndex1 = 12 * ( LengthSegments * WidthSegments + LengthSegments * HeightSegments );
IndexIndex2 = IndexIndex1 + ( 6 * WidthSegments * HeightSegments );
for( int j = 0; j < HeightSegments; ++j )
{
for( int i = 0; i < WidthSegments; ++i )
{
// Right
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.