seed
stringlengths
1
14k
source
stringclasses
2 values
function testCase(fn: (nums: number[]) => number) { it.each([ [ [7, 1, 5, 4], 4, ],
ise-uiuc/Magicoder-OSS-Instruct-75K
import sys, traceback
ise-uiuc/Magicoder-OSS-Instruct-75K
// Console.WriteLine((io == null? "P" : io.Name + " " + (edge.LNode.Feature==null)) + " " + edge.RNode.FragmentIonClassBase.Name + " " + (edge.RNode.Feature==null) + " " + edge.NodeScore + " " + edge.RatioScore + " " + edge.LcScore + " " + edge.ImsScore); } } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
byte_vals_dict : dict
ise-uiuc/Magicoder-OSS-Instruct-75K
&'static [&'static dyn for<'a> Fn( &'a mut Self, ) -> component_future::Poll< (), Error, >] = &[ &Self::poll_read_client, &Self::poll_read_process,
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>10-100 import urllib, json class Vicopo: @staticmethod def get(search, protocol = 'https'): response = urllib.urlopen(protocol + '://vicopo.selfbuild.fr/search/' + str(search)) return json.loads(response.read()) @staticmethod def http(search): return Vicopo.get(search,...
ise-uiuc/Magicoder-OSS-Instruct-75K
//MARK: internal class func factoryMapRange(stops:[DPlanStop]) -> MCreateSaveMapRange? { let mapPoints:[MKMapPoint] = factoryMapPoints(stops:stops)
ise-uiuc/Magicoder-OSS-Instruct-75K
@if($entityFieldDeletedAt)
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace p4api.net.unit.test { /// <summary> ///This is a test class for ClientMetadataTest and is intended ///to contain all ClientMetadataTest Unit Tests ///</summary> [TestClass()] public class ClientMetadataTest { private static Logger logger = LogManager.GetCurrentClassLogger(); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by Carlos Alcala on 6/12/21. // Copyright © 2021 TheMovieDBApp. All rights reserved.
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Perform all deployment tasks sequentially """
ise-uiuc/Magicoder-OSS-Instruct-75K
article_new_tpl.reg_nav(&mut data).await; article_new_tpl.reg_sidebar(&mut data).await; article_new_tpl.reg_footer(&mut data).await; article_new_tpl.reg_script_value_check().await; article_new_tpl.reg_script_website_svg().await; let build_query =...
ise-uiuc/Magicoder-OSS-Instruct-75K
> <div className="DatePicker" ref={datePickerRef}> <div className="DatePicker-container"> <DayPicker className="Range" numberOfMonths={1} selectedDays={selectedDays} disabledDays={disabledDays} modifiers={modifiers} onDa...
ise-uiuc/Magicoder-OSS-Instruct-75K
Grow, Responsive }
ise-uiuc/Magicoder-OSS-Instruct-75K
} } // end of namespace BABYLON
ise-uiuc/Magicoder-OSS-Instruct-75K
for elem in a: mprint('*'*10, elem, '*'*10)
ise-uiuc/Magicoder-OSS-Instruct-75K
def send_team_invite(self, invited_by): secret = self.generate_invite_secret() url_kwargs = { "pk": self.member.pk, "secret": secret, } url = '%s%s' % ( settings.SITE_URL, reverse('team-join', kwargs=url_kwargs),
ise-uiuc/Magicoder-OSS-Instruct-75K
export const MySwal = withReactContent(Swal);
ise-uiuc/Magicoder-OSS-Instruct-75K
self._setup_response(mock, data, code) with self.assertRaises(UnexpectedResponseCodeError) as cm: self.service.get_account_state() self.assertEqual(cm.exception.status_code, code)
ise-uiuc/Magicoder-OSS-Instruct-75K
from .role import Role from .user import User from .logs import AnalysesLog
ise-uiuc/Magicoder-OSS-Instruct-75K
if not skip: final_text += char skip = False return final_text
ise-uiuc/Magicoder-OSS-Instruct-75K
assert comments assert len(comments) == 1 assert comments[0].comment.text == INVALID_CODE_MESSAGES def test_valid_solution(self, solution: models.Solution): solution_file = solution.solution_files.get() solution_file.path = 'index.css' solution_file.code = VALID_CODE...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.pos_x, self.pos_y, self.img_idx, self.start_x,
ise-uiuc/Magicoder-OSS-Instruct-75K
init(rxRequester: RxRequester, servicesRepository: ServicesRepository) { self.rxRequester = rxRequester self.servicesRepository = servicesRepository } func addPost(request: AddPostRequest) -> Single<Success> { Single.just(Success()) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# соответствующими данными и покажите веса. # import eli5 from eli5.sklearn import PermutationImportance
ise-uiuc/Magicoder-OSS-Instruct-75K
#so I created this function to do that.
ise-uiuc/Magicoder-OSS-Instruct-75K
\__ \ V V / _` | '_| ' \ / _ \/ _` / -_) ' \ _| |___/\_/\_/\__,_|_| |_|_|_| /_/ \_\__, \___|_||_\__| |___/ """ from .control.task_manager import RemoteTaskManager from drivers import SwarmBot import settings
ise-uiuc/Magicoder-OSS-Instruct-75K
if ( ( blit::pressed( blit::Button::DPAD_LEFT ) ) || ( blit::joystick.x < -0.3f ) ) { l_move = DIR_LEFT; l_target = l_location - blit::Point( 2, 0 ); l_crate_target = l_location - blit::Point( 4, 0 ); } if ( ( blit::pressed( blit::Button::DPAD_RIGHT ) ) || ( blit::joystick.x > 0.3f ) ) {
ise-uiuc/Magicoder-OSS-Instruct-75K
<!-- Main content --> <div class="content"> <div class="container-fluid"> <div class="card card-default color-palette-box"> <div class="card-header"> </div> <div class="card-body"> <table class="table table-bordered"> ...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo Html::tag('h2', $this->title, ['class' => 'empty-state__title']); echo Html::tag('p', $this->description, ['class' => 'empty-state__description']);
ise-uiuc/Magicoder-OSS-Instruct-75K
self.ifGoOnMessageVar = tkinter.StringVar() # button self.editButtonVar = tkinter.StringVar() self.language() self.missionSystemTools = missionSystem.MissionSystem() def language(self): """ 语言切换,暂时不做外部调用(即每次重启生效) :return: """ language...
ise-uiuc/Magicoder-OSS-Instruct-75K
}) else: return render(request, "imageais/login.html") def logout_view(request): if request.method == "GET": logout(request) return HttpResponseRedirect(reverse("index"))
ise-uiuc/Magicoder-OSS-Instruct-75K
await sut.ProcessAsync(context, msg); handler.Invoked.Should().BeTrue(); handler2.Invoked.Should().BeTrue(); } [Fact] public async Task Should_let_exceptions_flow_to_allow_caller_to_decide_appropiate_response() { var scope = Substitute.Fo...
ise-uiuc/Magicoder-OSS-Instruct-75K
import os from kwiklib.utils.globalpaths import ensure_folder_exists # -----------------------------------------------------------------------------
ise-uiuc/Magicoder-OSS-Instruct-75K
def grid_gaintable_to_screen(vis, gaintables, screen, height=3e5, gaintable_slices=None, scale=1.0, **kwargs): """ Grid a gaintable to a screen image The phases are just average per grid cell, no phase unwrapping is performed. :param vis: :param sc: Sky components for which pierce points are nee...
ise-uiuc/Magicoder-OSS-Instruct-75K
sequences.get(0).ok_or_else(|| { errors::RosalindParseError::InputFormatError(String::from("first sequence missing")) })?, sequences.get(1).ok_or_else(|| { errors::RosalindParseError::InputFormatError(String::from("second sequence missing")) })?, ); let ou...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.network_refresh(self.network_indicator) self.header_container.grid_columnconfigure(1, weight=1) self.grid_columnconfigure(0, weight=1) #Divider between header and content self.divider = tk.Canvas(self) self.divider.configure(bg=config.primary_color, height=...
ise-uiuc/Magicoder-OSS-Instruct-75K
print table if __name__ == '__main__': # Enable debugging cgitb.enable() form = cgi.FieldStorage() # Run the minimization for a line list formDict = cgi2dict(form) parameters = ew(formDict, name=formDict['linelist']) sendEmail(to=formDict['email'], driver='EWmethod', data='/tmp/EWres...
ise-uiuc/Magicoder-OSS-Instruct-75K
replace = True outfile = "nccstriptmp" else: replace = False write = open (outfile, "w").write def output (x): global outlines outlines += 1
ise-uiuc/Magicoder-OSS-Instruct-75K
nmcli c add type ovs-port conn.interface mgmt-tier2 master br-prod ovs-port.tag 4094 con-name br-prod-vlan4094 nmcli c add type ovs-interface slave-type ovs-port conn.interface netinfra-tier3 master br-prod-vlan1 con-name br-prod-vlan1-if0 ipv4.method static ipv4.address 172.16.0.253/24 nmcli c add type ovs-interface s...
ise-uiuc/Magicoder-OSS-Instruct-75K
templar.run(templar.flags([ '-s', os.path.join(TEST_DATA, 'file.md'), '-c', os.path.join(TEST_DATA, 'config.py'), '-t', 'template.html', '-d', destination_file, '--debug', ])) self.assertTrue(os.path.isfile(destination_file)) wi...
ise-uiuc/Magicoder-OSS-Instruct-75K
LOGGER.exception(message) raise ComputeUpgradeError(message) from request_exception LOGGER.debug("%s request to %s got response with status code %d", request_function.__name__, url, resp.status_code) LOGGER.debug("response body: %s", resp.text) return resp
ise-uiuc/Magicoder-OSS-Instruct-75K
# if clock is specified this function is periodically called every # clk tick, when agent is enabled
ise-uiuc/Magicoder-OSS-Instruct-75K
★ / / / / ★ Ballots ======= >>> rows, cols = 3, 25 >>> coor, number = coordinates(rows), numbering(rows) >>> linears = recursive_structures((ballot_shapes, 'linear'), 1, (coor, number)) >>> representations = map(make_pretty((rows, cols),), linears) >>> print(next(representa...
ise-uiuc/Magicoder-OSS-Instruct-75K
make install protoc --version cd $curdir
ise-uiuc/Magicoder-OSS-Instruct-75K
if self._current_retries < self._max_retry_count: self._current_retries += 1 self._set_timeout(self._idle_time) self._retry_func(*self._retry_args) else: self._handle_timeout() de...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.u2=np.empty(self.size) def op(self,Meth,InOut,dt): Meth(InOut,self.u1) self.u1=InOut + dt*self.u1
ise-uiuc/Magicoder-OSS-Instruct-75K
new DocBlockTag({ tagName: '@public' }), new DocPlainText({ text: ' para 2 ' }), new DocSoftBreak({ }), new DocSoftBreak({ }), new DocPlainText({ text: ' para 3 ' }) ]); docSection.appendNode(docParagraph);
ise-uiuc/Magicoder-OSS-Instruct-75K
export default withConfig(JsonVisio);
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright (C) 2018 <NAME> // All rights reserved. // // This software source file is licensed under the terms of MIT license. // For details, please read the LICENSE file. //
ise-uiuc/Magicoder-OSS-Instruct-75K
from utils import CSVScraper class StrathconaCountyPersonScraper(CSVScraper): # https://data.strathcona.ca/County-Government/County-Council-2013-2017/suw8-zxcy csv_url = 'https://data.strathcona.ca/api/views/suw8-zxcy/rows.csv?accessType=DOWNLOAD'
ise-uiuc/Magicoder-OSS-Instruct-75K
return request({
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod components; mod config; pub mod entities; pub mod resources; mod state; pub mod systems; // public use so these things get documented pub use crate::bundle::GameBundle; pub use crate::config::GameConfiguration; pub use crate::config::GAME_CONFIGURATION; pub use crate::state::GameState; use amethyst::core::tra...
ise-uiuc/Magicoder-OSS-Instruct-75K
explicit = getattr(exc_value, '__cause__', None) suppress_context = getattr(exc_value, '__suppress_context__', None) implicit = getattr(exc_value, '__context__', None) return explicit or (None if suppress_context else implicit) def pprint(value):
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Package for reverse-engineering.""" from .rpa import *
ise-uiuc/Magicoder-OSS-Instruct-75K
disabled: Props['disabled'] animated: Props['animated'] } label: { disabled: Props['disabled'] size: Props['size'] uppercase: Props['uppercase'] animated: Props['animated'] } } } export default CheckTypes
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from './getActionInputs'
ise-uiuc/Magicoder-OSS-Instruct-75K
norms_2 = (y ** 2).sum(axis=1) y = np.transpose(y) prod = np.dot(x, y) prod = 2*prod norms_1 = norms_1.reshape(-1,1) sum = norms_1 + norms_2
ise-uiuc/Magicoder-OSS-Instruct-75K
int main(){ App app; app.showScreen(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>MTDzi/data_nanodegree_project_5<filename>script/generate_user.py import os from airflow import models, settings from airflow.contrib.auth.backends.password_auth import PasswordUser user = PasswordUser(models.User()) user.username = os.environ['AIRFLOW_UI_USER'] user.password = os.environ['AIRFLOW_UI_PASSWOR...
ise-uiuc/Magicoder-OSS-Instruct-75K
inputs, labels = batch[0], batch[1] self.optimizer.zero_grad(set_to_none=True) outputs = self.model(inputs)
ise-uiuc/Magicoder-OSS-Instruct-75K
module_src = "cgranges/python/cgranges.c" def build(setup_kwargs): """ This function is mandatory in order to build the extensions. """ setup_kwargs.update( { "ext_modules": [ Extension(
ise-uiuc/Magicoder-OSS-Instruct-75K
source()->GeneratePowerStateEvent(true); EXPECT_EQ(observers[0].power_state_changes(), 1); EXPECT_EQ(observers[0].last_power_state(), true); // Repeated indications the device is on battery power should be suppressed. source()->GeneratePowerStateEvent(true); EXPECT_EQ(observers[0].power_state_changes(), 1)...
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public XmlStreamReader(final InputStream is) throws IOException { this(is, true); } /** * Creates a Reader for a raw InputStream. * * <p>It follows the same logic used for files. * * <p>If lenient detection is indicated and the detection above fails as per specifications it * then att...
ise-uiuc/Magicoder-OSS-Instruct-75K
return ["What is your name?", "Where are you from?"]
ise-uiuc/Magicoder-OSS-Instruct-75K
for key in guess_result_test4: np.testing.assert_array_almost_equal(guess_result_test4[key], result4[key]) guess_result_test5 = { 'n0': [7.926677561000001], 'n1': [155.72513521595482], 'a': [15.57251352], 'c': [1557.251352] } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
print '[+] Added ObjectUtils'
ise-uiuc/Magicoder-OSS-Instruct-75K
public InetSocketAddress getTcpPort() { return tcpPort; } public void setTcpPort(InetSocketAddress tcpPort) { this.tcpPort = tcpPort; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
logger.info("Downloading {} files as network seeds.".format(len(download_list)))
ise-uiuc/Magicoder-OSS-Instruct-75K
} public void setMovies(List<Movie> movies) { this.movies = movies;
ise-uiuc/Magicoder-OSS-Instruct-75K
Self { header_slices: header_slices.clone(), sentry, slice_size, pending_watch: HeaderSliceStatusWatch::new( HeaderSliceStatus::Empty, header_slices, "FetchRequestStage", ), last_request_id: 0...
ise-uiuc/Magicoder-OSS-Instruct-75K
result = self.children_like(FieldReference) assert len(result) == 1
ise-uiuc/Magicoder-OSS-Instruct-75K
|-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains t...
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="box box-primary"> <div class="box-body table-responsive"> <div id='calendar'></div> </div> </div> </section> <!-- /.content --> </div> <div id="keterangan" class="modal fade" tabindex="-2" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="mod...
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public static int toAsciiBytes(String s, byte[] bytes, int ofs) { for (int i = 0; i < s.length(); ++i) { bytes[ofs++] = (byte) (s.charAt(i) & 0x7F); } return ofs; } /** * Convert a sequence of ASCII bytes into a string. Note that * no bounds checking is performed on the incoming bytes &#x2014; ...
ise-uiuc/Magicoder-OSS-Instruct-75K
send_sms.delay("18888888888")
ise-uiuc/Magicoder-OSS-Instruct-75K
It also contains a profile picture that is uploaded by the user. """
ise-uiuc/Magicoder-OSS-Instruct-75K
x0 = x y0 = y z0 = z # extract the image id corresponding to given countour # read that dicom file (assumes filename = sopinstanceuid.dcm)
ise-uiuc/Magicoder-OSS-Instruct-75K
def halt(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
guard microBlogApp.existsOnDisk, let article = (object as? ArticlePasteboardWriter)?.article, let _ = article.preferredLink else { return false } return true
ise-uiuc/Magicoder-OSS-Instruct-75K
provider (e.g. Twitter), and *not* a session between a user of your website and your website. """ def __init__(self, blueprint=None, base_url=None, *args, **kwargs): super().__init__(*args, **kwargs) self.blueprint = blueprint self.base_url = URLObject(base_url) invalida...
ise-uiuc/Magicoder-OSS-Instruct-75K
polar }; /* 1) here we cannot have 2 Point constructors for cartesian and polar
ise-uiuc/Magicoder-OSS-Instruct-75K
if rev1line == '': raise ValueError('Revision ' + rev1 + " was not found!") if rev2line == '': raise ValueError('Revision ' + rev2 + " was not found!") logLine1 = processLogLine(rev1line) logLine2 = processLogLine(rev2line) res = Result(logLine1.testname, logLine1.real, logLine2.rea...
ise-uiuc/Magicoder-OSS-Instruct-75K
update-rc.d -f ssh remove
ise-uiuc/Magicoder-OSS-Instruct-75K
# Configure iptables to enable NAT for eth0 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ise-uiuc/Magicoder-OSS-Instruct-75K
frgRec.name = "{}.fragment_at_{}".format(seqRec.name, str(i)) frgRec.position = i new_data.append(frgRec) i += stride j += 1 return self.__class__(new_data) def get_parents_rank_list(self): parents = defaultdict(list)...
ise-uiuc/Magicoder-OSS-Instruct-75K
import type { Fiber } from '.'; import { assert } from '../util/assert'; export function remove( fiber: Fiber, parent: Fiber, previous: null | Fiber, container: Node, ): null | Fiber { debug: { assert(fiber.parent === parent, 'fiber must be child of parent'); if (previous === null) {
ise-uiuc/Magicoder-OSS-Instruct-75K
class VLC: commands = { 'full screen': 'fullscreen', 'last': 'last', 'mute': 'mute', 'next': 'next',
ise-uiuc/Magicoder-OSS-Instruct-75K
from textify.api.views import NoteViewSet
ise-uiuc/Magicoder-OSS-Instruct-75K
url(r'^icon', icons), url(r'^chart', charts), url(r'^table', tables), url(r'^log', login),
ise-uiuc/Magicoder-OSS-Instruct-75K
//CHECK_THROWS() } TEST_CASE("JsonValue throws if and only if bad conversion happen. (Const version)", "[JsonValue]") { //No need to check for toNull : already covered in the non const version JsonValue val = false; const JsonValue& ref = val; CHECK_THROWS(ref.toString()); CHECK_THROWS(ref.toN...
ise-uiuc/Magicoder-OSS-Instruct-75K
req.rm_start_ts = int(time.time() * 1000) if req.method == "POST": # The next 4 lines are a workaround for a serious shortcoming in the # WSGI spec. # # The data can only be read once, after which the socket is exhausted ...
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 <?php declare(strict_types = 1); namespace Sop\PKCS5\PBEKD; use Sop\PKCS5\PRF\PRF; /** * Implements key derivation function #2 used in password-based cryptography. * * @see https://tools.ietf.org/html/rfc2898#section-5.2 */ class PBEKDF2 extends PBEKDF
ise-uiuc/Magicoder-OSS-Instruct-75K
} /*public List<User> getAllGroups(){ List<User> users = new ArrayList<User>(); try { connection = daoImpl.getConnection(); stmt = connection.createStatement(); rs = stmt.executeQuery("SELECT * FROM user"); while (rs.next()) { String id = rs.getString("user_id");
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- # from __future__ import print_function from perfplot.__about__ import ( __author__, __author_email__, __copyright__, __license__, __version__, __status__ )
ise-uiuc/Magicoder-OSS-Instruct-75K
* Time: 3:59 PM */ ?> <?php $this->load->view('header'); ?> <?php $this->load->view('footer'); ?>
ise-uiuc/Magicoder-OSS-Instruct-75K
import { RegistrationComponent } from './registration.component'; import { RegistrationService } from './registration.service'; @NgModule({ imports: [ CommonModule,FormsModule, ReactiveFormsModule ], declarations: [RegistrationComponent],
ise-uiuc/Magicoder-OSS-Instruct-75K
metadata={ "type": "Element", "namespace": "", }, ) ode: Optional["Physics.Ode"] = field( default=None, metadata={ "type": "Element", "namespace": "", }, ) name: str = field( default="default_physics",
ise-uiuc/Magicoder-OSS-Instruct-75K
<option value="{{$empleado->id}}">{{$empleado->nombre}}</option> @endforeach
ise-uiuc/Magicoder-OSS-Instruct-75K
from dedupe.core import randomPairs, randomPairsMatch, frozendict from dedupe.convenience import consoleLabel, trainingDataDedupe, trainingDataLink, canonicalize
ise-uiuc/Magicoder-OSS-Instruct-75K