seed
stringlengths
1
14k
source
stringclasses
2 values
public enum Tag { // 属性标签 INPUT("input"),SELECT("select"),TEXTAREA("textarea"),REFERENCE("reference"),IMAGE("image"); public String value; Tag(String value){ this.value = value; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
cin >> n; for (i = 0; i < n; i++) { cin >> in[i]; } int sum = accumulate(in, in+n, 0); int average = sum / n;
ise-uiuc/Magicoder-OSS-Instruct-75K
from OpenGL import extensions, wrapper import ctypes from OpenGL.raw.GLES2 import _types, _glgets from OpenGL.raw.GLES2.NVX.blend_equation_advanced_multi_draw_buffers import * from OpenGL.raw.GLES2.NVX.blend_equation_advanced_multi_draw_buffers import _EXTENSION_NAME def glInitBlendEquationAdvancedMultiDrawBuffe...
ise-uiuc/Magicoder-OSS-Instruct-75K
export default Star;
ise-uiuc/Magicoder-OSS-Instruct-75K
migrations.CreateModel( name='UserInfo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', mod...
ise-uiuc/Magicoder-OSS-Instruct-75K
/home/runner/.cache/pip/pool/6e/30/4e/6df13ab33dd498623bcb8f860a029ad969938275a514553b6fe8b4b10b
ise-uiuc/Magicoder-OSS-Instruct-75K
//------------------------------------------------------------------------------ // Weight scale value. //------------------------------------------------------------------------------ template<typename Dimension> inline typename Dimension::Scalar HybridMassDensityPolicy<Dimension>:: weightScale() const {
ise-uiuc/Magicoder-OSS-Instruct-75K
signal(SIGPIPE, Crash.recieveSignal) signal(SIGSEGV, Crash.recieveSignal) signal(SIGSYS, Crash.recieveSignal) signal(SIGTRAP, Crash.recieveSignal) } } extension Crash {
ise-uiuc/Magicoder-OSS-Instruct-75K
def plan(self, state, goal): """ Generates a plan from state to goal. :param state: Starting state (dense) :param goal: Goal as (SparseState) :return: """ s_start = SparseState.from_dense_state(state)
ise-uiuc/Magicoder-OSS-Instruct-75K
#[foo = "bar"] fmt!("baz") fn main() { }
ise-uiuc/Magicoder-OSS-Instruct-75K
base.GameController.ExhaustCoroutine(coroutine); }
ise-uiuc/Magicoder-OSS-Instruct-75K
info = dict() info['conn_ok'] = False info['server_msg'] = 'Brak' info['score'] = 0
ise-uiuc/Magicoder-OSS-Instruct-75K
class RES(Enum): TENMIN = "10_minutes" HOURLY = "hourly" DAILY = "daily" @staticmethod
ise-uiuc/Magicoder-OSS-Instruct-75K
class IndicatorRepository extends Indicator {
ise-uiuc/Magicoder-OSS-Instruct-75K
def save_data(df, database_filename): """Saves DataFrame (df) to database path""" engine = create_engine('sqlite:///'+ database_filename) table_name = database_filename.replace(".db","") + "_table" df.to_sql(table_name, engine, index=False, if_exists='replace') def main(): if len(sys.argv) == 4:...
ise-uiuc/Magicoder-OSS-Instruct-75K
$bucketList = []; $content = $this->rawResponse->body; $xml = new \SimpleXMLElement($content); if (isset($xml->Buckets, $xml->Buckets->Bucket)) { foreach ($xml->Buckets->Bucket as $bucket) { $bucketInfo = new BucketInfo(); $bucketInfo->parseFro...
ise-uiuc/Magicoder-OSS-Instruct-75K
} /* use for test purposes needs to be excluded in final game */ if (Input.GetMouseButtonDown(0)) { GenerateMap(); } } public void OnValidate() { if (_map != null) { GenerateMap(...
ise-uiuc/Magicoder-OSS-Instruct-75K
int owner_id; // assuming owner id to be within integer range i.e -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647 string name,info,all; float val; cout<<"Enter owner id"; cin>>owner_id; cout<<"Enter value in floating point integer fixed upto 2 decimal places"; // assuming the value entered ...
ise-uiuc/Magicoder-OSS-Instruct-75K
""" # Implemented from template for osid.resource.ResourceQuery.clear_group_terms self._clear_terms('agency') agency_terms = property(fdel=clear_agency_terms) @utilities.arguments_not_none def get_agent_query_record(self, agent_record_type):
ise-uiuc/Magicoder-OSS-Instruct-75K
{ var query = new SubscriptionsQuery() { PublisherId = publisher?.Id, ConsumerId = consumer?.Id, EventType = EventType ...
ise-uiuc/Magicoder-OSS-Instruct-75K
$i = !($_SERVER['REQUEST_SCHEME']=='http'); try { $sql = new PDO("mysql:host=$host[$i];dbname=$dbname[$i];charset=utf8", $user[$i], $password[$i], array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); } catch (Exception $e) { header('Content-type: text/plain','error',500); die('Erreur : ' . $e->getMessage()); } ?>
ise-uiuc/Magicoder-OSS-Instruct-75K
fn handle(&mut self, msg: RouteResolution, _ctx: &mut Self::Context) -> Self::Result { if msg.0 == "/wedding" { if self.wedding.is_none() { let actor: SharedLiveActor<wedding::WeddingData> = SharedLiveActor::new(wedding::WeddingData::default()); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
side = 'SELL', quantity = coins[coin]['volume'], price = SellPrice, stopPrice = StopOrderTrigger, stopLimitPrice = StopOrderPrice,
ise-uiuc/Magicoder-OSS-Instruct-75K
__author__ = 'chris' """ Package for holding all of our protobuf classes """
ise-uiuc/Magicoder-OSS-Instruct-75K
auth_middleware: TokenAuthentication, ) -> None: """Test authentication with a valid token.""" request = create_request("/", API_TOKEN)
ise-uiuc/Magicoder-OSS-Instruct-75K
] } }, "patternProperties": { "patternProperty1.*": { "type": "object" } }, "additionalProperties": false, "req...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Return updated heatmap return heatmap def add_heat_labels(heatmap, bbox_list, labels): bbox_list = np.array(bbox_list) label_windows = return_labeled_windows(labels) for car_number in range(0, labels[1]): box_index = 0 delta_Y = 0 car_heatmap = np.zeros_like(heatmap) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Parsable+Recursive.swift // Ogma // // Created by Mathias Quintero on 4/23/19. // import Foundation extension Parsable { /// Returns a parser that will parse the Value n times separated by a separator Token
ise-uiuc/Magicoder-OSS-Instruct-75K
use super::*; mod mpsc_async; #[cfg(feature = "std")]
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace _06._Replace_Repeating_Chars { class Program { static void Main(string[] args) {
ise-uiuc/Magicoder-OSS-Instruct-75K
if len(input_bboxes) > keep_top_k: indices = np.argsort(-input_scores)[:keep_top_k] scores = input_scores[indices] bboxes = input_bboxes[indices] else: scores = np.copy(input_scores) indices = np.arange(len(scores)) bboxes = input_bboxes similarity_matrix = m...
ise-uiuc/Magicoder-OSS-Instruct-75K
primes[i]=False #If value is true it is prime and print value for l in range(2,n): if primes[l]: print(f"{l} ") #Test while True: try: input_value = int(input("Please a number: "))
ise-uiuc/Magicoder-OSS-Instruct-75K
this.price = price; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
use Oculus\Library\Log as Log; class Payflowiframe extends Model { public function getMethod($address, $total) { $this->language->load('payment/payflowiframe'); $query = $this->db->query("SELECT * FROM {$this->db->prefix}zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get('pa...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub struct CacheDeferMetrics { pub tenant_label: TenantLabel, pub cache_hit: bool, pub read_bytes: u64, } impl Drop for CacheDeferMetrics { fn drop(&mut self) { let label = &self.tenant_label; let tenant_id = &label.tenant_id; let cluster_id = &label.cluster_id; label_c...
ise-uiuc/Magicoder-OSS-Instruct-75K
size = len(queue) print(queue, steps) for _ in range(size):
ise-uiuc/Magicoder-OSS-Instruct-75K
# If USE_TIMEOUTS is None, this timeout should be used. NO_TIMEOUT = None DEFAULT_TIMEOUT = 10 def is_true_in_env(env_key): """
ise-uiuc/Magicoder-OSS-Instruct-75K
traceLocationGUID: traceLocationGUID, traceLocationGUIDHash: traceLocationGUID.data(using: .utf8) ?? Data(), traceLocationVersion: 0,
ise-uiuc/Magicoder-OSS-Instruct-75K
HQGroupExportConfiguration, ReportNotification, UnsupportedScheduledReportError, ) from corehq.apps.es.domains import DomainES from corehq.elastic import ( get_es, ES_URLS, stream_es_query, send_to_elasticsearch, ) from corehq.pillows.mappings.app_mapping import APP_INDEX from dimagi.utils.p...
ise-uiuc/Magicoder-OSS-Instruct-75K
class LabelFrameThemed(ttk.LabelFrame, BaseTextTkinterWidget, BaseFrameMixin):
ise-uiuc/Magicoder-OSS-Instruct-75K
import pandas.util.testing as tm from pandas.core.frame import DataFrame from pandas.core.series import Series from pandas import read_excel import pytest ip = get_ipython() ip.magic('load_ext excelify')
ise-uiuc/Magicoder-OSS-Instruct-75K
# =============================================================================== # from __future__ import annotations from pydantic import Field from .chat_invite_link_count import ChatInviteLinkCount from ..base_object import BaseObject class ChatInviteLinkCounts(BaseObject):
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_lang_name(lang): return _(dict(settings.LANGUAGES)[lang])
ise-uiuc/Magicoder-OSS-Instruct-75K
rendered_template = template.render(my_private_ip=my_private_ip, my_public_ip=my_public_ip) with open('/etc/nginx/sites-available/default', 'w') as file_handle: file_handle.write(rendered_template)
ise-uiuc/Magicoder-OSS-Instruct-75K
class Solution: # Top Down DP (Accepted), O(n^2) time, O(1) space def minimumTotal(self, triangle: List[List[int]]) -> int: for i in range(1, len(triangle)): row = triangle[i] row[0] += triangle[i-1][0] row[-1] += triangle[i-1][-1]
ise-uiuc/Magicoder-OSS-Instruct-75K
computes the probability that a household is infected given population level prevalence, household size distribution and household secondary attack rate INPUT: prevalence = population level prevalence household_dist = array-like, probability distribution of household sizes 1, 2, 3, ... SAR = ho...
ise-uiuc/Magicoder-OSS-Instruct-75K
# ###Debug # for name, param in model_ft.named_parameters(): # print(name) # print(param.requires_grad) # exit() def forward(self, x): batch_size = x.shape[0] x = self.model(x) return x
ise-uiuc/Magicoder-OSS-Instruct-75K
<label>{{ Form::radio('taint_sysflows', '0', true, array('id' => 'taint_sysflows_disabled')) }} Disable</label> </div> </div> </li>
ise-uiuc/Magicoder-OSS-Instruct-75K
# nrfjprog --program $1 --chiperase -f nrf52 --reset --verify # This erases all chip, not sure what effect will happen for soft device etc. # Soft devices are located here: https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/tree/master/bin/softdevice # nRF52832 - S132 # nRF52833/nRF52840 - S140
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertEqual(True, room.has_room(self.HOST, room_id)) self.requestDeclineAndVerify(room_id, 'callee1gcm1', constants.RESPONSE_SUCCESS) self.assertEqual(room.Room.STATE_EMPTY, room.get_room_state(self.HOST, room_id))
ise-uiuc/Magicoder-OSS-Instruct-75K
cursor.execute("UPDATE room_info SET person_capacity=?, city=?, beds=?,\ localized_neighborhood=?, price=?, pic=?, update_time=?, query_str=? WHERE room_id=?", ( roomInfo.personCapacity, roomInfo.city, roomInfo.beds, roomInfo.neighbourhood...
ise-uiuc/Magicoder-OSS-Instruct-75K
from retrobiocat_web import __version__ with open('requirements.txt') as f: requirements = f.read().splitlines() setup( name = 'retrobiocat_web', packages = find_packages(), include_package_data=True, version = __version__,
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from "./GameController"; export * from "./GameController.const";
ise-uiuc/Magicoder-OSS-Instruct-75K
} Console.WriteLine(); } contLinha++; contFigura++; } } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
COREF = 'coref' itemgetter
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ static debug(message: any): void { this.printMessages(message, 'debug'); } /** * Write a 'verbose' level log. */ static verbose(message: any): void { this.printMessages(message, 'verbose'); } private static colorIfAllowed = (colorFn) => (text) => !process.env....
ise-uiuc/Magicoder-OSS-Instruct-75K
('conference', '0003_auto_20190313_1858'), ] operations = [ migrations.AddField( model_name='conference', name='source', field=models.CharField(default='acm', max_length=32), preserve_default=False, ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
else: print("File was not found. Continuing with defined model.") # Training and/or testing if train: trainer = Training(env, model, model_name, max_memory, batch_size, target_model_update, enable_double=enable_double, enable_due...
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace MvpWebForms { using MvpWebForms.Presenters; using MvpWebForms.Views; using Narvalo.Mvp;
ise-uiuc/Magicoder-OSS-Instruct-75K
RPL_MOTDSTART = 375 RPL_ENDOFMOTD = 376 ERR_NOSUCHCHANNEL = 403 logger = logging.getLogger(__name__) class Client(object):
ise-uiuc/Magicoder-OSS-Instruct-75K
* @see FormInterface::buildForm() */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name'); }
ise-uiuc/Magicoder-OSS-Instruct-75K
let x: number, y: number, r: number do { x = random.next() * 2 - 1 y = random.next() * 2 - 1
ise-uiuc/Magicoder-OSS-Instruct-75K
std::shared_ptr<void> storage; template<typename T> inline static void funcDeleter(void* mPtr) { static_cast<T*>(mPtr)->~T(); operator delete(mPtr); }
ise-uiuc/Magicoder-OSS-Instruct-75K
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
ise-uiuc/Magicoder-OSS-Instruct-75K
glBindBuffer(GL_ARRAY_BUFFER, m_RendererID); }
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_logger(): """Get the logger.""" return logging.getLogger("BLUSE.interface")
ise-uiuc/Magicoder-OSS-Instruct-75K
* @var SubMerchantInfo */ private $subMerchantInfo; /** * @var SubMerchantInfo */
ise-uiuc/Magicoder-OSS-Instruct-75K
EmbeddedSwig embed_swig_param_I8259(init_param_I8259);
ise-uiuc/Magicoder-OSS-Instruct-75K
public class MsgTest : MsgBase
ise-uiuc/Magicoder-OSS-Instruct-75K
''' lab2 ''' #3.1
ise-uiuc/Magicoder-OSS-Instruct-75K
# fn.descent = 200 # fn.upos = -125 # fn.em = 1000 fn.save(f'tmp2-{weight}.sfd') fn.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
print(body)
ise-uiuc/Magicoder-OSS-Instruct-75K
System.out.println(response.toString()); System.out.println(WechatAppPayProtocolHandler.marshalToXml(response, null)); try { response.setReturn_code(null); Util.validateValueObject(response);
ise-uiuc/Magicoder-OSS-Instruct-75K
margin-left: 0px !important; } </style> </head> <body class="hold-transition skin-green-light sidebar-mini"> <div class="wrapper">
ise-uiuc/Magicoder-OSS-Instruct-75K
sm.flipDialogue() sm.sendSay("We have a problem, and it's not a lack of conditioner. I'll tell ya that!") sm.flipDialogue() sm.sendSay("That warrior you found is in a coma. Lost their fight with consciousness. I guess. I had a letter somewhere here from Momijigaoka (He smashes boxes and chairs looking ...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// <summary> /// A full set of fields -- get it all! /// </summary> public static Character Full { get { return new Character(true); } } /// <summary> /// Default ctor. /// </summary> public Character() { }
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('application', '0001_initial'), ] operations = [ migrations.AlterField( model_name='client', name='link', field=models.URLField(blank=True, null=True),
ise-uiuc/Magicoder-OSS-Instruct-75K
independentField: Field.INPUT, } if (defaultInputAmount && defaultInputToken) { defaultSwapState.amount = defaultInputAmount } else if (defaultOutputAmount && defaultOutputToken) { defaultSwapState.independentField = Field.OUTPUT defaultSwapState.amount = defaultOutputAmount } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
error_message = models.CharField(max_length=255)
ise-uiuc/Magicoder-OSS-Instruct-75K
ATTR_TEIR = "Price Teir" ATTR_PRICE = "Price"
ise-uiuc/Magicoder-OSS-Instruct-75K
public static SpreadConfig ShiftedSpread(int itemsPerRaw, GameObject gameObj, float x, float y, int count) { var result = EqualSpread(gameObj, x, y, count); result.RawShift = true; result.ItemsPerRaw = itemsPerRaw; return result; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
class IncrementWorkfileVersion(pyblish.api.ContextPlugin): """Increment current workfile version.""" order = pyblish.api.IntegratorOrder + 1 label = "Increment Workfile Version"
ise-uiuc/Magicoder-OSS-Instruct-75K
!!mediators.filter(({ dataSource }) => dataSource.uri !== uri).length if (hasDifferentDataSources()) { throw new Error( `Invalid query, it uses mediators with different data sources` ) } const { resolver, dbInterface } = getResolverAndInterface(type) const entities = mediators
ise-uiuc/Magicoder-OSS-Instruct-75K
private System.Windows.Forms.Label allegationErrorLabel; private System.Windows.Forms.Label complaintSummaryErrorLabel; private System.Windows.Forms.Label emailErrorLabel; private System.Windows.Forms.Label phoneNumberErrorLabel; private System.Windows.Forms.Label zipCodeErrorLab...
ise-uiuc/Magicoder-OSS-Instruct-75K
"The plot was good, but the characters are uncompelling and the dialog is not great.", // mixed negation sentence "Today SUX!", // negative slang with capitalization emphasis "Today only kinda sux! But I'll get by, lol"...
ise-uiuc/Magicoder-OSS-Instruct-75K
from neighbors.knn_classifier import KNNClassifier from neighbors.knn_regressor import KNNRegressor
ise-uiuc/Magicoder-OSS-Instruct-75K
if c != 3: raise ValueError('Input image must be a 3-channel (YCbCr) image.') if im.dtype != np.uint8: im = img_as_uint(im)
ise-uiuc/Magicoder-OSS-Instruct-75K
assert threeSumClosest([0,2,1,-3], 1) == 0 assert threeSumClosest([-1,2,1,-4], 1) == 2 def test_fourSum(): assert fourSum([-1,2,2,-5,0,-1,4], 3) == [(-5,2,2,4), (-1,0,2,2)] assert fourSum([1,0,-1,0,-2,2], 0) == [(-2,-1,1,2), (-2,0,0,2), (-1,0,0,1)]
ise-uiuc/Magicoder-OSS-Instruct-75K
for i, line in enumerate(f): word, vector = line.rstrip().split(' ', 1) word = prefix + word vector = np.fromstring(vector, sep=' ') if word in token_to_idx: raise ValueError('duplicate word {} in {}'.format(word, path))
ise-uiuc/Magicoder-OSS-Instruct-75K
def on_state(self, _, value): self.text = self.texts[value == 'down']
ise-uiuc/Magicoder-OSS-Instruct-75K
} thread::sleep(Duration::from_millis(3)); } Ok(()) } /// Adds models to the scene
ise-uiuc/Magicoder-OSS-Instruct-75K
contact = models.TextField(verbose_name=_(u"Contact"), blank=True, db_column='contact') email = models.EmailField(verbose_name=_(u"Email"), max_length=256, db_column='email', blank=True, null=True) website = models.URLField(verbose_name=_(u"Website"), max_length=256, db_column=...
ise-uiuc/Magicoder-OSS-Instruct-75K
migrations.CreateModel( name='Hashtag', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ], ), migrations.CreateModel( ...
ise-uiuc/Magicoder-OSS-Instruct-75K
from zope.site.tests.test_site import TestSiteManagerContainer
ise-uiuc/Magicoder-OSS-Instruct-75K
pbpaste | xmllint --xpath '//code/div/text()' - | recode html..ascii
ise-uiuc/Magicoder-OSS-Instruct-75K
self.value = crc16.crc16_buff(str(i), self.value) try: if (int(response[1:-2]) != self.value): if self.consistency:
ise-uiuc/Magicoder-OSS-Instruct-75K
int Pred(int x) { int y = x; while (a[y] != y) y = a[y]; while (a[x] != y) { int c = a[x]; a[x] = y; x = c;
ise-uiuc/Magicoder-OSS-Instruct-75K
def fourier_inverse_curl(Bx, By, Bz, x, y, z, method='fourier', pad=True): r""" Invert curl with pseudo-spectral method described in MacKay 2006. """ shape = Bx.shape Bx_copy = np.array(Bx) By_copy = np.array(By) Bz_copy = np.array(Bz)
ise-uiuc/Magicoder-OSS-Instruct-75K
((bracketLevel == 1 ? "[" : "")/*# fields.ForEach(f => {*/ + __f__.ToString(null, CultureInfo.InvariantCulture) /*# }, addqcommaspace); */ + (bracketLevel == 1 ? "]" : "")).ToText(); } #endregion #region Static Methods /// <summary> ...
ise-uiuc/Magicoder-OSS-Instruct-75K
var contextType : String! var downTime : String! var playTime : Int! var title : String! var upTime : String! var isShow = true
ise-uiuc/Magicoder-OSS-Instruct-75K