seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
import { validate } from 'backend/functions/sendEmail.validation';
// import ow from 'ow';
// import React, { useState } from 'react';
// const useEmailSender = () => {
// const validateFields = ({
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return g
return f | ise-uiuc/Magicoder-OSS-Instruct-75K |
export const Slider: React.FC<TileViewComponentProps> = ({ tile, options }) => {
const { dimensions, layout } = options;
let colspan = layout.colspan;
const { title, description, content, ctas, styling } = tile;
const spansOverAllColumns = layout.colspan === dimensions.cols;
const hasBackgroundColo... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def build_list(
item_1: dict = None,
item_2: dict = None,
item_3: dict = None,
item_4: dict = None,
item_5: dict = None,
) -> list:
"""Creates a JSON array from multiple items.
Annotations:
author: <NAME> <<EMAIL>>
"""
result = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "# Login client config follows..."
${KC_PATH}/kcadm.sh get clients/${LOGIN_ID}/installation/providers/keycloak-oidc-keycloak-json -r ${REALM}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private function setLock($config_table, $config_name, $setting)
{
$prepared = $this->database->prepare(
'UPDATE "' . $config_table . '" SET "edit_lock" = ? WHERE "config_name" = ?');
$this->database->executePrepared($prepared, [$setting, $config_name], true);
}
private f... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# Copyright 2018 The Crashpad Authors. All rights reserved.
#
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'utility_account_number' => 'MCASH_UTILITY_ACCOUNT_NUMBER',
];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public IEnumerable<PaymentMethod> PaymentMethods { get; set; }
public IEnumerable<ShippingMethod> ShippingMethods { get; set; }
public IEnumerable<ShippingClass> ShippingClasses { get; set; }
public IEnumerable<Company> Companies { get; set; }
public IEnumerable<AmeiseTemplate> AmeiseExportTemplates { get; se... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# <NUMBER_OF_DEVICES> | <DEVICE_INFO_1> | <DEVICE_INFO_2> | ...
# <DEVICE INFO> = <UID> <Name> <allowed or not (optional)>
elems = str_list.split('|') # TODO: put delim as a constant somewhere?
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# exts: matplotlib API, default = (".png", ".pdf") --> save figure in format of png and pdf
# verbose: show the figure on Python IDE, default = True
| ise-uiuc/Magicoder-OSS-Instruct-75K |
theVessel_->getState(eta, nu);
tf::Transform transform;
nav_msgs::Odometry odom;
geometry_msgs::PoseStamped pose;
transform.setOrigin(tf::Vector3(eta[0],eta[1],0));
tf::Quaternion q;
q.setRPY(0,0,eta[2]);
transform.setRotation(q);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .channel import Channel, MODE_CLIENT, MODE_SERVER
| ise-uiuc/Magicoder-OSS-Instruct-75K |
})
context = {
'cart_items': cart_items,
'total': total,
'item_count': item_count,
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
t (Tensor): Tail entity ids of the triple.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return http_response
while http_response.status_code in [300,301,302]:
url = http_response.headers["location"]
if url in rdseq:
raise FatalError("Loop detected in redirects")
else:
rdseq.append(url)
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
while True:
if sw() == True:
pin.high()
else:
pin.low()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CameraCapture().run()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
nums=[15,18,25,35,1,3,12]
print(menor(nums)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
if (y > 127 || y < 0){
return 0;
}
int chunkX = (int)floor(x/16d);
int chunkZ = (int)floor(z/16d);
int blockX = (int)(x - (16d*chunkX));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<li><a href="#">Posted on <?= Yii::$app->formatter->asDate($model->created_at)?></a></li>
<li>By <a href="#"><?= $model->createdBy->username?></a></li>
</ul>
</div>
<?= $model->con... | ise-uiuc/Magicoder-OSS-Instruct-75K |
use crate::{multiaddr::Multiaddr, socks::SocksError};
use std::{borrow::Cow, io};
use thiserror::Error;
use tokio::task::JoinError;
#[derive(Debug, Error)]
pub enum DnsResolverError {
#[error("The address is empty")]
EmptyAddress,
#[error("Invalid address '{address}': {message}")]
InvalidAddress {
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
except: print("Oopsi daisy")
# TASK 2
# Write a function that takes in two numbers from the user via input(),
# call the numbers a and b, and then returns the value of squared a divided by b,
# construct a try-except block which raises an exception if the two values given by the input function were not numbers,
# ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
canvas.drawing { turtle in
//define the square method
func square(withSize size: Double)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
else
{
return base.Save(stream, image, bitDepth);
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
b = smbus.SMBus(1)
d = []
addr = 0x27
b.write_quick(addr)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return "Restart the client..."
def deploy_app(self, app_name: str, job_id: str, client_name: str, app_data) -> str:
workspace = os.path.join(self.args.workspace, WorkspaceConstants.WORKSPACE_PREFIX + str(job_id))
if deploy_app(app_name, client_name, workspace, app_data):
return... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import it.polimi.modaclouds.cpimlibrary.entitymng.statements.builders.lexer.TokenType;
import it.polimi.modaclouds.cpimlibrary.entitymng.statements.utils.CompareOperator;
import lombok.extern.slf4j.Slf4j;
import javax.persistence.CascadeType;
import javax.persistence.JoinTable;
import javax.persistence.Query;
import j... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public void disableFieldOrientedControl() {
enableFieldOrientedControl = false;
}
public void enableFieldOrientedControl() {
enableFieldOrientedControl = true;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static var previews: some View {
HelpDialogView(devicesView:nil)
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>Muxi-Studio/ccnu-network-culture-festival
# coding: utf-8
from flask import Blueprint
auth = Blueprint(
'auth',
__name__,
template_folder = 'templates',
static_folder = 'static'
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = ["swagger_blueprint"]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
constructor() {
super(__dirname);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// MetalShaderRunner
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
DESCRIPTION = "Icetea - test framework"
OWNER_NAMES = "<NAME>"
OWNER_EMAILS = "<EMAIL>"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using ENCO.DDD.Domain.Model.Enums;
using IFPS.Sales.Domain.Model;
namespace IFPS.Sales.Domain.Seed.CompanyTypes
{
public class CompanyTypeTranslationSeed : IEntitySeed<CompanyTypeTranslation>
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[cfg(feature = "async")]
#[async_trait::async_trait]
impl AsyncDecode for BlockStreamInfo {
async fn from_async_reader<R>(reader: &mut R) -> Result<Self>
where R: AsyncRead + Unpin + Send
{
use crate::utils::*;
let min_block_size = reader.read_u16().await?;
let max_block_size ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskExecutors;
import com.google.firebase.FirebaseException;
import com.google.firebase.auth.A... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'api': self._api,
'url': '/session/ttl',
'request_data': request_data,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rustc_version: String,
rustflags: String,
profile: String,
}
#[derive(Serialize, Debug)]
struct GitInfo {
rev: String,
dirty: bool,
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
break;
}
// Check again explicitly for edit as we may have converted to an edit
// after a successful add.
if ($action == 'edit') {
try {
$destinations = $shout->extensions->getExtensions($curaccount);
$conferences = $shout->storage->getConferences($curaccount);
$recordings = $shout->st... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.env_name = env_name
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
edit() {
this.isEditing = true;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert (
list(m_success.call_args)
== [(config & dirs, ), {}])
else:
assert not m_success.called
if config - dirs:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
return $this->height;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
results.append(ss);
# print(ss['compound'])
score += ss['compound']
count += 1
completeScore += (score/count)*questionWeights[i]
#print(completeScore)
if (completeScore >= 0.1):
return "False Alarm! You d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import whois
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers,
long defaultRequestTO, long defaultOfferTO) {
this.exchange = new RTBExchange(exchange);
this.advertisers.clear();
this.advertisers.putAll(advertisers);
if (this.request.tmax == null) {
this.requestTimeoutMs = de... | ise-uiuc/Magicoder-OSS-Instruct-75K |
time.sleep(10)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Depth,
DepthShadow,
Fill,
Orientation,
Sizes,
TextColors,
TextOverflow,
TextSize,
} from '../../../../types';
import { Container } from '../../../layout/Container';
import { Spacer } from '../../../layout/Spacer';
import { Icon, IconProps } from '../../../media/Icon';
import { Label } from '../../../typ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return GammaQ_cf<T, false>(a, x);
}
}
} // namespace detail
// P(x, a)
TRNG_CUDA_ENABLE
inline float GammaP(float a, float x) { return detail::GammaP<float, true>(a, x); }
TRNG_CUDA_ENABLE
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo Starting url-shortener
docker-compose -p url-shortener -f environment/docker-compose.yml up -d | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
// MARK: - Errors
struct Errors: Codable {
let errorID: Int
| ise-uiuc/Magicoder-OSS-Instruct-75K |
author='<NAME>',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_to_dict_User(self):
"""test if dictionary works"""
self.assertEqual('to_dict' in dir(self.user), True)
if __name__ == "__main__":
| ise-uiuc/Magicoder-OSS-Instruct-75K |
del self.nvmf_subsystems[found_id]
return json.dumps({"result": {}})
def nvmf_subsystem_create(self, params=None):
nvmf_subsystem = {
"namespaces": [],
"nqn": params['nqn'],
"serial_number": "S0000000000000000001",
"allow_any_host": False... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class BuilderRuntimesFactory(j.application.JSBaseClass):
__jslocation__ = "j.builders.runtimes"
def _init(self):
#
self._python = None
self._php = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$result .= "</td>";
if($j % 2 ==0){
$result .= "</tr>";
}
}
return $result;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub(crate) fn shaderc_include_callback(
requested_path: &str,
include_type: shaderc::IncludeType,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
count += 1
return count
if __name__ == '__main__':
print(max_consecutive_ones(7))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Sets the result to the longer of the two Strings
result = a if len(a) > len(b) else b | ise-uiuc/Magicoder-OSS-Instruct-75K |
return res
n = len(matrix[0])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.reset_vc_queue()
def get_mentions_from_send(self, buf):
send_str = buf.getvalue().strip().split("\n", 1)[0]
assert send_str.startswith("SEND:")
assert "<@" in send_str
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bullet2Movement(bullet2X, bullet2Y)
if event.type == pygame.KEYUP:
if event.key == pygame.K_UP or event.key == pygame.K_DOWN:
player2_change = 0
#Movement Calculation for player 1
player1Y += player1_change
if player1Y <= ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public static void main(String[] args) {
// TODO Auto-generated method stub
int n = Integer.parseInt(args[0]);
String message = (n<=5) ? "ok" : (n<=10) ? "notify": "warning";
System.out.println(message);
/*if(n<=5) {
System.out.println("ok");
}
else if(n>5 && n<=10){
System.out.println("notify"... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
from zcls.model.layers.global_context_block import GlobalContextBlock2D
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if let data = cache.cachedResponse(for: request)?.data, let image = UIImage(data: data) {
self.image = image
} else {
self.image = placeholder
URLSession.shared.dataTask(with: request, completionHandler: { (data, response, error) in
if let data = data, let response = response, ((respon... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import Foundation
public class ViewModel<M> {
public let model: M
public required init(model: M) {
self.model = model
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'V110',
'V111',
'V112',
'V113',
'V114',
'V115',
'V116',
'V117',
'V118',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int main ()
{
std::vector <int> v0(10); //Erstellt Vector v0 mit
for (auto& v : v0){ //Für jedes Element im Vector
v = std::rand(); //jedem Element wird eine Zufallszahl zugewiesen
}
std::copy(std::begin(v0), std::end(v0), //Kopiert alle Element vom 1. bis zum letzten
std::ostream_iterator<int>(std::cout, "\... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
Ok(builder)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return False
return user and not user.is_anonymous
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int queens[] = { 0, 0, 0, 0 };
int jacks[] = { 0, 0, 0, 0 };
bool stop[] = { false, false, false, false };
string table = "SHDC";
for (int i = 0; i < size; i += 3) {
char rank = line[i];
int suit;
for (int j = 0; j < 4; ++j) {
if (table[j] == line[i + 1]) { suit = j; }
}
switch(ra... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'text' => 'TestText',
];
$result = (new PostRequestDto($data))->toJson();
$this->assertIsString($result);
$this->assertEquals(json_encode($data), $result);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
".import users.csv users" \
".tables" \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// String.swift
// HypeMachineAPI
//
// Created by Alex Marchant on 7/15/15.
// Copyright (c) 2015 Plug. All rights reserved.
//
import Cocoa
extension String {
func stringByAddingPercentEncodingForURLQueryValue() -> String? {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
display_data.historical.ppm_length++;
}
span_average_count = 0;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.height = height
def clear(self) -> None:
"""Clear the current image.
"""
pass
@abstractmethod
def rectangle(self, left: int, top: int, right: int, bottom: int) -> None:
"""Draw a rectangle onto the screen.
Parameters
----------
| ise-uiuc/Magicoder-OSS-Instruct-75K |
local = {}
incluir = True
while incluir:
nome = input('qual seu nome? :')
local_escolhido = input('Qual local de suas próximas férias? :')
local[nome] = local_escolhido
repetir = input('Gostaria de incluir outro na enquete?(Yes/No):')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return status;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try:
get_all_distances(df, df)
except:
assert True
else:
assert False
def test_point_correct_length():
"""
Point vector should be length k, the number of columns of the input dataframe
"""
try:
get_all_distances([1,2,3,4],df)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
repaint();
}
QPolygonF EFXPreviewArea::scale(const QPolygonF& poly, const QSize& target)
{
QPolygonF scaled;
for (int i = 0; i < poly.size(); i++)
{
QPointF pt = poly.at(i);
pt.setX((int) SCALE(qreal(pt.x()), qreal(0), qreal(255), qreal(0), qreal(target.width())));
pt.setY((int... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertEqual(erc20_events_indexer.start(), 0)
account = self.ethereum_test_account
amount = 10
erc20_contract = self.deploy_example_erc20(amount, account.address)
# PostReceive signal will set the `erc20_block_number` to the `EthereumTx` block number
safe_contract =... | ise-uiuc/Magicoder-OSS-Instruct-75K |
l08 = ConnectionLine([m8, m5])
l09 = ConnectionLine([m1, m5])
l10 = ConnectionLine([m2, m6])
l11 = ConnectionLine([m3, m7])
l12 = ConnectionLine([m4, m8])
lines = [l01, l02, l03, l04, l05, l06, l07, l08, l09, l10, l11, l12]
p1 = ConnectionPolygon([m1, m2, m3, m4])
p2 = ConnectionPolyg... | ise-uiuc/Magicoder-OSS-Instruct-75K |
path = os.path.join(d, 'weights.h5')
from_model.save_weights(path)
to_model.load_weights(path, by_name=by_name)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
r = random.randint(1, 100)
self.layout = Layout(
Accordion(
Fieldset('Alert Data', 'scrip_symbol', 'exchange_name', 'price', 'percentage',
'intraday_alert')
)
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
c.evaluation(5) | ise-uiuc/Magicoder-OSS-Instruct-75K |
_storage = _StorageClass(copying: _storage)
}
return _storage
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
while let fieldNumber = try decoder.nextFieldNum... | ise-uiuc/Magicoder-OSS-Instruct-75K |
let namespaces = success.result;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in range(26):
# Assumes a is 0, z is 25
letter = chr(base + i)
rotated_letter = chr(((i + n) % 26) + base)
codex[letter] = rotated_letter
# Build plain_text string using the codex mapping
plain_text = ''
for c in cipher_lower:
plain_text += codex.get(c, c)... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>sources/boltun/util/collections.py
from __future__ import absolute_import, division, print_function
import attr
@attr.s
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# script matches the one which is installed / available on the server.
ex_metadata = metadata = {
"items": [{"key": "ssh-keys", "value": "root: %s" % (PUBLIC_SSH_KEY_CONTENT)}]
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def time_masking(x, x_len, prob, span, replace=0):
num_idx = int(x_len*prob/float(span) + np.random.rand())
x_idx = np.asarray(np.arange(x_len.item()-span))
if x_idx == []:
return x
mask_idx = np.random.choice(x_idx, num_idx, replace=False)
mask_idx = np.asarray(
[
mask_i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return processed
def process_channels(self, channel_ids=constants.CHANNEL_IDS,
window_size=constants.WINDOW_SIZE):
processed_channels = np.concatenate([
self.process_channel(channel_id, window_size)
for channel_id in channel_ids
], axis=-1)
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>library/thrift/bin/run.sh
#!/bin/bash
# Example for running
docker run -t -i thrift /bin/bash
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Override
public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) {
final RelDataTypeFactory typeFactory = validator.getTypeFactory();
List<RelDataTypeFieldImpl> columns = new LinkedList<>();
columns.add(new RelDataTypeFieldImpl("... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>Kreastr/SmartAPI-HEILA
import sys
import site
import os
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return weight*12.0 + flat
| ise-uiuc/Magicoder-OSS-Instruct-75K |
gridpartype_vector& dfug = (gridpartype_vector&)dfparam.get_usergrid(season);
double rdx = 30.0/param.get_deltax_eq();
double rdy = 30.0/param.get_deltay();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
public void PrintPreviousOrders()
{
System.Console.WriteLine();
foreach (Order i in Location.OrderList)
{
if(Location.OnlineUser == i.UsernameOfCustomer)
| 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.