seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
## main
######################################################################
| ise-uiuc/Magicoder-OSS-Instruct-75K |
foreach ($questions as $question) {
if (!$question) {
continue;
}
$new_question = new \App\Questions;
$new_question->question = $question;
$new_question->survey_id = $survey_id;
$new_question->save();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
email_password = ''
address_owner = ''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return classes;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
field=models.FloatField(null=True),
),
migrations.AddField(
model_name='frame',
name='sharpness',
field=models.FloatField(null=True),
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
from unittest import TestCase
import mock
from src import app
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class RestConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'multi_tenant.rest'
def ready(self):
from .patch import request
return super().ready()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
result, parse_int=decimal.Decimal)["current_observation"]
ob_datetime = datetime.datetime.fromtimestamp(
float(most_recent_ob["local_epoch"]))
return Observation(self.source, ob_datetime, most_recent_ob["temp_c"])
def parse_forecast_response(self, result):
forecast_results = []
json_result = json.loads(
result,
parse_float=decimal.Decimal)
issue_date_best_guess = datetime.datetime.now() #XXX ????
for daily_forecast in json_result["forecast"]["simpleforecast"]["forecastday"]:
start_time = datetime.datetime.fromtimestamp(float(daily_forecast["date"]["epoch"]))
issue_date_best_guess = min(issue_date_best_guess, start_time) #????
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bam_file = "{0}/exampleBAM.bam".format(datadir)
reference = "{0}/exampleFASTA.fasta".format(datadir)
work_dir = "{0}/outdir/".format(datadir)
annots = "\"['DP','SP','AD']\""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
matching_segments = ([], [], [])
potential_excitement = self.potential_excitement
for col_num, col_idx in enumerate(bursting_columns):
neur_idx, seg_idx = np.nonzero(matching[col_num])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Config::set_new_version(version.to_owned());
Config::set_update_needed(true);
}else {
Config::set_update_needed(false);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return self._tokens[i.start:i.stop]
else:
return self._tokens[i]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::set<std::string> visited_;
void addNode(Node::Type type, const std::string& id, const std::string& label);
void addEdge(const std::string& from, const std::string& to);
public:
void visit(rete::AlphaNode*) override;
void visit(rete::AlphaMemory*) override;
void visit(rete::BetaNode*) override;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def main():
p = argparse.ArgumentParser(usage=__doc__.strip())
p.add_argument('-D', '--define', type=define_symbol, action="append", default=[],
metavar="NAME=VALUE", help="define a symbol in template")
p.add_argument('src')
p.add_argument('dst')
args = p.parse_args()
defines = dict(args.define)
process(args.src, args.dst, defines)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
output_workspace = r"" # path to file type workspace
output_gdb_name = "" # name for global gdb to be created
hu_dataset = r"" # path to local folder features
hu8_field = "" # field that identifies local folders / outer walls
hu12_field = "" # field that identifies inner walls
hucbuffer = # buffer distance for local folders
nhd_path = r"" # path to folder containing NHD hydrography.
elevation_projection_template = r"" # path to a digital elevation model from which to pull a projection.
alt_buff = # alternate buffer distance.
databaseSetup(output_workspace, output_gdb_name, hu_dataset, hu8_field, hu12_field, hucbuffer, nhd_path,elevation_projection_template,alt_buff) | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Gets frame of this ir_graph.
#[allow(clippy::let_and_return)]
pub fn frame(self) -> Node {
let unwrapped = unsafe { bindings::get_Anchor_frame(self.0) };
Node::wrap(unwrapped)
}
/// Sets frame of this ir_graph.
#[allow(clippy::let_and_return)]
pub fn set_frame(self, val: impl NodeTrait) {
let unwrapped = val.internal_ir_node();
unsafe {
bindings::set_Anchor_frame(self.0, unwrapped);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
itemData: CSL.Data,
str: string
): Element => {
switch (field) {
case 'title': {
if (itemData.DOI) {
return createLink(createDoiUrl(itemData.DOI), str)
}
if (itemData.URL) {
return createLink(itemData.URL, str)
}
return createSpan(str)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Camera(BaseCamera):
@staticmethod
def frames():
with picamera.PiCamera() as camera:
# let camera warm up
time.sleep(2)
stream = io.BytesIO()
camera.rotation = 180 #CV: added
camera.resolution = (640, 360) #CV: added
# camera.resolution = (1280, 720) #CV: added
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# def setUp(cls) -> None:
# cls.imposer = Imposer({}, getLogger("test"))
#
# # def test_should_read_mask_image(self):
# # self.imposer._read_mask_image()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
desired_populations = {'NF': 36, 'M': 0, 'X': 0, 'C': 8} # ---> 0 populations
desrired_ratios = None
sampler.sample(desired_populations=desired_populations,
desired_ratios=desrired_ratios)
expected_populations = desired_populations
self.assertDictEqual(sampler.sampled_class_populations, expected_populations)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .models import *
class gemSearchForm(forms.Form):
tokenId = forms.IntegerField() | ise-uiuc/Magicoder-OSS-Instruct-75K |
coef_fg = intersection/(union - intersection)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# P0 = P0[np.argsort(P0[:,0] + (1-P0[:,1]))]
# V = voronoi(P0, bbox=[0,1,0,1])
# Computing connection matrix and edges
D0 = scipy.spatial.distance.cdist(P0, P0)
C0 = np.zeros(D0.shape, dtype=int)
S0 = []
for i in range(len(P0)):
for j in np.argsort(D0[i])[1:n_neighbour+1]:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return json($back);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
groups = []
if data.ok:
for group in data.message['results']:
groups.append((
group['uuid'],
group['name']
))
return (column_headers, tuple(groups))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('formation', '0011_auto_20170412_1548'),
]
operations = [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .branch import Branch | ise-uiuc/Magicoder-OSS-Instruct-75K |
time.sleep(0.005)
if overtime <= time.time():
break
logging.info('处理图片 {} {} 修正的数据 {}'.format(now2 - now, time.time() - now, _shoot_correction))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
time.sleep(1)
self.assertTrue(scom.dman.DeviceManager.instance().unsubscribe(observer))
self.assertFalse(scom.dman.DeviceManager.instance().unsubscribe(orphaned))
def test_scomdevice_disappeared(self):
from sino import scom
observer = ScomDevicesObserver()
self.device_manager._add_new_device('vario_power', 4242)
# Note: Subscribe after adding new device
scom.dman.DeviceManager.instance().subscribe(observer)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@NoArgsConstructor
@AllArgsConstructor
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
public class ExpenseManagementCommunsDTO {
private String id;
private Integer userCode;
private String description;
@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime date;
private BigDecimal value;
private ExpenseCategory category;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
region_threshold = 0.6
def filter_text(region, ocr_result, region_threshold):
rectangle_size = region.shape[0]*region.shape[1]
plate = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name_prefix = 'NodeJSExecutionsTest'
image = CONF.qinling.nodejs_runtime_image
def setUp(self):
super(NodeJSExecutionsTest, self).setUp()
self.wait_runtime_available(self.runtime_id)
@decorators.idempotent_id('e3046fa4-2289-11e8-b720-00224d6b7bc1')
def test_basic_nodejs_execution(self):
package = self.create_package(name='nodejs/test_nodejs_basic.js')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
[TestInitialize]
public void Setup()
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace MaterialCMS.Batching.Events
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'2|dewiki|12': {'rolling_active_editor': 0},
'3|frwiki|12': {'rolling_active_editor': 0},
'4|ptwiki|12': {'rolling_active_editor': 0},
}])
assert_equals(len(finished), 1)
assert_true(Aggregation.SUM in finished)
assert_true('rolling_active_editor' in finished[Aggregation.SUM])
assert_equals(finished[Aggregation.SUM]['rolling_active_editor'], 0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
plot('Giraffe', giraffeImg, 332)
plot('ImgC', cImg, 333)
plot('My', img1, 334)
plot('My', img2, 335)
plot('My', img3, 336)
plot('numpy', img4, 337)
plot('numpy', img5, 338)
plot('numpy', img6, 339)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo sleep 10 seconds ...
sleep 10
| ise-uiuc/Magicoder-OSS-Instruct-75K |
while 1:
if button.value():
count=count+1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>Hiper.Application.Data.SqlServer.Migrations/Program.cs
using System;
namespace Hiper.Application.Data.SqlServer.Migrations
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],
"source": "2001:db8:223c:2c16::1",
"statistics": {
"loss-rate": 0,
"received": 10,
"round-trip": {
"avg": "98.186",
"max": "973.514",
"min": "0.677",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
override func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle {
return .delete
}
// Override to support editing the table view.
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
let code = PhoneNumberManager.sharedInstance.getCodes()[indexPath.section]
let data = PhoneNumberManager.sharedInstance.getNumbers(for: code)[indexPath.row]
PhoneNumberManager.sharedInstance.remove(data)
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// <summary>
/// Gets the name.
/// </summary>
/// <value>
/// The name.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from shutil import rmtree
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif ptype == 'Defects Concentrations':
self.elements[n]['b'].configure(image=self.defect_conentrations_icon)
elif ptype == 'Charge Carriers Concentrations':
self.elements[n]['b'].configure(image=self.defect_conentrations_icon)
elif ptype == 'Fermi Level Variations vs. Temperature':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use crate::{IUnknown, IID};
/// Wrapper type for COM interface pointers.
///
/// # Usage
/// ## Passing COM pointers to/from FFI methods
/// `ComPtr<T>` has the following methods for accessing the underlying pointer:
///
/// * `as_ptr` returns the raw pointer `*const T`
/// * `as_mut_ptr` returns a mutable reference to the raw pointer `&mut *mut T`
///
/// The `AsComPtr` trait defines which pointer types can be returned by these
/// methods. These methods should be used carefully to ensure the returned pointers
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var sha256 = new SHA256Managed();
// compute the hash of the string and return byte array
var hash = sha256.ComputeHash(bytes);
string hashString = null;
// concatenate the formatted string to hashed string in hex
foreach (var x in hash)
{
hashString += $"{x:x2}";
}
return hashString;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$func_ty:ident,
) => {
slot_fragment_trait! {
$set_trait,
/// # Safety: _slf and _attr must be valid non-null Python objects
#[inline]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
markdown = self.dedent(markdown)
try:
self.assertEqual(self.ignoreWhitespace(output),
self.ignoreWhitespace(convert(markdown)))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Override
protected Class<Pair> getClassUnderTest() {
return Pair.class;
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
// 通过位运算实现快速判断组件类型而定义的枚举类型
export const enum ShapeFlags {
ELEMENT = 1, // 00000001 -> 1
FUNCTIONAL_COMPONENT = 1 << 1, // 00000010 -> 2
TEXT_CHILDREN = 1 << 3, // 00001000 -> 8
ARRAY_CHILDREN = 1 << 4, // 00010000 -> 16
SLOTS_CHILDREN = 1 << 5, // 00100000 -> 32
TELEPORT = 1 << 6, // ...=
| ise-uiuc/Magicoder-OSS-Instruct-75K |
feature.remove(self);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
y = dpr.translate(x, NumpyNodeSet)
dpr.assert_equal(y, intermediate)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import json
import time
from google.appengine.api import app_identity
DEFAULT_SERVICE_ACCOUNT = app_identity.get_service_account_name()
def generate_jwt():
"""Generates a signed JSON Web Token using the Google App Engine default
service account."""
now = int(time.time())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
n = n/10
return int(num)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ledTester.apply(instruction)
print('#occupied: ', ledTester.countOccupied())
return 0
if __name__ == "__main__":
sys.exit(main()) # pragma: no cover | ise-uiuc/Magicoder-OSS-Instruct-75K |
declare nonAttributeNestedArray: NonAttribute<string[][]>;
declare omittedAttribute: number;
declare omittedAttributeArray: number[];
declare joinedEntity?: NonAttribute<Project>;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
:param input_sequence_current_match: The input_sequence_current_match of this StepInfo.
:type: str
"""
self._input_sequence_current_match = input_sequence_current_match
@property
def regex_engine_class_name(self):
"""
Gets the regex_engine_class_name of this StepInfo.
The regular expression engine class name.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
trainer.shutdown()
assert len(results) == num_workers
for worker_result in results:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# -*- coding: utf-8 -*-
from django.conf.urls import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
./devel/db.sh psql openfaas -c "create extension if not exists pgcrypto" || exit 1
GHA2DB_PROJECT=openfaas PG_DB=openfaas GHA2DB_LOCAL=1 gha2db 2016-12-22 0 today now 'openfaas,open-faas,stefanprodan/caddy-builder,alexellis/faas,alexellis/faas-cli,alexellis/java-afterburn,alexellis/faas-netes,alexellis/caddy-builder,alexellis/openfaas-workshop,alexellis/derek,alexellis/java-openfaas-fast-fork,alexellis/openfaas-cloud,alexellis/faas-nats,alexellis/serverless-faas,alexellis/faas-provider,alexellis/nodejs-afterburn' 2>>errors.txt | tee -a run.log || exit 2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
toggle() {
this.show = !this.show;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# load coco labels
labels_path = './yolov3/data/coco.names'
labels = open(labels_path).read().strip().split('\n')
# list of random colors
np.random.seed(42)
colors = np.random.randint(0, 255, size=(len(labels), 3))
# load yolo weight and config
weights_path = './yolov3/weights/yolov3-spp.weights'
config_path = './yolov3/cfg/yolov3-spp.cfg'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
data['name'] if data['name'] else 'unknown', # the name of the location
data['type'] if data['type'] else 'unknown', # the type of the location
data['dimension'] if data['dimension'] else 'unknown' # the dimension in which the location is located
| ise-uiuc/Magicoder-OSS-Instruct-75K |
--model-arch bi_rnn:2:2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
message: React.ReactNode | ToBeLocalizedText;
options: {
showRefresh?: true;
showBack?: true;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if pod.metadata.annotations["adaptdl/group"] == group:
if pod_ip_list is None:
pod_ip_list = [None] * replicas
pod_ip_list[rank] = pod.status.pod_ip
if all(pod_ip is not None for pod_ip in pod_ip_list):
return web.json_response(pod_ip_list)
return web.json_response(status=408) # Timeout.
async def _handle_report(self, request):
namespace = request.match_info['namespace']
name = request.match_info['name']
hints = await request.json()
# Drop all unrecognized fields. TODO: validate each client-sent field.
hints = {k: hints[k] for k in SCHED_HINTS if k in hints}
# Patch only the train field to avoid conflicts with controller.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// ElementViewController.swift
// DidAppear
//
// Created by 能登 要 on 2017/05/18.
// Copyright © 2017年 Kaname Noto. All rights reserved.
//
import UIKit
class ElementViewController: UIViewController {
public var tabIndex = Int(0)
private var callCount = Int(0)
public var pageIndex = Int(0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { IndentationText, NewLineKind, Project, ProjectOptions, QuoteKind } from 'ts-morph';
import * as path from 'path';
import { generateSwagger } from '../lib/generators/server/generate-swagger';
import { generateServerSuite, updateServerFile } from '../lib/generators/server/generate-server-suite';
import { generateClientHtmlComponents, generateClientSuite, updateAppRoutingModule } from '../lib/generators/client/generate-client-suite';
console.log(chalk.magenta(' _ _ _ _ _ '));
console.log(chalk.magenta('\| \\ \| \| \| \| \| \| (_) '));
console.log(chalk.magenta('\| \\\| \| ___ \| \|_ \| \|__ ______ __ _ _ __ _ ______ __ _ ___ _ __ '));
console.log(chalk.magenta('\| . ` \| / _ \\\| __\|\| \'_ \\ \|______\| / _` \|\| \'_ \\ \| \|\|______\| / _` \| / _ \\\| \'_ \\ '));
console.log(chalk.magenta('\| \|\\ \|\| __/\| \|_ \| \| \| \| \| (_\| \|\| \|_) \|\| \| \| (_\| \|\| __/\| \| \| \|'));
console.log(chalk.magenta('\\_\| \\_/ \\___\| \\__\|\|_\| \|_\| \\__,_\|\| .__/ \|_\| \\__, \| \\___\|\|_\| \|_\|'));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__author__ = """<NAME>"""
__email__ = '<EMAIL>'
__version__ = '0.1.0'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return $this->view->fetch('index', ['title' => '博客后台管理系统']);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
parser.add_argument('--database_user', default='postgres', type=str)
parser.add_argument('--database_password', default='<PASSWORD>', type=str)
parser.add_argument('--database_schema', default='unics_cordis', type=str)
def read_arguments_train():
parser = argparse.ArgumentParser(description="Run training with following arguments")
# model configuration
_add_model_configuration(parser)
# general configuration
parser.add_argument('--exp_name', default='exp', type=str)
parser.add_argument('--seed', default=90, type=int)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker-compose exec --user encrypt container_encrypt bash -c 'php /var/www/html/encrypt/bin/console doctrine:fixtures:load --no-interaction'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
msg = 'An error occurred during YAML parsing.'
if hasattr(exc, 'problem_mark'):
msg += ' Error position: (%s:%s)' % (exc.problem_mark.line + 1,
exc.problem_mark.column + 1)
raise ValueError(msg)
if not isinstance(yml_dict, dict) and not isinstance(yml_dict, list):
raise ValueError('The source is not a YAML mapping or list.')
if isinstance(yml_dict, dict) and len(yml_dict) < 1:
raise ValueError('Could not find any element in your YAML mapping.')
return yml_dict
def dump(s):
return yaml.dump(s, Dumper=yaml_dumper)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
params = {
'plugin_info': plugin_info
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import static org.mockito.Mockito.inOrder;
@RunWith(MockitoJUnitRunner.class)
public class SiteServiceImplITTest {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import Foundation
public struct Feedback: Codable {
public let text: String?
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif [ $X == $Y ] || [$X == $Z ] || [ $Y == $Z ]; then
echo "ISOSCELES"
else
echo "SCALENE"
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.x_train = x_train.reshape((-1, self.train_batch_size, self.input_dim))
self.y_train = y_train.reshape((-1, self.train_batch_size, 1))
(x_test, y_test) = self.sample_fn(
self.apply_fn, self.x_train_generator,
nsamples, next(self.rng))
self.x_test = x_test.reshape((-1, self.test_batch_size, self.input_dim))
self.y_test = y_test.reshape((-1, self.test_batch_size, 1))
def reset(self):
self._initialize_data()
self.t = 0
# Returns current_state
return {"X_train": self.x_train[self.t],
"y_train": self.y_train[self.t],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def replace():
steps={1:'Extracting content',2:'Starting edition',3:'Getting cuantity'}
actual=1
try:
file = get_path()
print(steps[1])
content = open(file).read()
line = [x for x in content.split('\n') if ' ' in x[:1]][0]
actual=2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
f(bytearray()) | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
let res = m.eval(&x)?;
if tracemode {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}else{
return $this->insert();
}
}
} //end of BToursCategory
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$key1=new key($_POST['code'],$_POST['username'],$_POST['idGame'],$_POST['date']);
//Partie2
/*
var_dump($key1);
}
*/
//Partie3
$key1C=new KeyC();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class HelpViewer:
def __init__(self, parent):
self.text = parent.text
parent.rmenu.add_separator()
parent.rmenu.add_command(label='Help Viewer', command=self.view)
parent.add_adv_menu('Help Viewer', self.view)
def view(self):
sel = self.text.get('sel.first', 'sel.last')
view_text(self.text, 'Help on %r:' % sel, HelpText(sel))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('humidity', models.FloatField(default=0)),
('pressure', models.FloatField(default=0)),
('clouds', models.FloatField(default=0)),
('precipitation', models.FloatField(default=0)),
('weatherid', models.IntegerField(default=0)),
('rain', models.FloatField(default=0.0)),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
EVENT_RELAY_CLUSTERS.append(zcl.clusters.general.LevelControl.cluster_id)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def add_label(self, label, above=True, zref=False):
if zref:
self.packages.add(Package("zref-user"))
lbl = 'zlabel'
else:
lbl = 'label'
if above:
self.insert(0, Command(
lbl, NoEscape(f"{self._label}:{label}")))
else:
self.append(Command(lbl, NoEscape(f"{self._label}:{label}")))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tmux new-session -A -s "$name" \; source-file "$session_file"
else
echo "=== Creating: $name"
tmux new-session -A -s "$name"
fi
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Process process1 = processRepository.findOne(process.getParentId());
if (process1 != null) {
process.setParentProcess(process1);
}
process.setCreateTime(new Date());
process.setDeleteStatus(false);
return processRepository.save(process);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@override_settings(PD_VENDOR_KEY="foo")
class AddPdConnectTestCase(BaseTestCase):
def setUp(self):
super().setUp()
self.url = "/projects/%s/add_pdc/" % self.project.code
def test_it_works(self):
session = self.client.session
session["pd"] = "1234567890AB" # 12 characters
session.save()
self.client.login(username="<EMAIL>", password="password")
url = self.url + "1234567890AB/?service_key=123"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def calcDimensionSim(mainBlob: [float], otherBlob: [float]) -> float:
similarity = 0 # Holder for similarity score
# Calculate each difference of each value (x, y, w, h)
for attr in ['x', 'y', 'w', 'h']:
distance = getattr(mainBlob, attr) - getattr(otherBlob, attr) # Calculate the difference
similarity += abs(distance) # Make distance absolute
return similarity # Return the similarity
# Get collision of point and rectangle
def pointRectCollider(p, r):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert test.fen == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1'
def test_NoDigit():
# half move will be reset to 0, move to 1
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq -')
assert test.fen == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1'
def test_negativeHalfMove():
# reset in preprocessing
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - -5 20')
assert test.fen == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div class="alert alert-dark">
{{ __("No hay ninguna película disponible") }}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __repr__(self):
items = filter(lambda x: x[0] in self._repr_values, vars(self).items())
state = ['%s=%s' % (k, repr(v)) for (k, v) in items]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from abc import abstractmethod, ABCMeta
import numpy as np
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if x < a.value {
match &mut a.left.link {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
//-----------------------------------------------------------------------------------
bool CameraController::keyPressed( const SDL_KeyboardEvent &arg )
{
if( arg.keysym.scancode == SDL_SCANCODE_LSHIFT )
| 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.