seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
import { request } from '../base'
// Anyone can delete themselves, admins can delete other users in their realm,
// super-admins can delete any user.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
USER_POOL_ID=`cat ./config.json | jq -r '.cognito.userPoolId'`
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
OneWaypointEnv, IncentArrivalEnv, StaticObstacleEnv, \
NoGforcePenaltyEnv, SixtyFpsEnv, IntersectionEnv, IntersectionWithGsEnv, \
IntersectionWithGsAllowDecelEnv
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (new Date().getMonth() + 1 < 10) {
mes = '0' + mes;
}
this.date_range = {
start: new Date().getFullYear() + '-01-01',
end: new Date().getFullYear() + '-' + mes + '-' + new Date().getDate()
};
if (localStorage.getItem('numberCaseToSearch') !== null) {
this.numberUSF = local... | ise-uiuc/Magicoder-OSS-Instruct-75K |
)
)
guard let body = response.body else { throw Abort(.notFound) }
let content = try JSONDecoder().decode(Gist.self, from: body)
return content
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// we will proceed only if the user has specified that unencrypted storage is allowed.
if (!unsafeAllowUnencryptedStorage) {
throw new Error("Unable to read from the macOS Keychain.");
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
d=$(cd $(dirname $0) && pwd)
cd $d/../
nm=$(basename $(pwd))
git init
git remote add origin <EMAIL>:tkosht/$nm.git
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Vardas pavardė</th>
<th scope="col">El. paštas</th>
</tr>
</thead>
<t... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}else{
ft.txt = txt;
}
qDebug()<<ft.txt<<":"<<ft.color<<":"<<ft.bold<<ft.italic<<ft.underline<<ft.strikethrough;
return ft;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
]);
const { handleChange, handleBlur, handleSubmit } = useFormHandlers();
const {
components: {
SignUp: {
Header = SignUp.Header,
FormFields = SignUp.FormFields,
Footer = SignUp.Footer,
},
},
} = useCustomComponents();
return (
<View>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
count = self.archive.get_records_count(filters)
if count:
sfrom, etill = self.archive.get_records_dates(filters)
walltime = self.archive.get_records_walltime(filters)
cputime = self.archive.get_records_cputime(filters)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
question.value = inputResult.result;
if (inputs instanceof ConfigMap) {
(inputs as ConfigMap).set(question.name, question.value);
} else {
(inputs as Inputs)[question.name] = question.value;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'title': 'Beef mink chapati',
'price': '600.00'
}), headers=dict(
Authorization='Bearer ' + json.loads(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import PackageDescription
let package = Package(
name: "MockURLSession"
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
photo_path="/home/swpi/webcam_photo";
if [[ -f `which fswebcam` ]]; then
if ! [[ -d $photo_path ]] ; then
mkdir -p $photo_path ;
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pass
ictor.stop()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Star(QueryCommand):
def __init__(self, connection, query):
super().__init__(connection)
self.query = query
def execute(self):
try:
json_obj = PatchRequest(connection=self.connection,
context=f"{self.CONTEXT}/{self.query.id}/star").... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
watch()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export CLASSPATH=$CLASSPATH:/opt/confluent/share/java/confluent-common/common-config-2.1.0-alpha1.jar
export CLASSPATH=$CLASSPATH:/opt/confluent/share/java/schema-registry/jackson-databind-2.5.4.jar
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int q;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Sets Amazon ID2.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
true_basis_state[ii] = true_basis_state[ii + 1] = 1
assert new_basis_state == true_basis_state
assert np.isclose(coeff, -1)
comp_basis_state = [1, 1, 1, 1]
for ii in range(3):
pauli_term = sY(ii) * sY(ii + 1)
new_basis_state, coeff = compute_action(comp_basis_state, paul... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php
$this->registerMetaTag([
'charset' => Yii::$app->charset,
]);
$this->registerMetaTag([
'http-equiv' => 'X-UA-Compatible',
'content' => 'IE=edge',
]);
$this->registerMetaTag([
'name' => 'viewport',
'content' => 'width=device-width, initial-scale=1, ma... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'{} is not a Db Provider'.format(module_name)
)
return client
except (ModuleNotFoundError, AttributeError) as e:
raise InvalidDatabaseProvider(
'DB Provider for "{}" is not available: {}'.format(
db_provider, e
)
)
def bu... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php
require "vendor/autoload.php";
$dotenv = Dotenv\Dotenv::create(__DIR__);
$dotenv->load();
require "App/database/config.php"; | ise-uiuc/Magicoder-OSS-Instruct-75K |
class StructsAndObjectsDemo
{
public static void Main()
{
Account RobsAccount;
RobsAccount = new Account();
RobsAccount.Name = "Rob";
Console.WriteLine(RobsAccount.Name);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print('O número de elementos da lista é: {}'.format(len(lista1)))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fi
echo "📄 Creating upfile..."
| ise-uiuc/Magicoder-OSS-Instruct-75K |
override func tearDown() {
// If the test fails, print off the UI element tree and terminate the app.
if (testRun?.totalFailureCount ?? 1) >= 1 {
print(app.debugDescription)
app.terminate()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import serial
import sys
import threading
import time
import argparse
import struct
import Queue
| ise-uiuc/Magicoder-OSS-Instruct-75K |
override func viewDidLoad() {
super.viewDidLoad()
let balanceNavigation = UINavigationController(rootViewController: BalanceController())
balanceNavigation.tabBarItem.title = "Balance"
balanceNavigation.tabBarItem.image = UIImage(named: "Balance Tab Bar Icon")
let transact... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_exception():
with pytest.raises(OSError) as context:
view.render(template='no_file.txt')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>dandycheung/ExpectAnim
package com.github.florent37.expectanim.core.scale;
import android.view.View;
import java.util.List;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
onb.v.X = onb.w.y();
onb.v.Y = -onb.w.x();
onb.v.Z = 0;
}
onb.v.normalize();
onb.u = onb.v.cross (onb.w);
//Vector3.cross(onb.v.normalize(), onb.w, onb.u);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
p3 += p3;
std::cout << "Test: p3 += p3 " << p3 << std::endl;
p3 -= p2;
std::cout << "Test: p3 -= p2 " << p3 << std::endl;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# project does not exist
deleted = True
elif r.status_code == 200:
has_appveyor = _has_appveyor_any_branch(branch)
num_builds = _get_num_builds(appveyor_name)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mv ./itmo-544-444-fall2015/images /var/www/html/images
mv ./itmo-544-444-fall2015/index.html /var/www/html
mv ./itmo-544-444-fall2015/page2.html /var/www/html
echo "Hello!" > /tmp/hello.txt
| ise-uiuc/Magicoder-OSS-Instruct-75K |
HomeInvitationModel invitation = session.services().homes().invitations().findByID(id);
if (user != null && invitation != null && session.services().homes().invitations().acceptInvitation(invitation.getID(), user)) {
return Response.ok().build();
}
return Response.status(400)... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import { assert } from 'chai';
import Web3 from 'web3';
import { SendOptions } from 'web3-eth-contract';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"Latest" : "DESC",
"Oldest" : "ASC",}
conn_db()
a = Items(date_range=dates["All"], type_group=types["All"], order_by=orders["Oldest"], num_items=2000)
print(a.write_statement())
disconn_db() | ise-uiuc/Magicoder-OSS-Instruct-75K |
Returns:
np.ndarray, np.ndarray: class-balanced patches extracted from full
images with the shape [batch, example_size..., image_channels]
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
f'{MyService.name}_http_requests_total{{endpoint="/error",http_method="GET",status_code="500"}} 1.0'
in response.text
)
def test_override_default_metric_prefix(config, container_factory, web_session):
prefix = "my_prefix"
config.update({"PROMETHEUS": {MyService.name: {"prefix": prefix}}})
| ise-uiuc/Magicoder-OSS-Instruct-75K |
concentration (float): halo concentration.
halo_mass (float): halo masses; in units of Msun.
odelta (float): overdensity with respect to mean matter density.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if valid_move!= None and valid_move.capture==False and not piece.Moved:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert "a" in x
assert "d" not in x
assert len(x) == 4
assert x["a"] == "Amy"
assert x["z"] == "Zillah"
assert list(x) == ["a", "b", "c", "z"]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ret, th = cv2.threshold(img_rec_red2,10,255,cv2.THRESH_BINARY)
#ret, th = cv2.threshold(r_channel.astype('uint8'),110,255,cv2.THRESH_BINARY)
#th = cv2.bitwise_not(th, th)
kernel = np.ones((5,5),np.uint8)
#th = cv2.erode(th, kernel)
th = cv2.dilate(th, kernel)
th = cv2.GaussianBlur... | ise-uiuc/Magicoder-OSS-Instruct-75K |
//! you to focus more on your application while giving you to the flexibility to
//! transparently use whichever http trigger suits your application's needs best.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"attn.proj._aftergemm_quantizer",
"mlp.fc1._aftergemm_quantizer",
"mlp.fc2._aftergemm_quantizer",
"attn.softmax_input_quantizer",
"attn.proj._input_quantizer"]
downs... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// 1. `[]` SignerGroup's owner
InitSignerGroup,
/// Create new valid signer account
///
/// 0. `[w]` Uninitialized valid signer account
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if no_layers == 2:
gcn = ehf.EmbeddingKWGCN(C_train[:-1], X_train[:-1], e_train, [6,6,2], nonlin2="selu")
elif no_layers == 1:
gcn = ehf.EmbeddingKWGCN(C_train[:-1], X_train[:-1], e_train, [6,2])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</script>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if [ -f /data/pds.img ]; then
#delete old pds image that may have broken permissions
rm -f /data/pds.img
fi
if [ ! -f $PDS_FILE ] ; then
#make a copy of pds in /data
| ise-uiuc/Magicoder-OSS-Instruct-75K |
######################################################## DATABSE SETTINGS ####################################################
#Neo4j Database URI used by the Neomodel OGM
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# http://www.gnu.org/licenses/
#*****************************************************************************
from sage.structure.parent import Parent
from sage.structure.unique_representation import UniqueRepresentation
from sage.categories.all import Rings, GradedHopfAlgebras
from sage.combinat.par... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import subprocess
import time
for obstacles in [5, 10, 15, 20]:
scores = []
for i in range(30):
procs = []
for j in range(4):
time.sleep(0.1) # allow for different random number generation
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if 'No' in output:
return True
except Exception:
pass
return False
| ise-uiuc/Magicoder-OSS-Instruct-75K |
test = Tester().test
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[cfg(feature = "has_symbol")]
pub fn has_xcb_xinerama_query_screens_reply(&self) -> bool {
has_sym!(self, xcb_xinerama_query_screens_reply)
}
}
#[cfg(feature = "xcb_xinerama")]
#[cfg(all(test, feature = "has_symbol"))]
mod test {
#[test]
fn has_all() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from ChatListener import ChatListener
from antlr4.error.ErrorListener import *
import io
class ChatErrorListener(ErrorListener):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn panic(_info: &PanicInfo) -> ! {
serial_println!(" -> [ok]");
exit_qemu(QemuExitCode::Success);
loop {}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* Returns the run cycles.
*
* @return int
*/
public function getRunCycles(): int;
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
pykoop.AnglePreprocessor(),
pykoop.PolynomialLiftingFn(),
pykoop.DelayLiftingFn(),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
url = dict["url"]
except:
url = ""
# Tweak title here
title = string.replace('"', '')
#
print("@@@@@@@@@@@@", id)
#print(" L ", dateAddedLocal)
#print(" U ", dateAddedUTC)
#print(" I ", index)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_repr(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fields.forEach(field => veeValidate.useField(field))
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "DebugLog.h"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
:return: [list of IDs], NumFs
"""
combos = manip.get_line_combos(season, game, homeroad)
pairs = manip.get_pairings(season, game, homeroad)
playerlist = []
# forwards
# I can simply drop PlayerID2 because dataframe contains duplicates of every line
ftoi = manip.get_player_toi(season, ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import cv2
import imalgo
import sys
import plotting
import matplotlib.pylab as plt
from scipy.signal import find_peaks
from scipy.signal import savgol_filter
from scipy.optimize import curve_fit
from scipy import asarray as ar,exp
eps = np.finfo(float).eps
#%%
| ise-uiuc/Magicoder-OSS-Instruct-75K |
writeRow(rows: string[]) {
const line = rows.join(",") + ENDLINE;
fs.appendFileSync(this.filePath, line, "utf8");
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// limitations under the License.
#ifndef IOX_EXAMPLES_ICEPERF_BASE_HPP
#define IOX_EXAMPLES_ICEPERF_BASE_HPP
#include "topic_data.hpp"
#include <chrono>
#include <iostream>
class IcePerfBase
{
public:
static constexpr uint32_t ONE_KILOBYTE = 1024U;
virtual void initLeader() noexcept = 0;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if ! [ -x "$(command -v grcov)" ];
then
cargo +nightly install grcov
fi
grcov ./target/debug/ -s . -t html --llvm --branch --ignore-not-existing -o ./target/debug/coverage/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__version__ = "5.3.2"
__version_info__ = tuple(LooseVersion(__version__).version)
__author__ = "<NAME>"
__license__ = "MIT"
__all__ = ("dict2schema", "ValidationError", "fields", "missing", "validate")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use criterion::{
black_box,
criterion_group,
criterion_main,
Criterion
};
use wavefront_obj::obj;
use std::fs::{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
wget -c https://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.5.8/yum/rhel7-ppc64le/srpms/MariaDB-10.5.8-1.el7.centos.src.rpm
| ise-uiuc/Magicoder-OSS-Instruct-75K |
resp = PprzMessage(self._message_class, larg[2])
resp = self._callback(sender=sender, msg=msg, resp=resp, **kwargs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
close_active_records(self.model, pks, ts)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ax1.scatter(x, y, s=5, c='b', marker="o", label='real')
ax1.plot(test_x,test_y, c='r', label='NN Prediction')
plt.legend()
plt.show() | ise-uiuc/Magicoder-OSS-Instruct-75K |
from basecls.data import ColorAugment, build_dataloader
@pytest.mark.parametrize("train", [True, False])
def test_build_folderloader(train):
with tempfile.TemporaryDirectory() as dataset_path:
subset_name = "train" if train else "val"
data_dict = dict(num_workers=2)
data_dict[f"{subset_nam... | ise-uiuc/Magicoder-OSS-Instruct-75K |
for(int j=0;j!=line;++j){
string loc_0, loc_1, loc_2, loc_3, loc_4, loc_5;
stringstream ss_0;
ss_0.clear();
ss_0<<loc[j][0];
lo... | ise-uiuc/Magicoder-OSS-Instruct-75K |
({})
}
f
e)
func f<g>() -> (g, g -> g) -> g {
d j d.i = {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from flask import jsonify, g, abort
from flask_expects_json import expects_json
judge_schema = {
'type': 'object',
'properties': {
'code': {'type': 'string'},
'language': {'type': 'string'},
'problem_id': {'type': 'integer'}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Height = height;
}
public float Height { get; set; }
public string Caption { get; set; }
public System.Action OnPress { get; set; }
public Texture IconTexture { get; set; }
public System.Func<GUIStyle> CaptionStyleProvider { get; s... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
__all__ = ["encrypt", "decrypt", "main"]
MODE = AES.MODE_CTR
BS = AES.block_size
KS = AES.key_size[-1]
def _pad_bytes(byte_str, size):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
user.save()
return user
def create_superuser(self, name, email, password):
user = self.create_user(name=name, email=email, password=password)
user.is_staff = True
user.is_superuser = True
user.save()
return user
| ise-uiuc/Magicoder-OSS-Instruct-75K |
load_sec = load_time % 60
print('Dataframes loaded in {} minutes {} seconds! Splitting for train and validation...\n'.format(load_min, load_sec))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func present(albums: [Album], in view: ShoppingBoxView) {
let subviews: [ShoppingBoxItemView] = albums.enumerated().map { index, album in
let view = ShoppingBoxItemView()
view.titleLabel.text = album.title
view.bandLabel.text = album.band
view.separatorView.is... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from . import binding as binding
from . import runtime as runtime
from . import filesystem as filesystem
from . import image as image
import ctypes as C
class Docker(runtime.Runtime):
"Docker refers to a parsed docker application object."
# Initialize the docker object, assuming it is defaultly
# installed in the ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# Copyright (c) Open-MMLab. All rights reserved.
__version__ = '0.6.1'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#define CUDNN_GROUPING
#endif
template<class T>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
copyright : (C) 2017 by <NAME>
email : <EMAIL>
***************************************************************************/
This plugin provides access to the various APIs from OpenRouteService
(https://openrouteservice.org), developed and
maintained by GIScience team at U... | ise-uiuc/Magicoder-OSS-Instruct-75K |
migrations.RemoveField(
model_name='certificategenerationcoursesetting',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.obsolete_date = datetime.utcnow()
MemoHistory.activity(memo=self,user=delegate,memo_activity=MemoActivity.Obsolete)
self.save()
return True
# Owner Function
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if f.closed:
print("Finished updating " + product_list_filepath)
else:
print("file not closed")
if __name__ == '__main__':
main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
gets a commands,
tries added a configs prefix to the name if not found initally,
returns None if not exist, does not get custom commands
"""
return commands.get(name) or commands.get(cfg.prefix + name)
def set_command_permission(cmd: str, new_permission: Optional[str]) -> bool:
"""
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
>&2 echo "S3 is unavailable - sleeping"
sleep 1
done
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print json.dumps(blocks, indent=4, sort_keys=True) | ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>100-1000
from .jaccard import jaccardscore_sents | ise-uiuc/Magicoder-OSS-Instruct-75K |
def watchdog_handler(job):
import asyncio
loop = j.atyourservice.server.loop
service = job.service
if str(service.model.data.status) != 'running':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
git remote -v
git remote set-url origin <EMAIL>:marbug/docker.git
git remote -v
| 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.