seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
x = int(input())
a = 100
for i in range(1 << 20):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub filename: String,
pub case_sensitive: bool,
}
impl Config {
pub fn new(mut args: env::Args) -> Result<Self, &'static str> {
args.next();
let query = match args.next() {
Some(arg) => arg,
None => return Err("Didn't get a query string"),
};
let fil... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public IEnumerator AddScore()
{
EndlessPlayerController.Score += 100000;
EndlessEnemySystem.BossDying = true;
_Anim.enabled = false;
_AddingScore = true;
audio.PlayOneShot(GuardianDeath);
yield return new WaitForSeconds(6f);
Vector3 effectsPos = new Vector... | ise-uiuc/Magicoder-OSS-Instruct-75K |
name='nats-py',
version=__version__,
description='NATS client for Python',
long_description='Python client for NATS, a lightweight, high-performance cloud native messaging system',
classifiers=[
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming... | ise-uiuc/Magicoder-OSS-Instruct-75K |
>>> spikes = np.array([50, 100, 150, 200, 250, 300])
>>> restrict_range(spikes, min_time=None, max_time=250)
array([ 50, 100, 150, 200, 250])
Restrict a vector of spike times to a specific range:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Closure that may be set to observe the creation of new streams.
/// It will be called each time `newStreamPrototype()` is executed.
///
/// Typically, this is used to capture streams on creation before sending values through them.
public var onStartStream: ((MockStream) -> Void)?
// Only explicitly imp... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Panics if data length is less than 11 bytes.
pub fn read_offset(data: &[u8]) -> Option<u64> {
if data.len() < 11 {
panic!(
"read_offset data length must not be less than 11, was given {}",
data.len()
);
}
// Attempt to find two sequential u32s three times, with a... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
std::wstring Renderer::GetBinPath(std::wstring shader_file) const
{
WCHAR buffer[MAX_PATH];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tar -xzf batch_mode_ubuntu.tar.gz
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::vector<T> dat;
T merge(T a, T b) const { return a + b; }
public:
binary_indexed_tree(size_t N) : dat(N + 1, NEUTRAL) {}
binary_indexed_tree(size_t N, T t) : dat(N + 1, NEUTRAL) {
for (int i = 0; i < (int)N; ++i) {
update(i, t);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public typealias TensorFlowSeed = (graph: Int32, op: Int32)
public enum ReinforcementLearningError: Error {
case renderingError(String)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def load_gold_labels(session, annotator_name, **kwargs):
return load_matrix(csr_LabelMatrix, GoldLabelKey, GoldLabel, session, key_names=[annotator_name], **kwargs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$access_logs = ["rows"=>$rows,"categories"=>$categories,"total"=>$total];
return $access_logs;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn led_illuminant_data() -> HashMap<&'static str, [f64;2]> {
hashmap!{
"LED-B1" => [0.4560, 0.4078],
"LED-B2" => [0.4357, 0.4012],
"LED-B3" => [0.3756, 0.3723],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>NEW_PRAC/HackerRank/Python/SetDifferenceString.py<gh_stars>10-100
# >>> s = set("Hacker")
# >>> print s.difference("Rank")
# set(['c', 'r', 'e', 'H'])
# >>> print s.difference(set(['R', 'a', 'n', 'k']))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
raise TypeError("Expected argument 'delegations' to be a list")
pulumi.set(__self__, "delegations", delegations)
if roles and not isinstance(roles, list):
raise TypeError("Expected argument 'roles' to be a list")
pulumi.set(__self__, "roles", roles)
if scope and n... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class FoundationTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
import fudge
| ise-uiuc/Magicoder-OSS-Instruct-75K |
UnknownStationError,
UnexpectedGTFSLayoutError,
)
from .__version__ import __version__
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.links = links
class File(JsonableObject):
""" Workspace File
path:
string
Path of the file, relative to the user's root directory. MUST NOT
start with a slash and MUST NOT be url-encoded.
example: "folder/file.txt"
size:
integer
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# [-n]: if target file/dir is already a symlink, do not follow it
# [-v]: verbose
#
ln -sfnv $HOME/Dropbox/dotfiles/.aws $HOME/.aws
ln -sfnv $HOME/Dropbox/dotfiles/.bashrc $HOME/.bashrc
ln -sfnv $HOME/Dropbox/dotfiles/.bash_profile $HOME/.bash_profile
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public enum Sort
{
Name,
Description,
Accessibility,
Created,
Modified,
BookmarkCount,
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert!(
*module.last().expect("Empty module name") == 0,
"Module name should be zero-terminated"
);
assert!(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.master.protocol("WM_DELETE_WINDOW", self.on_close)
self.bind("<Configure>", self.on_configure)
self.bind("<FocusIn>", self.on_focus_in)
self.bind("<FocusOut>", self.on_focus_out)
self.focus_set()
# Pack MainFrame
self.pack(fill=tk.BOTH, expand=tk.YES)
d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
session_maker = get_session_maker()
with get_session(session_maker) as db:
granule_counts = db.query(GranuleCount).all()
assert_that(granule_counts).is_length(0)
@pytest.mark.usefixtures("db_connection_secret")
@pytest.mark.usefixtures("db_session")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
protected IForm form;
public JsonPage() {
super();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
""" Module for the frontend, ie the UI and presentation layer """
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return Err(io::Error::INVAL);
}
#[cfg(any(target_os = "android", target_os = "linux"))]
DynamicClockId::RealtimeAlarm => c::CLOCK_REALTIME_ALARM,
#[cfg(any(target_os = "android", target_os = "linux"))]
DynamicClockId::Tai => c::CLOCK_TAI,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from mercurial.i18n import _
from mercurial.node import short, nullid
from mercurial import scmutil, scmutil, util, commands, encoding
import os, shlex, shutil, tempfile, re
def snapshot(ui, repo, files, node, tmproot):
'''snapshot files as of some revision
if not using snapshot, -I/-X does not work and recurs... | ise-uiuc/Magicoder-OSS-Instruct-75K |
case User = "username"
case CourseDetails = "course_details"
case CourseID = "course_id"
case EmailOptIn = "email_opt_in"
case Mobile = "mobile"
}
public static func getCourseCatalog(userID: String, page : Int) -> NetworkRequest<Paginated<[OEXCourse]>> {
retu... | ise-uiuc/Magicoder-OSS-Instruct-75K |
np.random.seed(0)
loads1 = np.random.rand(16, 16)
loads2 = np.random.rand(16, 16)
directions = 'xyzx'
for i in range(3):
dir_1 = directions[i]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import pytest
from double_check.backends.ramos import configure_ramos
@pytest.fixture(autouse=True)
def config_ramos():
configure_ramos()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print("Route:\n\n" + route)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
parser = argparse.ArgumentParser('ERNIE-en model with Paddle')
parser.add_argument('--debug', type=str2bool, default=False)
# Model Args
parser.add_argument('--ernie_config_file', type=str, default='./config/ernie_config.json')
parser.add_argument('--vocab_file', type=str, default='./config/30k-cle... | ise-uiuc/Magicoder-OSS-Instruct-75K |
name = "worker-" + str(p.pid)
cc = multiprocessing.Process(name=name, target=routine)
cc.daemon = False
cc.start() | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>experiments/run_baseline_bpe_10k.sh
python -m nmt.nmt \
--src=ypk --tgt=en \
--vocab_prefix=/home/yuarcuun/data/bpe10k_baseline/vocab.10000.BPE \
--train_prefix=/home/yuarcuun/data/bpe10k_baseline/train.10000.BPE \
--dev_prefix=/home/yuarcuun/data/bpe10k_baseline/dev.10000.BPE \
--test_p... | ise-uiuc/Magicoder-OSS-Instruct-75K |
organism = args.org
strain = args.strain
keywords = ''
search_phrase = ''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
${logger.bold('Test:')} ${logger.dim('Run unit and end-to-end tests.')}
${prompt} ${logger.green('stencil test [--spec] [--e2e]')}
${logger.cyan('--spec')} ${logger.dim('............')} Run unit tests with Jest
${logger.cyan('--e2e')} ${logger.dim('.............')} Run e2e tests with Puppeteer
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"PhoneNumber": "string",
"Subject": "string",
"TargetArn": "string",
"TopicArn": "string",
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func testFetchingDataForStocks() {
let stocks = manager.loadDataForStocks()
do {
let resp = try XCTUnwrap(stocks)
XCTAssertNotEqual(resp.count, 0, "There are no records for stocks")
} catch {
XCTFail("unable to unwrap stock data")
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
memo = input("Enter a memo:")
self.notebook.new_note(memo)
print("Your note has been added")
def modify_note(self):
"""
modifies the note
"""
id = input("enter a note id:")
memo = input("Enter a memo:")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"level"=> $type,
"message"=> $message
]);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endor... | ise-uiuc/Magicoder-OSS-Instruct-75K |
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func setupView() {
addSubview(imageView)
imageView.snp.makeConstraints { (maker) in
maker.center.equalToSuperview()
maker.width.height.equalTo(self.snp... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>chrome/chrome_cleaner/os/process.cc<gh_stars>1000+
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/chrome_cleaner/os/process.h"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
DB::connection()->getPdo()->commit();
if(isset($data->banner_id) && $data->banner_id > 0){
//x�a cache banner show
$key_cache = Memcache::CACHE_BANNER_ADVANCED.'_'.$data->banner_type.'_'.$data->banner_page.'_'.$data->banner_category_id.'_'.$data->b... | ise-uiuc/Magicoder-OSS-Instruct-75K |
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if return_states:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import torch
import torch.nn as nn
from torch3d.nn import SetAbstraction
class PointNetSSG(nn.Module):
"""
PointNet++ single-scale grouping architecture from the `"PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space" <https://arxiv.org/abs/1706.02413>`_ paper.
Args:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::vector<uint32_t> input(u32Data, u32Data + sizeInU32);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ticket.save()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace App\Repositories\Contracts;
interface CustomerRepositoryInterface
{
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>lists/stocks.py
tickers = [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cp env-sample.js src/env-test.js
| ise-uiuc/Magicoder-OSS-Instruct-75K |
batch_samples = self.samples[index]
steering_angle = float(batch_samples[3])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</div>
@endforeach
<div class="col-sm-1"></div>
</div>
@endforeach
{{ $products->links() }}
@endsection | ise-uiuc/Magicoder-OSS-Instruct-75K |
s = input()
if re.match(r, s):
print(s)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
import Foundation
final class WebService {
// MARK: - Properties
static let shared = WebService()
// MARK: - Lifecycle
private init() {}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private string category;
private int wheels = (int)VehicleType.Motorcycle;
public Motorcycle(string make, string model, decimal price, string category)
: base(make, model, price)
{
this.Category = category;
base.Type = VehicleType.Motorcycle;
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
EXPECT_NE(device1, device2);
EXPECT_NE(device1, device3);
EXPECT_EQ(device1, device4);
EXPECT_LT(device1, device2);
EXPECT_LT(device1, device3);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
extension VToggleModel.Colors {
public typealias StateColors = StateColorsOOD
public typealias StateOpacities = StateOpacitiesPD
}
// MARK:- Fonts
extension VToggleModel {
public struct Fonts {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
TEMP_HIGH = 85.0
TEMP_CRITICAL = 90.0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* - Note: Supported in MongoDB version 4.0+ only.
*/
public func watch<FullDocType: Codable>(
_ pipeline: [Document] = [],
options: ChangeStreamOptions? = nil,
session: ClientSession? = nil,
withFullDocumentType _: FullDocType.Type
)
throws -> ChangeStream<Chang... | ise-uiuc/Magicoder-OSS-Instruct-75K |
openssl req -x509 \
-newkey rsa:2048 \
-nodes \
-keyout ${CERT_PRIV_KEY} \
-out ${CERT} \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
result = await client.analyze_conversation(
task={
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"participantId": "1",
"id": "1",
"modality": "text",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
case RegionPlace.inside:
if (currentLocation.Start > region.End)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
DEFAULT_CONFIG = {
'source': os.path.join(paths.APP_PATH, 'assets/js'),
}
class JSLint(object):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
info.keys.Sort([](const Curve::Key& a, const Curve::Key& b) { return a.position < b.position; });
}
}
CurveDeleteKeysAction::CurveDeleteKeysAction()
{ }
String CurveDeleteKeysAction::GetName()
{
return "remove keys";
}
void CurveDeleteKeysAction::Redo()
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print("Takahashi")
else:
k = 1
cri = seki(k, row // 2)
if n < cri:
print("Takahashi")
else:
print("Aoki")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set +a
docker-compose -f docker-compose.yml up --build -V -d
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def query_by_project_id_total(cls, pid):
# TODO : here need case import
# ret = cls._query_total().filter(InterfaceModule.status == InterfaceModule.ACTIVE,
# InterfaceModule.project_id == pid, Case.status != Case.DISABLE).order_by(
# desc(Interface... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public class EmptyMemberDeclarationMerger extends AbstractMerger<EmptyMemberDeclaration> {
@Override public EmptyMemberDeclaration doMerge(EmptyMemberDeclaration first, EmptyMemberDeclaration second) {
EmptyMemberDeclaration emd = new EmptyMemberDeclaration();
emd.setJavaDoc(mergeSingle(first.getJavaDoc(),s... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# 268. Missing Number
# Runtime: 132 ms, faster than 76.58% of Python3 online submissions for Missing Number.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Logging;
namespace GuidedSearchBot.Bots
{
// Represents a bot that processes incoming activities.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let dot = Some(dot_factory.create(pos,effect.val.unwrap(),0.0).await);
scene.push_dot(pos,dot.unwrap().clone()).await;
}
if let Some(dot) = scene.at(pos).await {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import getValidationErrors from '@utils/getValidationErrors';
import React from 'react';
import Toast from 'react-native-toast-message';
import * as yup from 'yup';
const ErrorCatcher = (
err: Error | yup.ValidationError,
formRef: React.RefObject<FormHandles>,
): void => {
if (err instanceof yup.Validation... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'form' => $form->createView()));
}
/**
* Création du menu et ces elements.
*
* @Route("/creerPl", name="Plcreation")
*/
public function creePlatAction(){
$session = $this->get('session');
| ise-uiuc/Magicoder-OSS-Instruct-75K |
})
purchase_order.button_confirm()
purchase_order.order_line.qty_received = 10
purchase_order.action_create_invoice()
self.assertEqual(purchase_order.invoice_status, "invoiced")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
context: ({ ctx }: { ctx: IKoaContext }) => ({
koa: ctx,
loaders: initLoaders(),
}),
debug: config.api.debugErrors,
introspection: true,
engine: false,
formatError: (err: ApolloError) => {
// log the full error first
log.error({ err }, 'GraphQl error h... | ise-uiuc/Magicoder-OSS-Instruct-75K |
{
bool flg = false;
int newfrom = 0;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
chrome_path = find_chrome_driver_path()
session = JdSession(webdriver_path=str(chrome_path),
browser='chrome',
webdriver_options=ChromeOptions())
session.webdriver_options.add_argument('lang=zh_CN.UTF-8')
if self.user.headless:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace app\user\controller;
use think\Db;
use cmf\controller\HomeBaseController;
class NotifyController extends HomeBaseController
{
// 充值回调
public function recharge()
{
$postStr = file_get_contents("php://input");
$orderxml = (array)simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDAT... | ise-uiuc/Magicoder-OSS-Instruct-75K |
except Exception:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Created by Konrad on 4/16/20.
// Copyright © 2020 Limbo. All rights reserved.
//
import Forms
import FormsSocialKit
import UIKit
// MARK: DemoSocialKitAllTableViewController
class DemoSocialKitAllTableViewController: FormsTableViewController {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ListManagedPoliciesInPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
/// Returns `true` if the error kind is `ListManagedPoliciesInPermissionSetErrorKind::ThrottlingException`.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
onNext?: (value: T) => void;
onComplete?: () => void;
}
interface Observer<T> {
next: (value: T) => void;
complete: () => void;
}
/**
* https://www.codewars.com/kata/5c8f822533a2b7336aeee2de
*/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<path>
exampls.mat
images/
2-fast-2-furious-00003571.jpg
...
Arguments:
path: The root directory of the dataset.
Raises:
ModuleImportError: When the module "scipy" can not be found.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
None => Err(ParseError("Script unexpectedly ended.".to_string())),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
_storage = storage;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
b.move()
bcount = BULLET_SPEED
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
APP = webapp2.WSGIApplication([
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$p2 = $p1;
xdebug_debug_zval('p1');
$p2->name = 'lisi';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import L7GapFiller
Scenes=arcpy.GetParameterAsText(0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
return retorno.FirstOrDefault();
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
STATUS_BAD = 'nofunction'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$code = 'RFQ-'.date('Ymd').'-'.$data->counter;
//$data->counter += 1;
}
//sleep(5);
ftruncate($file, 0);
rewind($file);
fwrite($file, json_encode($data));
return $code;
} else {
echo "Error locking file!";
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if( eventPtr ) {
mFgtCollectionPtr=eventPtr->fgtCollection();
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public void SetNFABit(BitSet b)
{
this.nfa_bit = b;
}
public Accept GetAccept()
{
return this.accept;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
ngOnInit() {
this.geolocation.getCurrentPosition().then((resp) => {
this.commonApi.lat = resp.coords.latitude;
this.commonApi.lng = resp.coords.longitude;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
convert a array-string to a python list
PG <9.0 used comma-aperated strings as array datatype. this function
will convert those to list. if pg_array is not a tring, it will not
be modified
"""
if not type(pg_array) in (str,unicode):
return pg_array
# only for one-dimesional arrays
... | 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.