seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
DATASET_REGISTRY = {}
def dataset_register(tag, splits):
def __inner(f):
DATASET_REGISTRY[tag] = (splits, f)
return f
return __inner
def data_abspath(sub_path):
path = os.path.join(DATA_ROOT, sub_path)
return path
Corpus = namedtuple('Corpus', 'tag path lang')
def sanity_check(collecti... | ise-uiuc/Magicoder-OSS-Instruct-75K |
assertAnnotationEquals(LABEL_ANNOTATION, actual);
}
@Test
@SuppressWarnings("ConstantConditions")
public void testTransformEmptyAnnotation() {
String outputFieldName = "extracted";
Schema schema = Schema.recordOf("transformed-record-schema",
Schema.Field.of("path", Schema.of(Schema.Type.STRIN... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-11-22 15:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('page_edits', '0014_delete_whatsappnumber'),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
params1['max_depth'] = 5
params1['subsample'] = 0.6
params1['colsample_bytree'] = 0.5
params1['n_estimators'] = 580
params2 = {}
params2['objective'] = 'binary:logistic'
params2['booster'] = 'gbtree'
params2['learning_rate'] = 0.02
params2['max_depth'] = 5
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert anon._valid_operation("nullifys") is False
def test_should_get_true_for_delete_operations(anon):
assert anon._delete_operation("delete")
def test_should_get_Nullify_instance(anon):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_sort_features_by_priority_different_model(sample_features):
# test the ordering of feature importance computation when prior feature importance computation from a different fitted model was done
prev_importance_df = evaluated_fi_df_template(sample_features)
using_prev_fit_fi = sample_features[-2:]
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import cartopy.crs as ccrs
import cartopy.io.shapereader as shpreader
import matplotlib.pyplot as plt
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if [[ "$PROTOCOL" != "http" ]] && [[ "$PROTOCOL" != "https" ]] ; then
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private void terminate() {
}
public void start(Properties properties, JobTerminationListener jobTerminationListener) throws JobException {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.queueManager.getName(), toString() + "/start, properties=" + properties + " ...");
this... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class EvaluationConfigMixin(object):
##################################################################################################
SECTION_NAME = "evaluation"
EVALUATION_DB_CONFIG_FIELD_NAME = "evaluation_database_file_path"
DEFAULT_EVALUATION_DB_NAME = "evaluation_database.sqlite"
#########... | ise-uiuc/Magicoder-OSS-Instruct-75K |
b: String::from("y devoraron el fruto de sus campos.")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
calendar_id=cfg.calendar_id,
),
)
@app.template_filter()
def parse_tz_datetime(datetime_str):
return parse(datetime_str).replace(tzinfo=ZoneInfo(app.config["display_timezone"]))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cp -f bin/post-update .git/hooks/post-update
git config receive.denyCurrentBranch ignore
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
SpecialCelestialPointParamCount = CelestialBodyParamCount,
};
private:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// <summary>
/// Sort by updated at.
/// </summary>
[QueryParameterValue("updated_at")]
UpdatedAt,
/// <summary>
/// Sort by views.
/// </summary>
[QueryParameterValue("views")]
Views
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
model.apply(weights_init_normal)
# If specified we start from checkpoint
if pretrained_weights:
if pretrained_weights.endswith(".pth"):
model.load_state_dict(torch.load(pretrained_weights))
checkpoint_name = pretrained_weights.split("/")[-1].split(".")[0]
else:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
parser.add_argument('store_name',
type=str,
required=True,
help="Every Store needs a NAME"
)
parser.add_argument('item_name',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def average_of_the_best():
avg_best = -1000000000000
abr_best = ''
for scheme in results.keys():
avg_tmp = np.mean(results[scheme][reward_key])
if avg_best < avg_tmp:
avg_best = avg_tmp
abr_best = scheme
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use bigint::{Address, H256, U256};
use rlp::{Encodable, RlpStream};
#[derive(Debug)]
pub struct Log {
pub address: Address,
pub data: U256,
pub topics: Vec<H256>,
}
impl Encodable for Log {
fn rlp_append(&self, s: &mut RlpStream) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
guard (1...16).contains(n) else {
fatalError("OP_N can be initialized with N between 1 and 16. \(n) is not valid.")
}
self.n = n
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_ping(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
private func initTitleLabel() {
let lbl = UILabel()
lbl.translatesAutoresizingMaskIntoConstraints = false
self.addSubview(lbl)
NSLayoutConstraint.activate([
lbl.centerXAnchor.constraint(equalTo: self.centerXAnchor),
lbl.centerYAnchor.constrain... | ise-uiuc/Magicoder-OSS-Instruct-75K |
changed_graph[j][0] = min(vertices[i])
if changed_graph[j][1] in vertices[i]:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub mod hid_device;
pub mod megatec_hid_ups;
pub mod ups;
pub mod voltronic_hid_ups;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ComputeSchedule {
_compute_units: _items.to_vec(),
_index: 0,
}
}
}
impl Iterator for ComputeSchedule {
type Item = Vec< ComputeUnit >;
fn next( & mut self ) -> Option< Self::Item > {
if self._index >= self._compute_units.len() {
None
} el... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
interface = await async_check_form(hass, interface_data=interface_data)
assert interface.get(IF_HMIP_RF_NAME) is None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>Solutions/LargestRectangle_Tests.cs
using NUnit.Framework;
namespace CodingChallenges.Solutions.LargestRectangle
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public Commerciante()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
prev = 2 # Resume from special cases
for i in range(n-2): # omit the first two steps
temp = preprev
preprev = prev # update preprev for next iter
prev = prev + temp # update prev for next iter
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return MagicMock()
@op(out={"all_articles": Out(is_required=True), "nyc_articles": Out(is_required=False)})
def fetch_stories():
tree = ET.fromstring(requests.get(ARTICLES_LINK).text)
all_articles = []
nyc_articles = []
for article in tree[0].findall("item"):
all_articles.append(article)... | ise-uiuc/Magicoder-OSS-Instruct-75K |
data = try! Data(contentsOf: url)
}
self.statusCode = statusCode
self.callbackError = callbackError
}
public init(jsonString: String, statusCode: Int = 200, callbackError: Error? = nil) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super(Prenet, self).__init__()
self.embedding = nn.Embedding(vocab_size, hidden_size)
self.net = nn.Sequential(OrderedDict([
('fc1', nn.Linear(256, 256)),
('relu1', nn.ReLU()),
('dropout1', nn.Dropout(0.5)),
('fc2', nn.Linear(256, 128)),
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
decoder_device = 'cpu' if rali_cpu else 'mixed'
self.decode = ops.ImageDecoderRaw(user_feature_key_map=feature_key_map, device=decoder_device, output_type=types.RGB)
#self.res = ops.Resize(device=rali_device, resize_x=crop[0], resize_y=crop[1])
self.cmnp = ops.CropMirrorNormalize(device="cpu",
output... | ise-uiuc/Magicoder-OSS-Instruct-75K |
for offset, exponent in zip([0, 1.5, 3], [1, 2, 5]):
_ = plotter.add_mesh(pv.Plane((offset, 0, 0)), color='white')
light = pv.Light(position=(offset, 0, 0.1), focal_point=(offset, 0, 0))
light.exponent = exponent
light.positional = True
light.cone_angle = 80
plotter.add_light(light)
plotter.view... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "../../Utils/Configuration.hpp"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import Foundation
public class Weak<T: AnyObject> {
public weak var value : T?
public init(value: T?) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
body:Body
}
impl Response<Body>{
fn new() ->Self{
Response{
body:Body
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
raise NotImplementedError('must be implemented by subclass')
def remove_min(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for (let index = 0; index < startPath.length - 1; ++index) {
const fieldIndex = startPath[index].x * boardSize + startPath[index].y;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class FormRequest extends Request
{
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// <returns>True if successful.</returns>
[DllImport("libfilament-dotnet", EntryPoint = "filament_Image_KtxBundle_GetSphericalHarmonics")]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "http://www.list-org.com/list.php?okved=52.48.23&page="$i
#wget -r --no-parent -l 0 "http://www.list-org.com/list.php?okved=52.48.23&page="$i -O $i
konqueror "http://www.list-org.com/list.php?okved=52.48.23&page="$i
#firefox "http://www.list-org.com/list.php?okved=52.48.23&page="$i
done | ise-uiuc/Magicoder-OSS-Instruct-75K |
# optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
optimizer = RAdam(model.parameters(),
lr=learning_rate,
betas=(0.9, 0.999),
weight_decay=6.5e-4)
scheduler_after = torch.optim.lr_scheduler.StepLR(optimizer,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fi
if [[ $MACOSX_DEPLOYMENT_TARGET == "10.6" || $MACOSX_DEPLOYMENT_TARGET == "10.7" || $MACOSX_DEPLOYMENT_TARGET == "10.8" ]]; then
./configure FFLAGS="-m64" CFLAGS="-std=gnu99 -g -O2" CXXFLAGS="-std=gnu99 -g -O2" --without-jpeglib --disable-R-framework --enable-R-shlib --disable-openmp --withou... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return .double(value)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>joakiti/Benchmark-SubsetSums
from unittest import TestCase
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import jwt
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// + (instancetype)
// stringWithCString:(const char *)cString
// encoding:(NSStringEncoding)enc
//===--------------------------------------------------------------------===//
//===--- Adds nothing for String beyond what String(s) does -------------===//
// + (instancetype)stringWithString:(NSStrin... | ise-uiuc/Magicoder-OSS-Instruct-75K |
content = self._get_availcgi()
data = json.loads(content)
self.report = data['avail']['service_availability']['services']
except (requests.RequestException, socket.timeout) as e:
raise IcingaError('failed to connect: ' + str(e))
except (ValueError, KeyErro... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if(!r) puts("YES");
else puts("NO");
}
return 0;
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
long_description=long_description,
url=pynumenc_meta.__url__,
author=pynumenc_meta.__author__,
author_email=pynumenc_meta.__author_email__,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
intro += self.rdb.intro
intro += "\n> {}\n-> {}".format(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print('Fahrenheit equivalent: ', format(degreesFahrenheit, ',.1f'), '\n', sep='') | ise-uiuc/Magicoder-OSS-Instruct-75K |
</td>
<td>
<button type="button" class="btnquitar btn btn-danger"> <i class="material-icons">delete</i></button>
</td>
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Reader of field `TPCLR`"]
pub type TPCLR_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TPCLR`"]
pub struct TPCLR_W<'a> {
w: &'a mu... | ise-uiuc/Magicoder-OSS-Instruct-75K |
queries.append(row[i])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
GenericGameEvent e = target as GenericGameEvent;
if (GUILayout.Button("Raise"))
e.Raise();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from tempest.lib import decorators
from tempest import test
from tempest import config
CONF = config.CONF
LOG = log.getLogger(__name__)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else: return 'True'
elif obj[6]>2.0:
return 'True'
else: return 'True'
elif obj[1]>2:
# {"feature": "Passanger", "instances": 26, "metric_value": 0.3401, "depth": 7}
if obj[0]<=2:
# {"feature": "Direction_same", "instances": 19, "metric_value": 0.4145, "depth": ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
Action::ProtocolRunnerInitCheckGenesisApplied(_) => {
state.protocol_runner = ProtocolRunnerInitState::CheckGenesisApplied {}.into();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name = models.CharField(max_length=255, null=False, blank=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<i><img class="social-media" src=" {{ URL::to('/')}}/images/iconmonstr-instagram-11.svg " alt=""></i>
<i><img class="social-media" src=" {{ URL::to('/')}}/images/iconmonstr-twitter-3.svg " alt=""></i>
</div>
<div class="footer__layover-flexers flexer-2">
<p class="city">Tallinn</p>
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return [{"type": 'none'}]
def resolve_wait_action(originator, flags):
return [{"type": 'wait'}]
def resolve_move_action(originator, flags):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
views.AnimeUserAllCountAPI.as_view(),
),
path(
"v1/statistics/anime-store/anime-room-alive-count",
views.AnimeRoomAliveCountAPI.as_view(),
),
path(
"v1/statistics/anime-store/anime-user-alive-count",
views.AnimeUserAliveCountAPI.as_view(),
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
auto foundIter = m_nodesByAddress.find(addr);
if (foundIter == m_nodesByAddress.end())
{
return nullptr;
}
return foundIter->second->shared_from_this();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub type REGSC = crate::Reg<u8, _REGSC>;
#[allow(missing_docs)]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import re
str_example = 'Hello Python world' # search for a substring that begins with the word "Hello" followed by zero or more tabs
match = re.match('Hello[\t]*(.*)world', str_example) # or space, followed by arbitrary c... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php
namespace Oro\Bundle\LocaleBundle\Tests\Unit\Form\Type\Stub;
use Oro\Bundle\LocaleBundle\Entity\AbstractLocalizedFallbackValue;
class CustomLocalizedFallbackValueStub extends AbstractLocalizedFallbackValue
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
template <typename Interface>
void BindInterface(mojo::PendingReceiver<Interface> receiver,
const BinderCallback& binder_callback) {
binder_callback.Run(Interface::Name_, receiver.PassPipe());
}
} // namespace
namespace ui {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
unset http_proxy
unset https_proxy
unset no_proxy
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
MagicPanels.panelMove("Xp")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public function index(){
$pages = ModelsPage::all();
}
public function show($id){
$page = ModelsPage::findOrFail($id);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
full_matrix_projection(input=m7)],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div id="dot" style="position:absolute;top:0px;left:0px;width:30px;height:30px;">
<img src="img/f14_N.png" width="30px" height="30px" id="plane">
</div>
<div id="xmark" style="position:absolute;top:0px;left:0px;width:20px;height:20px;">
<img src="img/xmark.gif" width="20px" height="20px" id="xmk">
</div>
</body>
</ht... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
return 0;
}
/*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def on_passport_data(self, msg):
chat_id, passport_data = telepot.glance(msg, flavor='all_passport_data')
output = clean_data(bot, passport_data, 'TestFiles/private.key')
def on_poll_data(self, msg):
poll_id, extra_data, chat_id = telepot.glance(msg, flavor='poll_data')
print(p... | ise-uiuc/Magicoder-OSS-Instruct-75K |
mode='fan_in',
nonlinearity='relu'
)
nn.init.constant_(m.bias.data, 0.)
def forward(self, input):
input = input.to(self.device)
return self.net(input)
def _linear_init(self, m):
nn.init.kaiming_normal_(
m.weight.data, 0.,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from sys import stdin
n = stdin.readline().strip().split()[0]
print '%c%c%c' % (n[2], n[1], n[0])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class APIDataManager {
static var appToken : String?
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if len(self.lista) < self.heap_size:
self.lista.append(chave)
else:
self.lista[self.heap_size - 1] = chave
i = self.heap_size - 1
while i > 0 and self.lista[MaxHeap.pai(i)] < chave:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
FcCrestComponent,
AlarmGroupNamePopupComponent,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import datetime
'''
Takes a time in seconds and returns a string hh:mm:ss
'''
# Round to the nearest second.
elapsed_rounded = int(round((elapsed)))
# Format as hh:mm:ss
return str(datetime.timedelta(seconds=elapsed_rounded))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self):
self.name = ""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Filter {
name: Some("architecture".to_string()),
values: Some(vec![arch.into()]),
},
Filter {
name: Some("image-type".to_string()),
values: Some(vec!["machine".to_string()]),
},
Filter {
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
accRecord.append(0.0)
if not args.test:
train(epoch)
if (epoch == times-1):
test(epoch, args.dump_act)
else:
test(epoch, args.dump_act)
print('best_acc: {0}'.format(best_acc))
for i in range(0, times):
print(accRecord[i])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return math.sqrt(v[0]**2 + v[1]**2 + v[2]**2)
def vec_dot(v1, v2):
return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]
def vec_angle(v1, v2):
return math.acos(clamp(vec_dot(v1, v2)/(vec_magnitude(v1)*vec_magnitude(v2)), -1, 1)) # clamp because of floating point errors
def vec_normalize(v):
length = vec_magnitude(v)
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
Doing so is recommended by flask documentation:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
case begining
case center
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'''
import requests
import sys
import datetime
from bs4 import BeautifulSoup
#Get the URL
url = sys.argv[1]
r = requests.get(url)
response = requests.get(url)
#Parse the XML
tree = BeautifulSoup(response.content,'lxml-xml')
#Write it out to XML
with open('ISM_{0}.yaml'.format(datetime.datetime.now().strftime('%H%M%S_%... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from Jumpscale import j
from JumpscaleBuilders.runtimes.BuilderGolangTools import BuilderGolangTools
builder_method = j.baseclasses.builder_method
import xml.etree.ElementTree as etree
import time
| ise-uiuc/Magicoder-OSS-Instruct-75K |
True PARA ATIVAR E False PARA DESATIVAR
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from QGrain.main import * | ise-uiuc/Magicoder-OSS-Instruct-75K |
def show_endpoint(self, endpoint_id):
"""Get endpoint."""
resp_header, resp_body = self.get('endpoints/%s' % endpoint_id)
self.expected_success(200, resp_header.status)
resp_body = json.loads(resp_body)
return rest_client.ResponseBody(resp_header, resp_body)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "OpenJigWare.h"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
class Timestampable extends \Model\Base\Timestampable
{
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
default_app_config = "address.apps.AddressConfig"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
session.mount('http://', adapter)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Context(dict):
"""Model the execution context for a Resource.
"""
| 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.