seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
setRotationAngle(upper_wall_1_r1, 0, 0, -0.1107F);
upper_wall_1_r1.texOffs(194, 49).addBox(-2, -19, -36, 2, 19, 54, 0, true);
seat_end_1 = new ModelMapper(modelDataWrapper);
seat_end_1.setPos(0, 0, 0);
end.addChild(seat_end_1);
seat_end_1.texOffs(116, 178).addBox(11, -6, -24, 7, 1, 40, 0, false);
seat_back_1_c1141a_r1 = new ModelMapper(modelDataWrapper);
seat_back_1_c1141a_r1.setPos(18, -6.5F, 0);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
iptables -t filter -A OUTPUT -p tcp --tcp-flags ALL SYN -j DROP
iptables -t filter -A OUTPUT -p upd -j DROP
/usr/bin/tail -f /dev/null | ise-uiuc/Magicoder-OSS-Instruct-75K |
heroku container:push web --app innsyn
heroku container:release web --app innsyn
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn from_str_radix(x: &str, radix: u32) -> Result<Self, FromStrRadixError>;
}
impl<T: FromStrRadixInternal + Copy> FromStrRadix for T {
fn from_str_radix(x: &str, radix: u32) -> Result<Self, FromStrRadixError> {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# Connects to SlideRule server at provided url and prints log messages
# generated on server to local terminal
#
import sys
import logging
from sliderule import sliderule
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cursor.execute(sql)
finally:
connection.close()
def updateCart():
print("-----Enter the name of the user who's cart you will modify.-----")
firstName = input("Enter student's first name: ")
lastName = input("Enter student's last name: ")
cartOptions = (
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sudo apt install nasm
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="<NAME>">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Ashabul Kahfi Admin</title>
<!-- Fontfaces CSS-->
<link href="{{ asset('admins/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admins/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
scribble --markdown --dest-name README.md scribblings/research-papers.scrbl
scribble --html --dest html --dest-name index.html scribblings/research-papers.scrbl
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# ***** END LICENSE BLOCK *****
| ise-uiuc/Magicoder-OSS-Instruct-75K |
flagFrameForEvent.removeAll()
attributesForEvent.removeAll()
layersForYear.removeAll()
tailHeightForYear.removeAll()
let diagram = TailDiagram()
// Fill tail diagram with school events
for year in (source.firstYear...source.lastYear + TimelineDecadeFlagLayout.infiniteScrollBuffer) {
if let events = source.eventsForYear[year] {
for event in events {
if let endDate = event.dates.endDate {
let start = position(for: event.dates.startDate, in: source)
let end = position(for: endDate, in: source)
let line = Line(event: event, start: start, end: end)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
train_data,
val_data=val_data,
hyperparameters=hyperparameters,
hyperparameter_tune=hyperparameter_tune,
time_limit=time_limit,
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pass
akey = '<KEY>'
# the "Identifier" you used when creating the part
partIds = ['b9m9h', 'MxUat', '8ATm3']
# used to generate readable run-time information for students
partFriendlyNames = ['Single Failure', 'Multiple Failure', 'Message Drop Single Failure']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@property
def learningModel(self):
return self._learningModel
@property
def doLearning(self):
return self._doLearning
def __initExtensions__(self):
def bibRead(filename):
with open(filename, 'r') as f:
try:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
(static_cast<U64>(std::rand() & 0xf) << 60));
}
bitboard rand64_fewbits() { return rand64() & rand64() & rand64(); } | ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LibSanBag.FileResources;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int getType() {
return Employee.SALESMAN;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//gets matrix size from first line
int size = int.Parse(stringMatrix[0]);
//creates an int matrix of size [size, size]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__version__= "0.0.1"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
)
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return out;
}
std::string Tree::GetFullPath(const std::string &child) const
{
if (_full_path.empty()) {
return child;
} else {
return _full_path + "." + child;
}
}
void Tree::Clear()
{
_key.clear();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import numpy as np
from core import G
import getpath
import log
from collections import OrderedDict
import makehuman
import material
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// for more information.
pub fn mix_columns(block: &mut Block) {
if_intrinsics_available! {
intrinsics::mix_columns(block)
}
soft::mix_columns(block);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
threadArgs.currentThread = thread.get();
thread->start();
}
void StartedThread::run() {
threadArgs.func(threadArgs);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],},
package_data={'mydocstring': ['templates/google_docstring.md']},
zip_safe=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>jwilk-forks/python-grammar-changes
{i for i in range(3)}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
report.writerow(["#", "", "Импорт данных в Drebedengi"])
report.writerow(["#", "", "Строки с # являются служебными,",
"при импорте", "будут удалены"])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
output.append(drink_data)
return {"drinks": output}
@app.route('/drinks/<id>')
def get_drink(id):
drink = Drink.query.get_or_404(id)
return {"name": drink.name, "description": drink.description}
@app.route('/drinks', methods=['POST'])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .models import Article
| ise-uiuc/Magicoder-OSS-Instruct-75K |
a one, else zero.
Arguments (6, 4 optional):
y: observations (STARS Variable)
w: weights matrix (array)
star: values at points are included in analysis at that point (bool)
permutations: number of permutations (int)
matrix: the valid values are "contiguity" and "distance" (string)
distance: the distance of study only used for distance matrix (number)
Atributes:
gi: observed local G values for each observation at each time (array)
pgi: the corrsponding p-values for each gi (array)
mcp: monte carlo p-values for each observation at each time (array)
w: the binary weights matrix used to calculate the statistics (array)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return cast(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class Q3CarFactory extends AbstractCarFactory {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import org.threeten.extra.Interval;
public interface BaseDocumentQueryService<T extends BaseDocument> {
@RolesAllowed({"ROLE_ADMIN", "ROLE_USER"})
Optional<T> findOne(ObjectId id);
@RolesAllowed({"ROLE_ADMIN", "ROLE_USER"})
Page<T> findAllCreatedBy(String createdBy, Pageable pageable);
@PreAuthorize("hasRole('ROLE_ADMIN') or #createdBy == authentication.principal.attributes['sub']")
int countAllByCreatedByInInterval(String createdBy, Interval interval);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Liste der Studiengänge
// myOrg ist immer gültig
// wenn myOrg was anbietet, dann daraus
// sonst org nehmen die was anbietet!
var selectedOrg = myOrg;
if (acticeorgs.Any() && !acticeorgs.Contains(myOrg))
{
selectedOrg = acticeorgs.First();
}
var activecurr = semService.GetActiveCurricula(selectedOrg, semester, true).OrderBy(f => f.Name).ThenBy(f => f.ShortName);
ViewBag.Curricula = activecurr.Select(f => new SelectListItem
| ise-uiuc/Magicoder-OSS-Instruct-75K |
plt.xlim([-10, 10])
plt.xlabel(r"$(k-k_p)/\Delta k$")
plt.ylabel(r"arb. units")
plt.title(r"$|\langle b(k) \rangle|^2$")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class FakeHandler:
def __init__(self):
self.handle_called = False
self.command = None
def handle(self, command):
self.handle_called = True
self.command = command
class RaiseExceptionHandler:
def __init__(self):
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/usr/local/bin/dash
# Provide port number as argument.
RUBYOPT="--jit"; puma -b tcp://0.0.0.0:$1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class IsOwner(permissions.BasePermission):
def has_object_permission(self, request, view, obj):
if request.user:
if request.method in permissions.SAFE_METHODS:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@dataclass
class RenderedFrame:
buffer: np.ndarray
duration: int
def __init__(self, frame: Frame, options: Options) -> None:
buffer = np.array(frame.snapshot, np.int32)[:, :, ::-1]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export const COMPONENT_NAME = 'ɵcomp';
export const ROOT_SELECTOR = 'root';
export const TEMPLATE_TAG = 'assemble-template'; | ise-uiuc/Magicoder-OSS-Instruct-75K |
# data
["this:$(pid)_$(uniqid)_Output","sio:has-value","$(datetime)","xsd:date"]]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}else{
var s=$(this).val();
var l=sizes.length;
for(var i=0;i<l;i++){
if(sizes[i]==s){
break;
}
}
for(;i<l-1;i++){
sizes[i]=sizes[i+1];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Solution:
"""
@param A : an integer array
@return : a integer
"""
def singleNumber(self, A):
# write your code here
return reduce(lambda x, y: x ^ y, A) if A != [] else 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use proc_macro::TokenStream;
use quote::ToTokens;
use syn::buffer::Cursor;
use syn::parse_macro_input;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .meteor_score import METEOR
from .max_words_perturbed import MaxWordsPerturbed
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func prepareForReuse() {
imageView.image = nil
initialsLabel.backgroundColor = UIColor.clear
initialsLabel.text = ""
initialsLabel.isHidden = false
imageView.isHidden = true
}
func setImageUrl(_ url: String) {
guard let url = URL(string: url) else { return }
ImageManager.loadImage(with: url, into: imageView) { [weak self] response, _ in
self?.initialsLabel.isHidden = response?.image != nil
self?.imageView.isHidden = response?.image == nil
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
status=`$shtd status`
| ise-uiuc/Magicoder-OSS-Instruct-75K |
owner = request.form['owner']
year = int(request.form['year'])
km_driven = int(request.form['km_driven'])
return jsonify({'estimated_price':server.util.predict_price(transmission,fuel,owner,year,km_driven)})
if __name__ == '__main__':
server.util.load_artifacts()
app.run(debug=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static_assert(sizeof(Struct) == 24);
} // namespace T1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import sklearn.datasets
import sklearn.model_selection
import utils
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Returns sign of number
* @memberof PIXI.utils
* @function sign
* @param {number} n - the number to check the sign of
* @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive
*/
export function sign(n: number): -1 | 0 | 1
{
if (n === 0) return 0;
return n < 0 ? -1 : 1;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# create kinesis client connection
kinesis_client = boto3.client('kinesis',
region_name='us-east-2', # enter the region
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Alignments are primarily sorted by read name (`queryname`).
QueryName(Vec<String>),
/// Alignments are primarily sorted by reference sequence and position (`coordinate`).
Coordinate(Vec<String>),
}
impl fmt::Display for SubsortOrder {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('association_name', models.CharField(max_length=100)),
('incharge', models.CharField(max_length=100)),
('about', models.CharField(max_length=500)),
('contacts', models.CharField(max_length=300)),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('candidatos', function (Blueprint $table) {
$table->increments('id_candidato');
$table->string('nombre');
$table->string('email');
$table->string('curriculum');
$table->string('telefono');
$table->integer('id_vacante')->unsigned();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Signature::build("path join")
.required("path", SyntaxShape::String, "Path to join the input path")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
preview_url='foo.com',
)
self.program.put()
def login_headers(self, user):
payload = {'user_id': user.uid, 'email': user.email}
return {'Authorization': 'Bearer ' + jwt_helper.encode(payload)}
def create_team(self):
team = Team.create(name='Team Foo', captain_id='User_cap',
program_id=self.program.uid)
team.put()
return team
def create_org(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return TestAdd(1, 2)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pip3 install --user scipy
pip3 install --user scikit-image
pip3 install --user Pillow
pip3 install --user jsonpickle
sudo apt-get install python3-tk
echo "-- Done" | ise-uiuc/Magicoder-OSS-Instruct-75K |
def get_user_by_id(self, user_id):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(score_2 * die.rolled)
exit()
position_2 = (position_2 + die.roll() + die.roll() + die.roll() - 1) % 10 + 1
score_2 += position_2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return construct(Type, TypeBase.skipToken as any).name();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.persistentContainer = persistentContainer
}
convenience init() {
let container = NSPersistentContainer(name: "eStore")
container.loadPersistentStores(completionHandler: { storeDescription, error in
if let error = error as NSError? {
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
self.init(persistentContainer: container)
}
}
// MARK: - UserRepository implementation
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public virtual DateTimeOffset ClientDate { get; set; }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func isContentEqual(to source: DateSeparatorChatItem) -> Bool {
return date == source.date
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>beltram/stubr
#[cfg(feature = "record-isahc")]
use isahc::{config::Configurable, HttpClient as IsahcClient};
#[cfg(feature = "record-reqwest")]
use reqwest::{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#fetch2
print (token)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, fil):
self.fil = fil
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.leftexpr = leftexpr
self.test_command = test_command
self.group = group
def __repr__(self):
if self.leftexpr:
return '%s %s %s'%(self.leftexpr, self.combination, self.rightexpr)
elif self.combination:
return '%s %s'%(self.combination, self.rightexpr)
elif self.test_command:
return '[ %s ]'%(self.rightexpr)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
:type strength: List[int]
:rtype: int
"""
MOD = 10**9+7
curr = 0
prefix = [0]*(len(strength)+1)
for i in xrange(len(strength)):
curr = (curr+strength[i])%MOD
| ise-uiuc/Magicoder-OSS-Instruct-75K |
path = os.path.dirname(path)
module_name = []
# move up until outside package structure (no __init__.py)
while True:
path, name = os.path.split(path)
module_name.append(name)
if not os.path.exists(os.path.join(path, "__init__.py")):
break
if sys.path[0] != path:
sys.path.insert(0, path)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Collections.Generic;
using Core.Graph;
using Core.Problems;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
It is used to load and hold datasets data and all options necessary to plot data.
"""
def __init__(self, dataset_file_path=None):
if dataset_file_path is not None and not isinstance(dataset_file_path, str):
raise TypeError("[ERROR]: 'dataset_filename' must 'str' type object! ({})".format(type(dataset_file_path)))
self.__current_selected_dataset = None
self.__current_selected_application_options = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try:
del self._callbacks[signal][(address, subnet)]
except KeyError:
pass
_signal = Signal()
def connect(signal, address, subnet, callback):
_signal.connect(signal, address, subnet, callback)
def disconnect(signal, address, subnet):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$app->run();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public PsiElement getReferencedElement() {
return myReferencedElement;
}
public boolean isInsideAnonymous() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.payload = payload;
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import static org.mockito.Mockito.when;
public abstract class ClientMessageProcessorTest<M extends DistributionMessage, T extends ClientMessageProcessor<M>> {
protected final SyncTarget syncTarget = mock(SyncTarget.class);
protected final SyncPath syncPath = mock(SyncPath.class);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
$ids = [];
foreach ($data['id'] as $transaction) {
array_push($ids, $transaction->getId());
if (!$transaction->isReconciled()) {
$transaction->setReconciled(1);
$this->em->persist($transaction);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
auth = OAuthHandler(CONSUMER_KEY,CONSUMER_SECRET)
api = tweepy.API(auth)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
#search
api = tweepy.API(auth)
# Get list of userIDs in mongo
allUserIDs = db.followers.distinct("id")
userList = [170995068]
for users in userList:
try:
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True, compression=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
revocation_endpoint_auth_methods_supported: Some(vec![
String::from("private_key_jwt"),
]),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
stm.close();
con.getConnection().close();
}catch(Exception ee){
ee.printStackTrace();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class UserProfileSerializer(serializers.ModelSerializer):
# BONUS Task: Flatten out the User object inside of UserProfile.
class Meta:
model = UserProfile
fields = ('id','user','full_name','district','party','borough')
class ComplaintSerializer(serializers.ModelSerializer):
class Meta:
model = Complaint
fields = ('unique_key','account','opendate','complaint_type','descriptor','zip','borough','city','council_dist','community_board','closedate')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import sys
import unittest
from unittest.mock import patch
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// returns true if parcel was migrated, false if scheduled locally
bool load_schedule(serialization::input_archive & ar,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# check whitelist expiry date
if [ $recreate_whitelist -eq 0 ]; then
cvmfs_sys_file_is_regular "${storage_location}/.cvmfswhitelist" || die "didn't find ${storage_location}/.cvmfswhitelist"
local expiry=$(get_expiry_from_string "$(cat "${storage_location}/.cvmfswhitelist")")
[ $expiry -gt 0 ] || die "Repository whitelist expired (use -r maybe?)"
elif [ $require_masterkeycard -eq 1 ]; then
local reason
reason="`masterkeycard_cert_available`" || die "masterkeycard not available to create whitelist: $reason"
elif ! cvmfs_sys_file_is_regular ${keys_location}/${master_key}; then
masterkeycard_cert_available >/dev/null || die "Neither masterkey nor masterkeycard found for recreating whitelist"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
## Initialize a Go_straight object.
#
# @param left A Motor representing the left motor.
# @param right A Motor representing the right motor.
# @param timer A Timer for moderating data taking.
def __init__(self, left, right, timer):
self.leftMotor = left
self.rightMotor = right
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
[Test, AutoData]
public async Task Then_If_NotFound_Result_Then_Service_Returns_Null(
PostcodesLocationApiResponse postcodeResponse,
string query)
{
var response = new HttpResponseMessage
{
Content = new StringContent(JsonConvert.SerializeObject(postcodeResponse)),
StatusCode = HttpStatusCode.NotFound,
};
var httpMessageHandler = MessageHandler.SetupMessageHandlerMock(response, new Uri(string.Format(Constants.PostcodesUrl, query, 10)));
var client = new HttpClient(httpMessageHandler.Object);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_subtract_weeks_positive():
assert pendulum.Date(1975, 5, 28).subtract(weeks=1).day == 21
def test_subtract_weeks_zero():
assert pendulum.Date(1975, 5, 21).subtract(weeks=0).day == 21
def test_subtract_weeks_negative():
assert pendulum.Date(1975, 5, 14).subtract(weeks=-1).day == 21
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.platform.ready().then(() => {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
logger.debug(f"Saved to cache: {cache_key}")
def fetch(self, url, params):
"""Fetch file from the cache."""
cache_key = self.key_from_url(url, params)
content = self.read(cache_key)
logger.debug(f"Fetched from cache: {cache_key}")
return content
def key_from_url(self, url, params=None):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
import unittest
from io import StringIO
from svgwrite.drawing import Drawing
from svgwrite.container import Group
class TestDrawingFullProfile(unittest.TestCase):
def test_empty_drawing(self):
dwg = Drawing()
result = dwg.tostring()
self.assertEqual(result, '<svg baseProfile="full" height="100%" version="1.1" '\
'width="100%" xmlns="http://www.w3.org/2000/svg" '\
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'install-gcs-connector-on-ambari,install-gcs-connector-on-ambari'
'update-ambari-config,*'
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
protected GeneratedPaymentImpl() {}
@Override
public int getPaymentId() {
return paymentId;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// nodev sysfs
// nodev rootfs
// nodev bdev
// nodev proc
// nodev sockfs
// nodev binfmt_misc
// nodev usbfs
// nodev usbdevfs
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Returns the absolute path to an instance's private path/area
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub type CAMetalLayer = *mut Object;
pub type CADrawable = *mut Object;
pub struct Surface {
pub(crate) inner: Arc<SurfaceInner>,
pub(crate) apply_pixel_scale: bool,
}
pub(crate) struct SurfaceInner {
pub(crate) nsview: *mut Object,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
file.seek(SeekFrom::Start(pos))?;
let (block, _bytes_read) = cariter::read_data(&mut file)?;
Ok(cariter::read_block(&block))
}
fn put(&self, _key: &[u8], _value: &[u8]) -> Result<u64, PrimaryError> {
// It only reads from a CAR file, it cannot store anything.
unimplemented!()
}
| 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.