seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
class AssetFetchResultMock: PHFetchResult<PHAsset> {
var phAssetsStub: [PHAsset]!
| ise-uiuc/Magicoder-OSS-Instruct-75K |
} else {
label.frame = CGRect(x: 0,
y: Settings.Sizes.yOffset - Settings.Sizes.yOffset * progress,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for (int j = 0; j < this.height; ++j)
{
result[i, j] = GetColor(i, j);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try:
coords[i,:]= res["N"].get_coord()
except KeyError:
try:
coords[i,:]= res["O"].get_coord()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# License: New BSD License.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Coordination
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
extern crate std;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assign(new_subst, g, mk_app(new_meta, h));
proof_state new_s(s, goals(new_g, tail_gs), new_subst);
return some_proof_state(new_s);
} else {
throw_tactic_exception_if_enabled(s, sstream() << "invalid 'revert' tactic, unknown hypothesis '" << n << "'");
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import { InternalState, ListenerUpdate } from '../../types';
// @ts-ignore
import Styles from '../../../sass/control.sass';
const props: any = {
id: 'id',
options: {
value: 'test',
name: 'name',
listener: (update: ListenerUpdate) => update,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class UnitTestUserAdmin(admin.BaseUserAdmin):
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return false
else:
print (f"Key Vault {key_vault_name} NOT exits ")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>Pharmacy Management System/Pharmacy Management System/Data Access Layer/Sale.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pharmacy_Management_System.Data_Access_Layer
{
class Sale
{
public int Sales... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// Created by Hugo on 7/21/15.
// Copyright (c) 2015 Hugo Alonso. All rights reserved.
//
import Foundation
import UIKit
/// Rate Functionalities handler
public class RateHandler {
/**
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Cabeçalho
tpl_data['logo_img'] = ''
if boletoDados.logo_image:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return "path_to_save_the_file.wav"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_autodetect():
data = 'Émetteur'
qr = segno.make(data)
assert qr.mode == 'byte'
def test_encoding():
encoding = 'iso-8859-15'
data = 'Émetteur'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
REFERENCE,
/**
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def add_set_item(self, _id, value):
self.set_items.append([_id, value])
print("Added Set Item '{0}' providing value '{1}'".format(_id, value))
def do_action(self):
print("Test")
def change_drivemode(self, mode):
DriveTable.PutNumber("drivemode", mode * 1.0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
valueTextField?.textContentType = nil
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
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... | ise-uiuc/Magicoder-OSS-Instruct-75K |
try dbQueue.inDatabase { db in
let record = Citizenship(personName: "Arthur", countryName: "France", native: true)
try record.insert(db)
let fetchedRecord = try Citizenship.filter(key: ["personName": record.personName, "countryName": record.countryName]).fetchOne... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// private static final Log log = LogFactory.getLog(ClusterBuilder.class);
public ClusterBuilder(AxisConfiguration axisConfig) {
this.axisConfig = axisConfig;
}
public ClusterBuilder(InputStream serviceInputStream, AxisConfiguration axisConfig) {
super(serviceInputStream, axisConfig);
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'''Calculate the amount of fuel for each part.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for url in self.start_urls:
yield scrapy.Request(url,
callback=self.navigate_to)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#BSUB -n 32
#BSUB -R "span[ptile=8]"
#
mpirun.lsf ./cntor lu
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for url in record.get("urls"):
if any(re.findall(pattern, url.get("url"))):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
obj = obj.serialize(ref, obj);
}
return obj;
}
};
}
/**
* Serializes any child in given object that has a type mapping
| ise-uiuc/Magicoder-OSS-Instruct-75K |
expect(self.key not in d1).to(be_true)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
#[cfg(with_main)]
pub fn main() {
println!("{:?}", f(ARG));
}
#[cfg(not(with_main))] #[cfg_attr(crux, crux_test)] fn crux_test() -> () { f(ARG) }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
a = int(input())
for i in range(a):
print('* '*(a-a//2))
print(' *'*(a//2)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>hbc007/DPlayer
declare const path: any
| ise-uiuc/Magicoder-OSS-Instruct-75K |
env = environ.Env(
DEBUG=(bool, True)
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Args:
x: Inputs of shape (m, n).
Returns:
Outputs of shape (m,).
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mb = cirq.measure(b)
c = cirq.Circuit()
assert c.are_all_measurements_terminal()
c = cirq.Circuit.from_ops(xa, xb)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return res
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__license__ = "This software is released under the MIT license cited in " \
"LICENSE.txt"
from tests import *
from tests.utils.utils import run_env_up_script
from tests.utils.path_utils import (config_file, get_file_name, make_logdir,
get_json_files, get_function)
from... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return MO.getImm();
}
void PPCMCCodeEmitter::encodeInstruction(
const MCInst &MI, raw_ostream &OS, SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const {
verifyInstructionPredicates(MI,
computeAvailableFeatures(STI.getFeatureBits()));
uint64_t Bits = getBinar... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#import sys
#!{sys.executable} -m pip install pyathena
from pyathena import connect
import pandas as pd
conn = connect(s3_staging_dir='s3://aws-athena-query-results-459817416023-us-east-1/', region_name='us-east-1')
df = pd.read_sql('SELECT * FROM "ticketdata"."nfl_stadium_data" order by stadium limit 10;', conn)
df | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
$this->assertCount(2, $properties);
$this->assertEquals('string', $properties['name']->getType());
$this->assertEquals('Paul', $properties['name']->getExample());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn update(&self, request: UpdateRequest) -> Result<Folder, ServiceError>;
fn delete(&self, id: i32) -> Result<Folder, ServiceError>;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if x not in range(-80,80):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def _run_script(command_args, env):
try:
check_call(command_args, env=env)
except CalledProcessError:
return False
else:
return True
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from extern import *
# CONSTANTS
TIME_FORMAT = '%H:%M:%S'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
package com.tau.data.datatau;
import java.util.ArrayList;
import java.util.List;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
true_positive_rates = np.array([1, 2])
false_positive_rates = np.array([3, 4])
roc_performance = ROCPerformance(true_positive_rates=true_positive_rates,
false_positive_rates=false_positive_rates)
self.assertListEqual(true_positive_rates.tolist(),... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.apps import AppConfig
class EndorsementConfig(AppConfig):
name = 'endorsement'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CoverImage findByImageLink(String imageLink);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let out = std::io::stdout();
let mut out = std::io::BufWriter::new(out.lock());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CHECK(Add(2, 3) == 5);
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
from . import setup_tasks | ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LicenseTax
{
public partial class LicenseTaxForm : Form
{
public LicenseTaxForm()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARR... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class Header implements Serializer {
@Override
public List<Byte> serialize() {
return byteList(START_MESSAGE);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
field=models.DateTimeField(blank=True, default=datetime.datetime(2021, 5, 16, 15, 27, 22, 850169), null=True),
),
migrations.AlterField(
model_name='liquid',
name='Death',
field=models.DateTimeField(blank=True, default=datetime.datetime(2021, 5, 16, 15, 27... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// this._build();
// return this._startModules()
// .then(() => {
// this._started = Date.now();
// });
// }
// newContext (data) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# data_path = '/home/jialia/wsdm/seq_datasets/B_full_feature_v2'
data_path = sys.argv[1]
print(os.path.abspath(data_path)) ## the path where I enter the cmd
# for test
train_file = os.path.join(data_path, r'train_instances.txt')
valid_file = os.path.join(data_path, r'valid_instances.txt')
test_file = os.path.join(dat... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def sample_orthogonalizer(idx, X_proxy, Y_proxy, tol=1e-12):
"""
Orthogonalizes two matrices, meant to represent a feature matrix
:math:`{\\mathbf{X}}` and a property matrix :math:`{\\mathbf{Y}}`, given
the selected samples :math:`{r}`
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return sum==0;
return XXX(root->left,sum)||XXX(root->right,sum);
}
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
async: true,
schemaId: 'auto'
});
this.ajv.addFormat('uriref', ajvFormats.full['uri-reference']);
this.ajv.addMetaSchema(draft4);
(this.ajv as any)._refs['http://json-schema.org/schema'] =
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in range(1,5):
self.assertAlmostEqual(sums[i-1], sum(scores[i:i+2]),
msg="Incorrect individual coefficients of determination!")
if __name__ == '__main__':
unittest.main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dst = "/Users/hesdx/Documents/ipfs/deplotplot/workers"
c = 0
tyaml = """
user_interface:
use_stty_size: True
directories:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Token::Seq { len: Some(0) },
Token::SeqEnd,
Token::MapEnd,
Token::SeqEnd,
],
);
assert_de_tokens(
&ManifestCatalog {
r#type: "type".to_owned(),
id: "id".to_owned(),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def squarish(points, threshold=.6):
#points = map(tuple, points)
# Are all side lengths about the same?
d = distances(points)
shortest = float(min(d))
longest = float(max(d))
distance_ratio = shortest / longest
distances_are_close_enough = False
if distance_ratio >= threshold:
d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def noti_emit(self, msg, room=None):
if room:
self.socketio.emit(NOTI, {'data': msg}, namespace='/noti', room=room)
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
});
}
}
});
}
@Override
protected void onStop() {
super.onStop();
releaseMediaPlayer();
}
/**
* Clean up the media player by releasing its resources.
*/
private void releaseMediaPlayer() {
// If the media p... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.code : str = code
self.lines : list = code.split('\n')
self.keywords : list = keywords
self.result = None
self.fofError()
def fofError(self) -> None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
NativeArray<T> updated,
NativeArray<TrackableId> removed)
{
m_Added = added;
m_Updated = updated;
m_Removed = removed;
isCreated = true;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* shallowEqual({ a: "a" }, { a: "a" }); // true
* shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false
*/
export declare function shallowEqual(objA?: Record<any, any>, objB?: Record<any, any>): boolean;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
: base(logger, TimeSpan.FromHours(4), DefaultDelay)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fprintf(stderr, "\n##### Run eval on CPU device. #####\n");
MultiThreadsEvaluation(false);
#endif
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def main():
parser = argparse.ArgumentParser(
prog="concat_msa.py"
)
parser.add_argument(
"--msa",
type=str,
required=True,
nargs="*",
help="multiple sequence alignment to concatenate"
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export default (props?: Svg.SvgProps): React.ReactElement<Svg.SvgProps> => (
<Svg.Svg {...props} viewBox='0 0 24 24'>
<Svg.G data-name='Layer 2'>
<Svg.G data-name='color-palette'>
<Svg.Rect width='24' height='24' opacity='0' />
<Svg.Path d='M19.54 5.08A10.61 10.61 0 0 0 11.91 2a10 10 0 0 0-.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php // echo $form->field($model, 'brand') ?>
<?php // echo $form->field($model, 'variant_title') ?>
<?php // echo $form->field($model, 'vendor_code') ?>
<?php // echo $form->field($model, 'description') ?>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "com/sun/star/util/XMacroExpander.hpp"
#include "com/sun/star/util/XOfficeInstallationDirectories.hpp"
#include "comphelper/processfactory.hxx"
#include "cppuhelper/bootstrap.hxx"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = ['FLOORDIV', 'MOD']
from .base import NaryHead
class ModHead(NaryHead):
"""
ModHead represents module n-ary operation,
data is a n-tuple of expression operands.
"""
op_mth = '__mod__'
op_rmth = '__rmod__'
op_symbol = '%'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public function insert(\PDO $pdo){
try{
$query = "INSERT INTO location(locationZipCode, locationLatitude, locationLongitude) VALUES (:locationZipCode, :locationLatitude, :locationLongitude)";
$statement = $pdo->prepare($query);
$parameters = ["locationZipCode"=>$this->locationZipCode,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>cdc/src/__init__.py
from NoteDeid import *
from NoteConceptParser import *
from Converter import *
from D2v import *
from MLPipeline import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lambda im: torch.as_tensor(im, dtype=torch.float32),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
gold_key=$cwd/resources/scorers/SemEval-2015-task-13-v1.0/keys/gold_keys/EN/semeval-2015-task-13-en.key.nomw
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Movie(Base):
title = db.Column(db.String(256), nullable=False)
language = db.Column(db.String(8), default='en')
imdb_id = db.Column(db.String(10))
release_year = db.Column(db.Integer)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import logging
l = logging.getLogger("angr.procedures.libc.tolower")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
while let Some(e) = stack.pop() {
match *e {
Ast::Assertion(Assertion {
kind: AssertionKind::StartLine,
span,
}) => {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Batch option
low["batch"] = None
if self.client == "local_batch":
batch_index = None
for index, arg in enumerate(args):
if arg in ["-b", "--batch", "--batch-size"]:
low["batch"] = args[index + 1]
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
elif [ $choice = "Powersave" ]
then
alacritty -e bash -c 'sudo cpupower frequency-set -g powersave'
notify-send 'CPU governor changed to Powersave'
exit
fi | ise-uiuc/Magicoder-OSS-Instruct-75K |
'backlink querystring present WITH OTHER QUERYSTRING TOO',
),
)
def test_detail_page_get_context_handles_backlink_querystring_appropriately(
rf, domestic_homepage, domestic_site, user, querystring_to_add, expected_backlink_value, export_plan_data
):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
function recargarFrm()
{
$this->load->view('mantenimientos/preguntas/formulario');
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
*
* @author SE140018
*/
public class Validate {
private final static String CHECK_EMAIL = "^[[\\w_\\.+]*[\\w_\\.]\\@([\\w]+\\.)+[\\w]+[\\w]]{11,50}$";
private static final String USER_NAME_VALIDATE = "^[[([A-Z][a-z]*((\\s)))+[A-Z][a-z]][\\p{L}-]]{1,30}$";///checked
private static final String USER_PH... | ise-uiuc/Magicoder-OSS-Instruct-75K |
let r = cups[current]!
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@route('/')
def index():
return template('index')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .pdf_wrangling import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@ManyToOne(() => Review, (review) => review.likeReview, {
onDelete: 'CASCADE',
})
@JoinColumn()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private static Logger LOG;
private String leftFieldName;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
""" Embedding. """
sr, host_signal = wavfile.read(HOST_SIGNAL_FILE)
signal_len = len(host_signal)
# オリジナルの透かし信号を作成(0と1のビット列)
watermark_len = int(HALF_FLENGTH / FREQ_SLOT)
wmark_original = np.random.randint(2, size=int(watermark_len))
# オリジナルの透かし信号を保存
with open(WATERMARK_ORIGINAL_FILE,... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""Marshmallow fields."""
from .isodate import ISODateString
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.map(|(index, field)| {
let FieldAttr { clone_kind } = parse_field_attrs(&field.attrs)?;
let field_name = &field.ident;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.__prepare_logdir()
self._config["stages"]["stage_params"] = utils.merge_dicts(
deepcopy(
self._config["stages"].get("state_params", {})
), # saved for backward compatibility
deepcopy(self._config["stages"].get("stage_params", {})),
d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
sa.Column('is_deleted', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['dest_cal'], ['calendars.id'], ondelete='CASCADE'),
sa.ForeignKeyConstraint(['source_cal'], ['calendars.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('source_event', 'dest_event')
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>src/data/utils.py
import os
import errno
import requests
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'official_functions': ['icontains'],
'list_publications': ['icontains'],
# 'affiliation.city',
# 'affiliation.country',
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CustomLog(std::ostream &out, const std::string &filePath, const std::string &messageType) : output(out)
{
before = '[' + std::filesystem::path(filePath).filename().string() + "] " + messageType + '\t';
}
template <typename T>
std::ostream &operator<<(T other)
| 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.