seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
Assert.AreEqual(CreatePhoneNumberFunc(new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }), "(111) 111-1111");
}
public string CreatePhoneNumberFunc(int[] numbers)
{
return $"({numbers[0]}{numbers[1]}{numbers[2]}) {numbers[3]}{numbers[4]}{numbers[5]}-{numbers[6]}{numbers[7]}{numb... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if ladoA == ladoB and ladoB == ladoC:
print("É um triângulo equilátero!")
elif ladoA == ladoB or ladoB == ladoC or ladoA == ladoC:
print("É um triângulo isóceles!")
else:
print("É um triângulo escaleno!")
else:
print("Não é um triângulo!") | ise-uiuc/Magicoder-OSS-Instruct-75K |
mod space;
mod types;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export declare type FloatNavigationMenuStyleProps = {
gutter?: string | number;
};
export declare type FloatNavigationMenuClassKey = keyof ReturnType<typeof floatNavigationMenuStyles>;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
datas,
latitude,
longitude,
altitude,
temperature=temperatura,
pressure=pressao
)
posicao_sol.plot()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
timeSinceUt_hhFract = (
obsDateTime['hh'] +
obsDateTime['mm']/60 +
obsDateTime['ss']/3600
)
jd = jd0 + timeSinceUt_hhFract/24
| ise-uiuc/Magicoder-OSS-Instruct-75K |
entity = parse_entity(context, nullptr, child, cur);
if (entity)
{
// steal comment
comment = type_safe::copy(entity->comment()).value_or("");
entity->set_comment(type_safe::nullopt);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
os.system("./service.py -d " + ducc_home)
os.system("./submit.py -d " + ducc_home)
main(sys.argv[1:])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.db import models
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (connection == null) throw new ArgumentNullException(nameof(connection));
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
Node *child = node->appendChild(name, attr);
if (type == BeginTag) {
parseNode(child);
}
}
}
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
chainEntity.component(ofType: SpriteNodeComponent.self)?.spriteNode.zRotation = newAngle - (CGFloat.pi / 2)
}
private func handleSnapping(with contact: Contact) {
let otherEntity = contact.otherObject.colliderComponent?.entity
guard
let swingHolderComponent = ot... | ise-uiuc/Magicoder-OSS-Instruct-75K |
model = Foo
field = _convert_field_from_spec("attr", (Foo, Foo(name="bar")))
assert field.type == GraphFoo
def test_unresolved_placeholders():
# no errors should be raised here -- instead a placeholder is created
field = _convert_field_from_spec("attr", (create_model("Model", size=int), N... | ise-uiuc/Magicoder-OSS-Instruct-75K |
elif obj == 'pan':
tweakedObj = ['pan', 'frying pan']
elif obj == 'eating_utensil':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.db import migrations
import django_countries.fields
class Migration(migrations.Migration):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return x < p.x || (x == p.x && y < p.y);
}
};
// 2D cross product of OA and OB vectors, i.e. z-component of their 3D cross product.
// Returns a positive value, if OAB makes a counter-clockwise turn,
// negative for clockwise turn, and zero if the points are collinear.
coord2_t cross(const Point &O, const Point &A... | ise-uiuc/Magicoder-OSS-Instruct-75K |
case 'full':
result = '100vh';
break;
case 'auto':
result = getMaxNodesY(pageDefine.nodes);
if (pageDefine.pagePaddingBottom) {
result += pageDefine.pagePaddingBottom;
}
break;
default:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
window.rootViewController = UINavigationController(rootViewController: ChatsViewController())
window.makeKeyAndVisible()
return true
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
string line = "";
while ((line = streamReader.ReadLine()) != null)
{
tok += line;
}
}
var token = JsonConvert.DeserializeObject<TokenModel>(tok);
_services.Preferences.AccessToken = token.Token;
SecondUserModel userLoginTest = await DataAccess.LoginTest(Usernam... | ise-uiuc/Magicoder-OSS-Instruct-75K |
iono["ver"].loc[:, ["3371", "3644", "3726", "1356", "1493", "1304", "LBH"]],
"Ultraviolet",
axs[2],
)
axs[0].set_ylabel("altitude [km]")
axs[0].set_xlabel("Volume Emission Rate [Rayleigh]")
def ver_group(iono: xarray.DataArray, ttxt: str, ax):
nm = np.nanmax(iono)
if nm == ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
cls.windows.app.kill()
if __name__ == '__main__':
unittest.main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class _(Document): pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def profile(request):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/usr/bin/env bash
installViewer(){
sudo snap install redis-desktop-manager
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
storage.push(data,storages,uuid)
if __name__ == "__main__":
if not os.path.isdir(DATA_DIR): os.mkdir(DATA_DIR)
t = ThreadedServer(StorageService, port = 8888)
t.start()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
block_decryptor_bench!(Key: Magma, magma_decrypt_block, magma_decrypt_blocks);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"keywords:\n"
"- acre\n"
"- acres")
return contents
elif filename == 'bar':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def callback(ch, method, properties, body):
obj = json.loads(body)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Diagnostics;
namespace AE.Net.Mail
{
public abstract class ObjectWHeaders
{
protected ObjectWHeaders()
{
this.Attachments = new List<Attachment>();
}
string _strRawHeaders;
public virtual string RawHeaders
{
get => _strRawHeaders;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pass
# def test_instance(self):
# raise NotImplementedError()
#
# def test_create_runtime(self):
# raise NotImplementedError()
#
# def test_get_data(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Generate the list of names to import
usecols = [x.name for x in DATA_DICTIONARY if x.usecol]
# dtypes should be a dict of 'col_name' : dtype
dtypes = {x.name : x.dtype for x in DATA_DICTIONARY if x.dtype}
# same for converters
converters = {x.name : x.converter for x in DATA_DICTIONARY if x.converter}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Play 2.8.x
export PLAY_VERSION=2.8.0 PLAY_JSON_VERSION=2.8.1 WS_VERSION=2.1.2
sbt ++${S2_13} makePom packageBin packageSrc packageDoc
| ise-uiuc/Magicoder-OSS-Instruct-75K |
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
},
}
# For testing template tags
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub const XKB_KEYSYM_NO_FLAGS: xkb_keysym_flags = 0;
pub const XKB_KEYSYM_CASE_INSENSITIVE: xkb_keysym_flags = 1 << 0;
pub type xkb_context_flags = c_int;
pub const XKB_CONTEXT_NO_FLAGS: xkb_context_flags = 0;
pub const XKB_CONTEXT_NO_DEFAULT_INCLUDES: xkb_context_flags = 1 << 0;
pub const XKB_CON... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import numpy as np
import cv2 as cv
from abc import ABC
| ise-uiuc/Magicoder-OSS-Instruct-75K |
new Vue({
el: '#app',
render: (h) => h(App),
})
| ise-uiuc/Magicoder-OSS-Instruct-75K |
os_desc.text = os_info['name']
[os_type] = os_section.findall('./vbox:OSType', namespaces)
os_type.text = os_info['name']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/20.11/dpdk_qat.patch"
elif [[ $dpdk_ver == 21.08* ]]; then
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/21.08/dpdk_qat.patch"
fi
fi
meson build-tmp --prefix="$external_dpdk_dir" --libdir lib \
-Denable_docs=false -Denable_kmods=... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'instance': 'prototype',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
logging.info(
"The image cannot be opened by opencv, so predicted label map is shown as a pseudo color image."
)
image_name = image_name.split('.')[0] + '.jpg'
weight = 0.
else:
im = cv2.imread(image)
if abs(weight) < 1e-5:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
@Override
public int compare(Method o1, Method o2) {
return o1.getName().compareTo(o2.getName());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
XCTMain(tests)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
PROGRAM TO GET SCARP VIEW COUNT OF ss AND sl
"""
import re
import time
import datetime
import requests
from bs4 import BeautifulSoup
import pandas as pd
scrapeList = [
"https://www.etsy.com/shop/SSweddings",
"https://www.etsy.com/shop/SelineLounge",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Output: true
Explanation: Possible partition [1,1],[2,2],[3,3],[4,4].
Example 2:
Input: deck = [1,1,1,2,2,2,3,3]
Output: false
Explanation: No possible partition.
Example 3:
Input: deck = [1]
Output: false
Explanation: No possible partition.
Example 4:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from contextlib import contextmanager
@contextmanager
def managed(sessionClass, auto_flush=False, auto_commit=False, callback=None):
session = sessionClass()
session.autoflush = auto_flush
session.autocommit = auto_commit
try:
yield session
session.commit()
except:
session.r... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/*var host;
if(!process.env.IN_DOCKER) {
host = 'localhost'
} else {
host = process.env.POSTGRES_HOST
}*/
const config: ConnectionOptions = {
type: "postgres",
host: process.env.POSTGRES_HOST || "localhost",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
berita = file_berita.read()
berita = berita.split()
berita = [x.lower() for x in berita]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
code: number;
/**
* @internal
* @hidden
*/
constructor(response: any);
}
//# sourceMappingURL=error.d.ts.map | ise-uiuc/Magicoder-OSS-Instruct-75K |
@testable import SwifterSwift
import XCTest
| ise-uiuc/Magicoder-OSS-Instruct-75K |
shuf_fts = shuf_fts.cuda()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return [self.transform_dict(i) for i in self.initial_data]
return self.transform_dict(self.initial_data)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from apscheduler.schedulers.blocking import BlockingScheduler
from util.logger import log
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
import random
import re
import sys
import os
def solve(s):
if s[0].isnumeric():
pass
else:
s = s[0].capitalize() + s[1:]
for x in range(len(s)) :
if x > 0 and s[x-1] == " ":
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def append_queue(name):
global queue
if name is not None:
queue.append(name)
def get_status():
global queue
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <ghostscript/gserrors.h>
#include <ghostscript/iapi.h>
using namespace std;
using namespace Nan;
using namespace v8;
class ghostscript : public AsyncWorker {
public:
ghostscript(Callback *callback, vector<string> args) : AsyncWorker(callback), args(args) {}
// Executes in worker thread
void Exec... | ise-uiuc/Magicoder-OSS-Instruct-75K |
assert_eq!(foo, CStr::from_bytes_with_nul(b"r#foobar\0").unwrap());
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(digital_root(24)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
assert is_overridden("validation_step", model=model)
with pytest.deprecated_call(match="and will be removed in v1.6"):
assert not is_overridden("foo", model=model)
def test_v1_6_0_early_stopping_monitor(tmpdir):
with pytest.deprecated_call(
match=r"The `EarlyStopping\(monitor\)` argume... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// UpcomingMovies
//
// Created by Bheem Singh on 4/6/19.
// Copyright © 2019 Bheem Singh. All rights reserved.
//
struct MovieAccountStateResult: Decodable {
let id: Int
let favorite: Bool
let watchlist: Bool
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Component({
selector: "popup-body",
templateUrl: "./body.component.html",
styleUrls: ["./body.component.css"]
})
export class BodyComponent implements OnInit {
@Input() fields: ReportField[];
constructor() {
console.log(this.fields);
}
ngOnInit() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if let _ = self.moneyVM.moneyReocod {
self.moneyVM.moneyReocod?.append(contentsOf: refreshGroup)
self.moneyVM.lastRequstCount = refreshGroup.count
} else {
self.moneyVM.moneyReocod = refreshGroup
| ise-uiuc/Magicoder-OSS-Instruct-75K |
patch_size: i32,
/// The threshold for how much brighter pixels need to be in a contiguous arc for FAST to detect a feature.
fast_threshold: i32,
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.map(x => x.name)
.includes(script.name);
if(registered) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
response = {
'result': result,
'status': 'success'
}
return response
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, context:BianContext,name:str,action_term:ActionTerms):
super(AbsBianEvent,self).__init__(context,name)
self.action_term = action_term
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from BusinessProcesses.PayrollDisbursements import *
from BusinessProcesses.Purchase import *
from BusinessProcesses.Sale import *
from BusinessProcesses.Tax import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker-compose -f ${COMPOSE_YAML} run ${DOCKER_CONTAINER} wait-for-postgres.sh postgres_${DOCKER_ENV}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
left_on="GEOID20",
right_on='GEO_ID_SHORT',
how='inner'))
counts_for_2010 = (merged.assign(
CRRALL = merged.CRRALL * merged.HUCURPCT_T10.div(100.0),
CRRINT= merged.CRRINT * merged.HUCURPCT_T10.div(100.0),
DRRALL = merged.DRRALL* merged.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'''
Applies fun to all keys in data.
The method is recursive and applies as deep as possible in the dictionary nest.
Parameters:
data : Mapping or List
Data to modify, must be either a dictionary or a list of dictionaries.
fun : function | lambda
Function to app... | ise-uiuc/Magicoder-OSS-Instruct-75K |
$pages_list = $stmt->fetchAll();
$smarty->assign('pages_list',$pages_list);
?> | ise-uiuc/Magicoder-OSS-Instruct-75K |
eprintln!("Error sanity checking xpub Unvault descriptor: '{:?}'", e);
process::exit(1);
});
desc_san_check(cpfp_desc.clone().inner()).unwrap_or_else(|e| {
eprintln!("Error sanity checking xpub CPFP descriptor: '{:?}'", e);
process::exit(1);
});
let secp = secp256k1::Sec... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import net.patowen.tempotool.TickerSource;
public class BeatMackTickerSource implements TickerSource {
private BeatFunction beatFunction;
public BeatMackTickerSource(BeatFunction beatFunction) {
this.beatFunction = beatFunction;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
T = [(3, 123), (1, 456), (2, 789)]
photo_to_remember(T)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <soc/m4/stm32l4/peripherals/WWDG.hpp>
// cml
#include <cml/bit_flag.hpp>
#include <cml/debug/assertion.hpp>
// soc
#include <soc/Interrupt_guard.hpp>
namespace {
using namespace soc::m4::stm32l4::peripherals;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export class UpdateUserBranchesBranchDto {}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
----------
voice : str
`libs`に読み込まれているライブラリの指定です。
`load_libs`で読み込むことができます。
例:`f1` (ゆっくり霊夢)
file_path : str
生成した音声データを書き込むファイルのパスです。
text : str
音声合成する文字列です。
speed : int, default 180
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</head>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// Created by Samuel on 3/13/18.
// Copyright © 2018 Samuel. All rights reserved.
//
import XCTest
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class UnfollowUserCommand {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ALLOWED_HOSTS += [
'mtls.wott.io'
]
INSTALLED_APPS += [
'django_prometheus',
]
MIDDLEWARE += [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace ralab
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ComOrganizationProductCaches.dict_boolean.storage = dict0
XCTAssertEqual(ComOrganizationProductCaches.dict_boolean.value(), dict0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
} //End Method
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@EnableBinding({ EntityProducerChannel.class, AtContextProducerChannel.class }) // enable channel binding with topics
@Import({CommonKafkaConfig.class, SwaggerConfigDetails.class})
public class EntityHandler {
public static void main(String[] args) {
SpringApplication.run(EntityHandler.class, args);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
No project-specific makefile found at [$mf].
This is not technically a problem, but please ensure that your
tree does not need this file. If it does not, then please
call 'touch $tmpl' to create an empty one.
EOF
return 1
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mark_loadbalancer_active = database_tasks.MarkLBActiveInDB()
mark_loadbalancer_active.execute(self.loadbalancer_mock)
repo.LoadBalancerRepository.update.assert_called_once_with(
'TEST',
LB_ID,
provisioning_status=constants.ACTIVE)
self.assertEqual(0,... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/sh
#php -f yii migrate --interactive=0 --migrationPath=@backend/migrations
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'net': ['Net Power usage', 'net_power_meter', 'kWh', 'mdi:gauge', 'electric-meter.png'],
'p1': ['Power Meter Low', 'power_meter_low', 'kWh', 'mdi:gauge', 'energy.png'],
'p2': ['Power Meter High', 'power_meter_high', 'kWh', 'mdi:gauge', 'energy.png'],
'n1': ['Power Delivery Low', 'power_delivery_low', 'k... | ise-uiuc/Magicoder-OSS-Instruct-75K |
print(permutacijsko_stevilo()) | ise-uiuc/Magicoder-OSS-Instruct-75K |
def get_steering(self, event):
if self.img is None:
return
message = SteeringCmd()
message.enable = True
message.ignore = False
message.steering_wheel_angle_cmd = self.steering
self.pub.publish(message)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# ∀ e1:E,e2:E. p(e1) = p(e2) ⇒ dport(e1) = dport(e2) (dport is a function of the packet)
# ∀ e1:E,e2:E. p(e1) = p(e2) ⇒ sport(e1) = sport(e2) (sport is a function of the packet)
# ∀ e1:E,e2:E. p(e1) = p(e2) ⇒ origin(e1) = origin(e2) (origin is a function of the packet)
# ∀ e1:E,e2:E. p(e1) = p(e2) ⇒ src_P(e1) ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
using Microsoft.EntityFrameworkCore;
using TodoAPI.Entities;
namespace TodoAPI
{
public class TodoContext : DbContext
{
public DbSet<Project> Projects { get; set; }
public DbSet<User> Users { get; set; }
public DbSet<UserProject> UserProjects { get; set; }
public DbSet<TodoList>... | ise-uiuc/Magicoder-OSS-Instruct-75K |
export { default as majorScale } from './src/majorScale'
export { default as minorScale } from './src/minorScale'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from padatious import IntentContainer
except ImportError:
LOG.error("padatious not found, run")
LOG.error("pip install fann2==1.0.7")
LOG.error("pip install padatious>=0.4.5")
raise
class NeuralNER(RuleNER):
def __init__(self):
# TODO XDG
cache = expanduser("~/.simple_NER")
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return PatternMatchUtils.simpleMatch(pattern, text.toString());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
private List<String> getWords() throws IOException {
// read file
InputStream is = HashConflictTester.class.getClassLoader().getResourceAsStream("web2.txt");
List<String> lines = IOUtils.readLines(is, "UTF-8");
return lines;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# print "Get current get_user"
# print self.get_user()
# if not self.get_user():
# self.transient_student = True
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>JordanMicahBennett/DeepBrainSeg
from .Tester import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private readonly componentWrapper;
constructor();
/**
* Every navigation component in your app must be registered with a unique name.
* The component itself is a traditional React component extending React.Component.
*/
registerComponent(componentName: string | number, componentProvider: ... | 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.