seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
array([[ 2. , 2.828, 2. ],
[ 0. , 0. , 0. ]])
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('421', (575,0,59,66)),
('214', (433,0,70,64)),
('236', (505,0,70,64)),
('63214', (258,0,87,64)),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try:
with filesystem.try_lock(
os.path.join(
self._source_directory,
".pyre",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>SVDD/__init__.py
from .BaseSVDD import BaseSVDD | ise-uiuc/Magicoder-OSS-Instruct-75K |
if(os.path.exists('build/cocos2d-win32.vc2012.sln') == False):
node_name = os.environ['NODE_NAME']
source_dir = '../cocos-2dx-develop-base-repo/node/' + node_name
source_dir = source_dir.replace("/", os.sep)
os.system("xcopy " + source_dir + " . /E /Y /H")
os.system('git pull origin develop')
os.syste... | ise-uiuc/Magicoder-OSS-Instruct-75K |
depth(tree.getroot(), -1)
print(maxdepth)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'subject_exec',
'subject_start_date',
'subject_end_date',
'book_title',
'book_type',
'book_publish_company_name',
'book_publish_no',
'book_publish_date',
'book_role',
'book_write_count',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from unittest import TestCase
from icon_storage.util.cache_help import CacheHelp
from icon_storage.actions.store import Store
from icon_storage.actions.check_for_variable import CheckForVariable
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@register.filter
def is_bbb_mod(room, user):
return room.is_moderator(user)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def wait_1():
"""An dummy instruction method that takes a while to run."""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var cornerRadius: Lens<Whole, CGFloat> {
return Whole.lens.layer..Part.lens.cornerRadius
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
message=getattr(error, 'description', ''),
path=request.path), code
def common_exception_handler(error, debug):
req = json.dumps(merge_fields(request), indent=4)
current_app.logger.error(req, exc_info=True)
if debug:
print(req)
print(format_exc())
return jsonify(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <gtest/gtest.h>
extern "C"
{
#include "noerr.h"
}
TEST(NoErr, GetError)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[2,2],
[0,2],
[0,0],
[-2,0],
[0,-2],
[2,-2],
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if isinstance(formatter, str):
formatter = plugin_manager.find_export_plugin_by_format_type(formatter)
assert issubclass(formatter, ExportPlugin)
return formatter(self).format(**options)
def encode(data, quiet_zone=DEFAULT_QUIET_ZONE, version=DEFAULT_SYMBOL_SIZE):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/*
* MIT License
*
* Copyright (c) 2020 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
pub mod common_tests;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#modifies a firebase variable
def patch_firebase(field,value): #Depends on: load_state_main(),'requests','json'; Modifies: database['field'], state variables
data = json.dumps({field: value})
url = "https://oasis-1757f.firebaseio.com/"+str(access_config["local_id"])+"/"+str(access_config["device_name"])+".json... | ise-uiuc/Magicoder-OSS-Instruct-75K |
);
});
it("should throw if word cannot be found in text", () => {
//GIVEN
const searchText = "foo";
const altoXml = mockAltoXml(`
<ComposedBlock ID="cblock_0" >
<TextBlock ID="block_0">
<TextLine ID="block_0" HPOS="39" VPOS="5" WIDTH="400" HEIGHT="16"... | ise-uiuc/Magicoder-OSS-Instruct-75K |
plt.grid()
plt.legend()
plt.title('Modelo SIR'+'\n'+r'$\beta$='+f'{b}'+r' | $\gamma$='+f'{g} | '+r'$I_{0}=$'+f'{i0}'+r' | $S_{0}=$'+f'{s0}')
plt.savefig('SIR4.png')
#plt.show()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert r.status_code == 200
content = self.get_content(r)
assert isinstance(content, list)
assert len(content) == 1
assert content[0]["key"] == "test"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import ctypes
_EXTENSION_NAME = 'GL_NV_geometry_program4'
def _f( function ):
return _p.createFuncti... | ise-uiuc/Magicoder-OSS-Instruct-75K |
lamda = 1
mu = 2
cp = 3
cs = 4
| ise-uiuc/Magicoder-OSS-Instruct-75K |
continue
# do not update
elif language in COMMON_LANGUAGES:
# update
if verbose:
print(f"{extension}: UPDATE {old_language} -> {language} (Common)")
else:
# neither... | ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "Version argument required"
exit
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert retval.count() == 3
for i, exp in enumerate(retval):
assert exp.description == f'Item {i+2}'
def test_search_by_amount_cond(db_with_expense_amounts):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
url(r'^announcements/all/$', views.all_announcements_view, name='all_announcements'),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use Illuminate\Http\Request;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// Copyright © 2019 An Tran. All rights reserved.
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
extension UINavigationItem {
func localizedTitle(_ text: String, comment: String? = nil) {
title = Localizable(text, comment: comment)
}
}
extension UITabBarItem {
func localizedTitle(_ text: String, comment: String? = nil) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@IBOutlet weak var collectionView: UICollectionView!
override func viewDidLoad() {
super.viewDidLoad()
collectionView.dataSource = self
// Do any additional setup after loading the view.
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
).encode()
hash_test = hashlib.sha256(block_json).hexdigest()
assert len(hash_test) == 64
assert isinstance(
hash_test,
type(bc.hachage(some_blocks))
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# @ingroup Input_Output
from .save import save | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.tracker = cv2.MultiTracker_create()
self.bounding_boxes = bounding_boxes
for bounding_box in bounding_boxes:
self.tracker.add(OPENCV_OBJECT_TRACKERS[tracker_type](), frame, bounding_box.tracker_format)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public void setSatWritingAvg(int satWritingAvg)
{
this.satWritingAvg = satWritingAvg;
}
public int getSatMathAvg()
{
return satMathAvg;
}
public void setSatMathAvg(int satMathAvg)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* Copyright (C), 2015-2019, 风尘博客
* 公众号 : 风尘博客
* FileName: SimpleFactoryMode
*
* @author: Van
* Date: 2019-11-20 23:25
* Description: 简单工厂
* Version: V1.0
*/
public class SimpleFactoryMode {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"ajax": '{!!route('adminsion.ins.datos')!!}?tipo={{$tipo}}',
"language":{"url":'{!! asset('/plantilla/js/latino.json') !!}'},
"order": [[ 0, "asc" ]],
"columns" : [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public static String coluna(int n, String c, String d) {
String saida = "";
for(int i = 1; i <= n; i++) {
saida += (i == 1 || i == 39)? c: d;
}
return saida;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@property
@abstractmethod
def tests(self) -> TestSource:
"""Returns the tests for the architecture."""
pass
@property
def declarations(self) -> Declarations:
"""Returns an iterator over all non-instruction declarations for the architecture."""
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
guest_coords = ctxt.get_x_t()[len(solvated_host_coords) :] * 10
report.write_frame(
host_coords,
solvated_host_mol,
guest_coords,
guest_mol,
guest_name,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>starling_sim/basemodel/agent/stations/__init__.py<gh_stars>10-100
"""
This package contains the modules related to station agents
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CollisionError(String, String),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
#[doc(hidden)]
pub type DescribeApplicationInputOperationOutputAlias = crate::operation::DescribeApplication;
#[doc(hidden)]
pub type DescribeApplicationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeApplicationInput {
/// Consumes the builder and constructs an Operation<[`DescribeApplicat... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public class Task {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Event(models.Model):
title = models.CharField(verbose_name="事件名", max_length=64)
time = models.DateField(verbose_name="事件执行日期")
finished = models.BooleanField(verbose_name="是否完成", default=False)
creator = models.ForeignKey(User, on_delete=models.CASCADE, related_name="events", related_query_name... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# application
import application | ise-uiuc/Magicoder-OSS-Instruct-75K |
GUI_IP=$(/usr/bin/docker inspect --format='{{.NetworkSettings.IPAddress}}' son-gui)
BSS_IP=$(/usr/bin/docker inspect --format='{{.NetworkSettings.IPAddress}}' son-bss)
GTK_IP=$(/usr/bin/docker inspect --format='{{.NetworkSettings.IPAddress}}' son-gtkapi)
# Docker containers full public access
iptables -I PRE_DOCKER -i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
return errors.ToReadOnlyCollection<Exception>();
}
}
public string Message
{
get { return _exception.Message; }
}
public ReadOnlyCollection<Exception> RootCauses
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@app.route('/', methods=['POST', 'GET', 'HEAD'])#'POST'
def home():
return 'POG! U looking for me? I\'m right there! Online and running, everything is working smoothly! :-)'
run_time = time.time()
def run():
app.run(host='0.0.0.0')
| 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 the ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(String html) {
if (html == null) {
throw new NullPointerException("html is null");
}
this.html = html;
}
/**
* {@inheritDoc}
*/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
setValue(trim ? e.target.value.trim() : e.target.value)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def add_arguments(self, parser):
parser.add_argument(
'-p', '--port',
help=f'client-plugin connection port.',
metavar='port',
default='5431',
)
parser.add_argument(
'-t', '--token',
help=f'client-plugin connection token... | ise-uiuc/Magicoder-OSS-Instruct-75K |
serve(api-v1, listen='*:8080')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for index, row in statute_df.iterrows():
example = row.Content
print(example)
try:
annotator = StanfordAnnotator(RESOURCES_DIR)
dfs = annotator.annotate(example)
output_df = pd.DataFrame()
for df in dfs:
output_df = output_df.append(df)
if output_df.empty... | ise-uiuc/Magicoder-OSS-Instruct-75K |
case .badResponse(_, _, let rsp):
return rsp as! Foundation.HTTPURLResponse
case .stringEncoding(_, _, let rsp):
return rsp as! Foundation.HTTPURLResponse
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class EmotionsViewController: UIViewController {
private let emotionalFaces: Dictionary <String, FacialExpression> = [
"angry": FacialExpression(eyes: .Open, eyeBrows: .Relaxed, mouth: .Neutral),
"happy": FacialExpression(eyes: .Closed, eyeBrows: .Relaxed, mouth: .Smile),
"worried": F... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>PythonStudy/BasicStudy/Chapter_3/Homework/homework3.1~3.3.py
| ise-uiuc/Magicoder-OSS-Instruct-75K |
s += [f'momentum={momentum}']
if not self.batchnorm.affine:
s += [f'affine=False']
if not self.batchnorm.track_running_stats:
s += [f'track_running_stats=False']
s = ', '.join(s)
return f'BatchNorm({s})'
__repr__ = __str__
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#if not does_model_exist(name, version):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this->dump();
}
}else if (c != '\'') throw crl::SyntaxError(line, column, "Invalid char: " + this->current_token.str);
else this->dump();
}
break;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
npm run typeorm -- schema:drop
npm run typeorm -- migration:run
| ise-uiuc/Magicoder-OSS-Instruct-75K |
InitiateVaultLockResult::InitiateVaultLockResult()
{
}
InitiateVaultLockResult::InitiateVaultLockResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class LBFGSMinimizer(LBFGSMinimizerNative, Minimizer):
"""
The LBFGSMinimizer class.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'''
Create a salt alert server instance
'''
opts['publish_port'] = None # HACK to trick salt.master.ClearFuncs
salt.master.SMaster.__init__(self, opts)
def start(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
return this.cardCollection.size();
}
public abstract void shuffle();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# COMMAND ----------
G<KEY>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$this->assertFalse($this->guard->contentTypeIsValid($invalidContentType));
$this->assertFalse($this->guard->contentTypeIsValid($invalidContentTypeWithParameters));
}
public function testCanTellCorrectContentTypeWithData()
{
$validContentType = 'application/vnd.api+json';
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# apply-cluster.sh applies the k8s cluster configuration to the currently
# configured cluster. This script may be safely run multiple times to load the
# most recent configurations.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
install() {
inst_multiple veritysetup e2size systemd-escape tr
inst_simple "$moddir/verity-generator" \
"$systemdutildir/system-generators/verity-generator"
# Device units default to a finite JobRunningTimeout, which would cause
# dev-mapper-usr.device to fail if its dependencies took too long... | ise-uiuc/Magicoder-OSS-Instruct-75K |
send_on = content_property()
resources = content_property()
class ResourceRecipientCollection(GenericRecipientCollection):
def __init__(self, session):
super().__init__(session, type='resource')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
neotoma_joined_df = nl.grouped_coords_df(neotoma)
return nlp_sentences, bibliography, neotoma, neotoma_joined_df
A = {'_gddid' : [['ABC'], ['DEF']],
'States' : [['Oklahoma'], ['Wisconsin']]}
B = {'_gddid' : [['ABC'], ['DEF']],
'doi': [['Hello'], ['Happy']]}
C = {'doi' : [['Hello'], ['Happy']]... | ise-uiuc/Magicoder-OSS-Instruct-75K |
AI_LOG_FN_EXIT();
return refCountFile;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def custom_title_filter(title):
class CustomTitledFilter(FieldListFilter):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name,
model_ws=model_ws,
control_file=control_file,
load_only=mf_load_only,
forgive=forgive,
)
def write_input(self, basename=None, workspace=None, write_only=None):
"""
Write input files for gsflow. Four cases are possible:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# give a chance (3s) to the event to be consumed and logs flushed
time.sleep(3)
for node_name, _ in self.cluster.nodes.items():
self.assert_in_file(
node_name,
'cluster_consul_1',
'/deploy/handler.log',
"Unknown event na... | ise-uiuc/Magicoder-OSS-Instruct-75K |
write_f.write(question.lower().replace("?"," ?")+"\n")
if __name__ == "__main__":
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "Test_impl.h"
void Server_impl::shutdown ()
{
this->orb_->shutdown (0);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_flatten_json(self, mock_inst, mock_disconn, mock_cmds, mock_date):
"""Function: test_flatten_json
Description: Test option to flatten JSON data structure.
Arguments:
"""
mock_cmds.return_value = self.results
mock_inst.return_value = self.server
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# set -u : Exit the script when using uninitialised variable.
set -eu
# Add libraries
source /usr/local/lib/bash-logger.sh
source /usr/local/lib/persist-env.sh
#
NOTICE " *** This is a simple echo from /etc/runit/init.d"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
end_time = time.time()
t = end_time - start_time
print(t)
point.set_data(t, t)
plt.pause(1e-10) | ise-uiuc/Magicoder-OSS-Instruct-75K |
public struct ParserResponse {
let streamURL: String
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
skip = 0
start = 0
for r in range(64):
for l in lengths:
circular = np.roll(circular,-start)
circular[:l]=circular[:l][::-1]
circular = np.roll(circular,+start)
start = (start + l + skip)%len(circular)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
xList.append(float(x))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export * from './use-check-is-fullscreen';
export * from './use-handle-outside-click';
export * from './use-check-is-mobile';
export * from './use-selector';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* Convert the URL window into Bootstrap HTML.
*
* @return string
*/
public function render()
{
if ($this->hasPages())
{
return sprintf(
'<ul class="pager">%s %s</ul>',
$this->getPreviousButton(),
$this->getNextButton()
);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Results:
def __init__(self):
self.results = []
self.hit_goal = 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.warper = warper;
}
public void MakeWarperAppear () {
if (warper) warper.Appear();
else Debug.LogWarning("No Warper registered.");
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
world = np.zeros((height_px, width_px), dtype=np.uint8)
for x, y in arr:
px = int(SCALE*(x - min_x)/1000.0) + BORDER_PX
py = int(SCALE*(y - min_y)/1000.0) + BORDER_PX
world[height_px - py - 1, px] = 255
for name, x, y, z in artf:
px = int(SCALE*(x - min_x)/1000.0) + BORDER_PX... | ise-uiuc/Magicoder-OSS-Instruct-75K |
export interface IQueueSetupRunner {
Queue: Queue<any, any, string>;
Worker: Worker<any, void, string>;
QUEUE_NAME: string;
InitQueues?: () => void;
RegisterQueues?: () => void;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try:
return os.path.realpath(dyld_find(dylib))
except ValueError:
pass
raise ValueError('%s not found' % (name,))
class MachOTest(unittest.TestCase):
@unittest.skipUnless(sys.platform == 'darwin', 'OSX-specific test')
def test_find(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""Set the list of features
:type features: list[str]
:param features: List of features names (when extracted from the data)
"""
self._features = features
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""Sharpening an image: Blur and then subtract from original"""
blurred = filters.gaussian(image, sigma=10, multichannel=True)
sharper = np.clip(image * a - blurred * b, 0, 1.0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertEqual(self.handler.log_to_client_output.count('var\n'), 0)
self.assertEqual(self.handler.log_to_client_output.count('etc\n'), 0)
self.assertEqual(self.handler.log_to_client_output.count('sbin\n'), 0)
self.handler.log_to_client_output = ''
self.run_command('test --recr... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
return super.onOptionsItemSelected(item);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
#define GT_Rendering_TextureCube_OpenGL21
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Function PlayerPawnTest_Male.PlayerPawnTest_Male_C.ExecuteUbergraph_PlayerPawnTest_Male
// ()
// Parameters:
// int EntryPoint (Parm, ZeroConstructor, IsPlainOldData)
void APlayerPawnTest_Male_C::ExecuteUbergraph_PlayerPawnTest_Male(int EntryPoint)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
)
def test_get_path(path, expected_status, expected_response):
response = client.get(path)
assert response.status_code == expected_status
assert response.json() == expected_response
| ise-uiuc/Magicoder-OSS-Instruct-75K |
break;
case IOCTL_KTLTEST_METHOD_VECTOR_TEST:
if (!test_vector())
status = STATUS_FAIL_CHECK;
break;
case IOCTL_KTLTEST_METHOD_STRING_TEST:
if (!test_unicode_string())
status = STATUS_FAIL_CHECK;
break;
case IOCTL_KTLTEST_METHOD_STRING_VIEW_TES... | 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.