seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
if (writer is null)
{
throw new ArgumentNullException(nameof(writer));
}
BoundNode.Print(writer, this);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (!father) throw new Error('Father not found!');
const child = this.childRepo.create({ father, name });
return this.childRepo.save(child);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return self._label_key
@property
def weight_key(self):
return self._weight_key
@property
def metric_fn(self):
return self._metric_fn
| ise-uiuc/Magicoder-OSS-Instruct-75K |
. tools/shell_utils.sh
set -e
| ise-uiuc/Magicoder-OSS-Instruct-75K |
struct PairOfPointsWithDistance;
PairOfPointsWithDistance FindClosestPairPointsInSubarray(
const vector<Point>& points, int s, int e);
PairOfPointsWithDistance SolveByEnumerateAllPairs(const vector<Point>& points,
int s, int e);
PairOfPointsWithDistance FindClosestPairInRemain(vector<Point>* points,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
subprocess.check_call([conda, "install", package])
return prefix
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
_FortressOfSolitude URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
str_i = str(i)
sum = 0
for j in range(len(str_i)):
sum += int(str_i[j])
if a <= sum <= b:
ans +=i
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (array.Length > 0)
{
WriteAll(array);
_lineLogger.LogLine($"Keyboard events sent to agent ({array.Length} items).");
}
else
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import logging
from collections import defaultdict
from langid.langid import LanguageIdentifier, model
# https://github.com/saffsd/langid.py
from aleph.core import language_whitelist
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
rangeAxisSubsets.append(RangeAxisSubsetDescriptor(name=axis.name))
valueCombinations = itertools.product(*[axis.values for axis in discreteAxes])
for values in valueCombinations:
basename = None
if self.filename is not None:
basen... | ise-uiuc/Magicoder-OSS-Instruct-75K |
apache2-foreground
| ise-uiuc/Magicoder-OSS-Instruct-75K |
DEFAULT_CAMERA = os.environ.get('JETBOT_DEFAULT_CAMERA', 'opencv_gst_camera')
if DEFAULT_CAMERA == 'zmq_camera':
from .zmq_camera import ZmqCamera
Camera = ZmqCamera
else:
from .opencv_gst_camera import OpenCvGstCamera
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def mapper_function(value):
query = templatize_sql(value[0])
execution_time = float(value[1]) / 1000000
return (query, execution_time)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
cur += int(l[1])
if int(l[1]) !=0:
out.write(str(cur)+'\n')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Args:
p (float): probability of applying the augmentation
"""
def __init__(self, p=0.5):
super(Rotate, self).__init__(p=p)
self.image_interpolation = cv2.INTER_LINEAR
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bash scripts/remote_exec_api.sh test_output_dir.sh $@
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with open(path) as file:
result = file.read()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ctx (Context): Context corresponding to the error's invocation
error (commands.CommandError): The error raised
"""
if not isinstance(error, Errors.IGNORED_ERRORS) and ctx.command:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
--file openflights/import_json/airports.json \
--numInsertionWorkers 1 \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { FindOneOptions } from 'typeorm';
import { AxsArgs, AxArgs } from '@leaa/common/src/dtos/ax';
import { Ax } from '@leaa/common/src/entrys';
export type IAxsArgs = AxsArgs & FindOneOptions<Ax>;
export type IAxArgs = AxArgs & FindOneOptions<Ax>;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.thread_num = thread_num
self.queue = Queue(queue_size)
self.file_size = self._content_length()
self.position = 0 # 当前的字节偏移量
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Predict testing data using trained model
pred_y = trained_model.predict(test_X, batch_size=128)
print("\nGetting performance metrics...")
# Get performance metrics
get_performance_metrics(test_y, pred_y, test_df, TASK, "text")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def concat(parameters, sep):
text = ''
for i in range(len(parameters)):
text += str(parameters[i])
if i != len(parameters) - 1:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
urllib.parse.unquote_plus(filename))
@app.route('/')
def serve_index():
return send_from_directory('assets', 'index.html')
@app.route('/<filename>', defaults={'filename': 'index.html'})
def serve_assets(filename):
return send_from_directory('assets', filename)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="hf-password" class=" form-control-label">Mô Tả Ngắn</label>
</div>
<div class="col-12 col-md-9">
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
reply(POSTAndHardwareTests::VBlankOK() ? sOK : sKO);
}
}
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
worker.daemon = True
worker.start()
# Put the tasks into the queue as a tuple
for i in range(1, n):
logger.info('Queueing {}'.format(i))
queue.put((video_obj_arr[i-1], txnId))
# Causes the main thread to wait for the queue to finish processing all the tasks
| ise-uiuc/Magicoder-OSS-Instruct-75K |
STDMETHODIMP CDurationTool::GetClassID(CLSID* pClassID)
{
if (pClassID)
{
*pClassID = CLSID_DirectMusicDurationTool;
return S_OK;
}
return E_POINTER;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>leetcode/0234 Palindrome Linked List.py<gh_stars>1-10
# Definition for singly-linked list.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name='ws',
entry_points={
'console_scripts': [
'pyws = ws.server:main'
]
},
packages=find_packages(exclude=('conf.d',)),
tests_require=['openpyxl']
) | ise-uiuc/Magicoder-OSS-Instruct-75K |
import itertools
"""Extend Peewee basic types."""
class EnumField(Field):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sources=['py_wrapper.pyx',
'../src/ProblemParser.cc',
'../src/MinSqTree.cc',
'../src/newick.cc',
],
language='c++',
)
setup(
name="tree_collection",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>backend/core/views.py
import datetime
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.left = None
self.right = None
def sizeTree(node):
if node is None:
return 0
else:
return (sizeTree(node.left) + 1 + sizeTree(node.right))
# Driver program to test above function
root = Node(1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class HostFormValidator {
public class func validateHostname(name hostname: String) -> String? {
let trimmed = hostname.trimmingCharacters(in: .whitespacesAndNewlines)
if trimmed.contains("://") {
return nil
}
return URL(string: trimmed) != nil ? trimmed : nil
| ise-uiuc/Magicoder-OSS-Instruct-75K |
FORMAT = '%(asctime)-15s %(message)s'
logging.basicConfig(filename='log.txt', filemode='w',
datefmt='%Y-%m-%d %H:%M:%S',
level=logging.INFO, format=FORMAT)
console = logging.StreamHandler()
console.setLevel(logging.INFO)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace App;
use Illuminate\Database\Eloquent\Model;
class ReportInternationalPrice extends Model
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using namespace klk;
using namespace klk::fw;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* You may obtain a copy of the License at
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
board_print(&board);
else if (strncmp(command, "bk", 2) == 0)
bk_tests();
else if (strncmp(command, "q", 1) == 0)
return 0;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# initialization of the database and migration
database = SQLAlchemy()
migrate = Migrate()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
src_dir = 'test2017/'
dst_dir = 'total_bg/'
image_list = os.listdir(src_dir)
target_cnt = 6000
image_items = random.sample(image_list, target_cnt)
for image_item in image_items:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
Page = DefaultTestPageFilename;
Browser = DefaultBrand;
RunId = Guid.NewGuid().ToString();
Timeout = DateTime.MaxValue;
Properties = new Dictionary<string, string>();
LocalPath = Environment.CurrentDirectory;
Log = Path... | ise-uiuc/Magicoder-OSS-Instruct-75K |
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2018, 1, 1),
'email': ['<EMAIL>'],
'email_on_failure': False,
'email_on_retry': False
}
dag = DAG(
'example_valohai_dag',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'Logout' => 'Выйти',
'Admin' => 'Админ',
'status' => 'статус',
'role' => 'роль',
'Your' => 'Ваш',
//
'Categories' => 'Категории',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif compression == "bz2":
if is_path:
return bz2.BZ2File(filepath_or_buffer, mode)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def draw(self):
imgui.begin("Rectangle")
draw_list = imgui.get_window_draw_list()
p1 = self.rel(20, 35)
p2 = self.rel(90, 80)
draw_list.add_rect(*p1, *p2, imgui.get_color_u32_rgba(1,1,0,1), thickness=3)
p1 = self.rel(110, 35)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@property
def last_modified(self):
"""Get last modified date for the response."""
max_age = datetime.utcnow() - timedelta(days=7)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
XCTMain([
testCase(INIParserTests.allTests),
])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.test_dataset_id_array = list(set(self.test_dataset_id_array) - set(select_ids))
select_sql = "SELECT * FROM TestDataset WHERE ID IN " + str(tuple(select_ids))
self.CASIA_test_sqlite_cursor.execute(select_sql)
select_data = self.CASIA_test_sqlite_cursor.fetchall()
feature_bat... | ise-uiuc/Magicoder-OSS-Instruct-75K |
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.inner.poll_ready(cx)
}
#[inline]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# params = ucurve_fit(reg_cubic, x, y) # kubischer Fit
# a, b = params
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public static class XmlDocumentExtension
{
/// <summary>
/// Outputs a string equivalent to the xml document
/// </summary>
/// <param name="item">XmlDocument to output</param>
/// <returns>XML document serialized as a string</returns>
[SuppressMessage("Microsoft.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
timer.singleShot(100, lambda: QtGui.QApplication.quit())
filename = dialogs.open_file_dialog()
assert filename is None
@skipif(not has_qt)
def test_save_file_dialog():
utils.init_qtapp()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
(header, payload)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
int value = static_cast<int>(frame_texture_type);
if (value >= 0)
{
return GL_TEXTURE_CUBE_MAP_POSITIVE_X + value;
}
return GL_TEXTURE_2D;
}
} // End namespace sgl.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def create_tables():
"""Create tables in database."""
RiskType.createTable()
Field.createTable()
FieldType.createTable()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
t = get_template("customadmin/partials/list_basic_actions.html")
# ctx.update({"obj": obj})
# print(ctx)
return t.render({"o": obj})
def filter_queryset(self, qs):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
root_vol_uuid = vm.vm.rootVolumeUuid
ps = test_lib.lib_get_primary_storage_by_uuid(vm.get_vm().allVolumes[0].primaryStorageUuid)
if ps.type != inventory.LOCAL_STORAGE_TYPE:
test_util.test_skip('Skip test on non-localstorage')
snapshots = test_obj_dict.get_volume_snapshot(root_vol_uuid)
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo Stopping app in namespace $APP_NAMESPACE
$ADB -s $ADB_DEVICE shell am force-stop $APP_NAMESPACE
echo Executing application in namespace $APP_NAMESPACE and activity $APP_NAMESPACE/$APP_ACTIVITY
$ADB -s $ADB_DEVICE shell am start -n $APP_NAMESPACE/$APP_ACTIVITY
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sample_indices = np.array([0, 2, 3], dtype=np.uint32)
hist = np.zeros((1, 3), dtype=HISTOGRAM_DTYPE)
build_func(0, sample_indices, binned_feature, ordered_gradients,
ordered_hessians, hist)
hist = hist[0]
assert_array_equal(hist['count'], [2, 1, 0])
assert_allclose(hist['sum_gradi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
mkdir toto
mkdir titi
cat */*
rm toto titi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set -e
rm edge.zip
zip -r edge.zip src test demo extraParams.hxml haxelib.json LICENSE README.md -x "*/\.*"
haxelib submit edge.zip
| ise-uiuc/Magicoder-OSS-Instruct-75K |
install_requires=[],
#tests_require=tests_require,
#test_suite="setup.test_suite",
platforms=['Raspberry Pi', 'Linux'],
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=['Development Status :: 2 - Pre-Alpha',
'Programming Language :: Python :: 3',
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public void AddData(string key, object value)
{
_data.Add(key, value);
}
public bool DataExists(string key)
{
return _data.ContainsKey(key);
}
public T GetData<T>(string key)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from model.registry import Registry
def main():
user = User()
registry = Registry()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for (int i = 1; i < n; i++)
{
dp[i][0] = max(0, dp[i - 1][0]) + a[i];
dp[i][1] = max(dp[i - 1][1] + a[i], dp[i - 1][0]);
answer = max(max(dp[i][0],dp[i][1]), answer);
}
cout << answer;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super(PT, self).__init__()
self.add_field('LON', 's', 15, value)
self.add_field('LAT', 's', 15, value)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
package org.netlib.lapack;
public final class Ieeeck {
public static int ieeeck(int i, float f, float f1) {
return 1;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo Downloading and updating big-endian files...
mkdir $TMP_DIR/be
cd $TMP_DIR/be
curl -OLs $BASE_URL/be/metaZones.res
curl -OLs $BASE_URL/be/timezoneTypes.res
curl -OLs $BASE_URL/be/windowsZones.res
| ise-uiuc/Magicoder-OSS-Instruct-75K |
parser = argparse.ArgumentParser(
description=
'Create a flat list of files included in the images. This is used to inform infrastructure what files to upload'
)
parser.add_argument(
'--product-config', type=argparse.FileType('r'), required=True)
parser.add_argument(
'--b... | ise-uiuc/Magicoder-OSS-Instruct-75K |
gmailUser = login[0]
gmailPassword = login[1]
recipient = login[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
util_logger = logging.getLogger(f'{__name__}.utils')
util_logger.setLevel(logging.ERROR)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let t1 = ResolvedTarget(name: "t1")
let t2 = ResolvedTarget(name: "t2", deps: t1)
let t3 = ResolvedTarget(name: "t3", deps: t2, t1)
let t4 = ResolvedTarget(name: "t4", deps: t1, t2, t3)
XCTAssertEqual(t4.recursiveDeps, [t3, t2, t1])
XCTAssertEqual... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}, [value, si, bitLength, maxValue]);
useEffect((): void => {
onChange && onChange(valueBn);
}, [valueBn]);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
obs = venv.reset()
while True:
action, _states = model.predict(obs, deterministic=True)
obs, reward, done, info = venv.step(action)
venv.render()
if done:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
case SequenceObjectContext::TS_DoNotTranslate:
doNotTranslateAction->setChecked(true);
sl_doNotTranslate();
break;
case SequenceObjectContext::TS_AnnotationsOrSelection:
translateAnnotationsOrSelectionAction->setChecked(true);
sl_translateAnnotationsOrSelection();
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/** Load composer libraries. */
require_once __DIR__ . '/../vendor/autoload.php';
/** Aliases. */
use SettingsAsWoocommerce\Submenu;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if( $startPage != 0 )
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
help="Compression codec: zstd for ’, ‘blosclz’, ‘lz4’, ‘lz4hc’, ‘zlib’ or ‘snappy’ ",
show_default=True,
)
@click.option("--clevel", "-l", type=int, default=DEFAULT_CLEVEL, help="Compression level", show_default=True)
@click.option("--overwrite", "-w", is_flag=True, help="Forces overwrite of target", show_defau... | ise-uiuc/Magicoder-OSS-Instruct-75K |
ds,
batch_size=batch_size,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div className='flex justify-content-end'>
<button className='btn btn-primary btn-sm float-right'>Submit</button>
</div>
</form>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const connections: ConnectOptions[] = angular.fromJson(localStorage[connectionSettingsKey]);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
./bin/task_21 --val -x 122 -y 79 -s 57 -t -5
./bin/task_21 --val -x 217 -y 196 -s 39 -t 0
./bin/task_21 --val -x 101 -y 153 -s 71 -t 4
echo "Multi cell tests"
./bin/task_21 -x 33 -y 45 -s 18 -t 29
./bin/task_21 -x 21 -y 61 -s 42 -t 30
echo "Global maximizing tests"
./bin/task_21 -s 18 -t 29
./bin/task_21 -s 42 -t 30
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
self.lblmsgDeploy["text"] = ""
## Inicia com diretorio configurado como DEFAULT no arquivo condig.ini
| ise-uiuc/Magicoder-OSS-Instruct-75K |
NumberTooLarge = 1,
NumberTooSmall = 2,
ValidButNegativeNumber = 3,
Valid = 4,
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
d_expand_end = 0.020
d_expand = np.arange(d_expand_start,d_expand_end,delta_d)
num_expand = d_expand.shape[0]
print('[*]',num_expand)
slope = (force_normal[num_data-1] - force_normal[num_data-301])/(displacement[num_data-1]-displacement[num_data-301])
sd... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
from PyInstaller.utils.hooks import collect_data_files
# Need to include modules in PyQt5.uic.widget-plugins, so they can be
# dynamically loaded by uic. They... | ise-uiuc/Magicoder-OSS-Instruct-75K |
CENTRALIZED = True
EXAMPLE_PAIR = "ZRX-ETH"
DEFAULT_FEES = [0.25, 0.25]
KEYS = {
"bittrex_api_key":
ConfigVar(key="bittrex_api_key",
prompt="Enter your Bittrex API key >>> ",
required_if=using_exchange("bittrex"),
is_secure=True,
is_... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
void print(int&& t) //右值版本
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import model
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from resilient_circuits import StatusMessage, FunctionResult, FunctionError
from resilient_lib import ResultPayload, readable_datetime
from resilient_lib.components.resilient_common import validate_fields
# The lowest priority an ICD ticket can have as a default setting for escalation
MIN_PRIORITY_ICD = 4
class Funct... | ise-uiuc/Magicoder-OSS-Instruct-75K |
* @public
* @method setVersion
* @param {number} version
* @returns {Encoder}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
res[stack.pop()] = n
stack.append(i)
return res
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
setActivity(presenceData?: PresenceData): void;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import static java.util.Arrays.asList;
import static ngoy.core.dom.XDom.parseHtml;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import jodd.jerry.Jerry;
import jodd.lagarto.dom.Node;
import jodd.lagarto.dom.Node.NodeType;
public class XDomTest {
@Test
public void cla... | ise-uiuc/Magicoder-OSS-Instruct-75K |
is_success = graphene.Boolean()
message = graphene.String()
@staticmethod
def mutate(root, info, **kwargs):
try:
new_user = User(**kwargs)
new_user.save()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::cout << XPlatform::Syscall::StringCompareIgnoreCase("aBcDeF", "AbCdEf")
<< std::endl;
std::cout << XPlatform::Syscall::StringCompareIgnoreCase("", "") << std::endl;
std::cout << XPlatform::Syscall::StringCompareIgnoreCase("12345", "abcde")
<< std::endl;
return 0;
}
| 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.