seed
stringlengths
1
14k
source
stringclasses
2 values
@property def __name__(self) -> str: return self.name @property def commands(self) -> List["BaseCommand"]: """Get the commands from this Extension.""" return self._commands @property
ise-uiuc/Magicoder-OSS-Instruct-75K
self._uri = '/TrustProducts/{trust_product_sid}/ChannelEndpointAssignments'.format(**self._solution) def create(self, channel_endpoint_type, channel_endpoint_sid): """ Create the TrustProductsChannelEndpointAssignmentInstance :param unicode channel_endpoint_type: The type of channe...
ise-uiuc/Magicoder-OSS-Instruct-75K
"${BIN_PATH}/${TOOL_NAME}" --version else echo "${TOOL_NAME} already installed"
ise-uiuc/Magicoder-OSS-Instruct-75K
host: "postgresql-database", port: 5432, options: [ .databaseName("epicus"), .userName("postgres"), .password(ProcessInfo.processInfo.environment["DBPASSWORD"] ?? "nil"), ], poolOptions: ConnectionPoolOptions(ini...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright © 2018 apple. All rights reserved. // import XCTest class tip1UITests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occ...
ise-uiuc/Magicoder-OSS-Instruct-75K
if np.isnan(score_90lccv): self.assertTrue(score_10cv > r, msg=f"90lccv returned nan even though the {score_10cv} of 10CV is not worse than the threshold {r}. Pipeline was {pl} and dataset {dataset}") else: self.assertTrue(np.abs(score_10cv - score_90lccv) <= tol,...
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>10-100 default_app_config = ( 'oscar.apps.dashboard.partners.config.PartnersDashboardConfig')
ise-uiuc/Magicoder-OSS-Instruct-75K
addSubview(dialPlate) setupPointer()
ise-uiuc/Magicoder-OSS-Instruct-75K
class DotsAndLinesProgram : Program { override func draw() { let p = Point(x: 20, y: 15) let c = Color.Gold canvas[p] = c
ise-uiuc/Magicoder-OSS-Instruct-75K
T = TypeVar('T') class TreeNode(Generic[T]):
ise-uiuc/Magicoder-OSS-Instruct-75K
Returns ------- path : str
ise-uiuc/Magicoder-OSS-Instruct-75K
entry_points={'pytest11': ['testplan = pytest_testplan', ]}, )
ise-uiuc/Magicoder-OSS-Instruct-75K
//company that owns the vehicle private String company; //fleet number of the vehicle private String fleetNumber; //delay of the vehicle in minutes (must be 0 or greater)
ise-uiuc/Magicoder-OSS-Instruct-75K
x = o = 42
ise-uiuc/Magicoder-OSS-Instruct-75K
'api/mobile/openid' => 'mobile/openid', 'api/mobile/openid/<type>/<param:.*>' => 'mobile/openid', 'api/mobile/check-pay/<type>/<param:.*>' => 'mobile/check-pay', 'POST api/<c...
ise-uiuc/Magicoder-OSS-Instruct-75K
Description We need a function that can transform a string into a number. What ways of achieving this do you know? Note: Don't worry, all inputs will be strings, and every string is a perfectly valid representation of an integral number.
ise-uiuc/Magicoder-OSS-Instruct-75K
raise TypeError("Expected argument 'ip_configurations' to be a list") __self__.ip_configurations = ip_configurations """ The collection of IP Configurations with IPs within this subnet. """ if name and not isinstance(name, str): raise TypeError("Expected a...
ise-uiuc/Magicoder-OSS-Instruct-75K
import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { applyStyle } from '@boost/cli'; import { Input, MultiSelect, Select, SelectOptionLike } from '@boost/cli/react'; import { DEFAULT_FORMATS, DEFAULT_INPUT, DEFAULT_SUPPORT } from '../../constants'; import { Format, PackemonPackageConfig, P...
ise-uiuc/Magicoder-OSS-Instruct-75K
public class AccessControlMain extends Application { private Logger log = LoggerFactory.getLogger(AccessControlMain.class);
ise-uiuc/Magicoder-OSS-Instruct-75K
class ComposerServiceProvider extends ServiceProvider { /** * Register services. * * @return void */ public function register() { //
ise-uiuc/Magicoder-OSS-Instruct-75K
return rules_dict, messages
ise-uiuc/Magicoder-OSS-Instruct-75K
from sklearn.preprocessing import OneHotEncoder, StandardScaler, OrdinalEncoder from sklearn.impute import SimpleImputer from sklearn.compose import ColumnTransformer, make_column_transformer from sklearn.pipeline import Pipeline, make_pipeline from sklearn.svm import SVC # Loading in the data pk_df = pd.read_csv('dat...
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Checks whether the user can add an item in the given collection * * @param string $collection * @param string|int|null $status * * @return bool
ise-uiuc/Magicoder-OSS-Instruct-75K
// main graphic loop while (!glfwWindowShouldClose(window)) { // get width and height of window glfwGetWindowSize(window, &width, &height); // render graphics updateGraphics(); // swap buffers glfwSwapBuffers(window);
ise-uiuc/Magicoder-OSS-Instruct-75K
class EventField(Router): """ Routes on a the value of the specified top-level ``key`` in the given ``Event.raw`` dict. :param key: The name of the top-level key to look for when routing. :param routes: The routes mapping. Only set via ``add_route`` """ key: str = attr.ib(kw_only=True) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
PlayListRatings = [10, 9.5, 10, 8, 7.5, 5, 10, 10] i = 0 score = PlayListRatings[i] #print(score) while score >= 6: score = PlayListRatings[i] print(score)
ise-uiuc/Magicoder-OSS-Instruct-75K
'shuffle', 'transpose','training']) parser.add_option("-i", "--injectionrate", type="float", default=0.1, metavar="I", help="Injection rate in packets per cycle per node. \
ise-uiuc/Magicoder-OSS-Instruct-75K
kNN_classifier.predict(X_test) best_score = 0.0 best_k = -1
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.util.List; public interface ConstraintTagStrategy { List<String> getRelationNames(String fileContent); String getModifiedResourceContent(String fileContent, List<String> relations, List<String> existingEntityClassNames); }
ise-uiuc/Magicoder-OSS-Instruct-75K
nohup ${ICE_HOME}/bin/icegridregistry --Ice.Config=`pwd`/../etc/registry.cfg 2>&1 > `pwd`/../log/registry_start.log &
ise-uiuc/Magicoder-OSS-Instruct-75K
impl BindingMonad for AllocateCellMonad { type Binding = usize; fn pre_bind(&self, bindings: SymbolBindings) -> (SymbolBindings, Self::Binding) { // Note that the cell is not allocated during pre-binding! (bindings, 0) } fn bind(&self, bindings: SymbolBindings) -> (SymbolBindings, Res...
ise-uiuc/Magicoder-OSS-Instruct-75K
print('GC time:', cjmx.get_gc_time()) print('Active read tasks:', cjmx.get_read_active()) print('Pending read tasks:', cjmx.get_read_pending()) print('Completed read tasks:', cjmx.get_read_completed()) print('Active write tasks:', cjmx.get_write_active()) print('Pending write tasks:', cjmx.get_w...
ise-uiuc/Magicoder-OSS-Instruct-75K
function removeItem(item) { $('#row_' + item['product_id']).toggle("highlight"); // Remove existing hidden input $('input[name="transfer_items[]"][value="' + item['product_id'] + '"]').remove(); // Remove item from transfer items table $('#added_row_' + item['product_id'])....
ise-uiuc/Magicoder-OSS-Instruct-75K
def remove_duplicates(lst): new = [] for x in lst: if x not in new: new.append(x) return new
ise-uiuc/Magicoder-OSS-Instruct-75K
static let leftCommand1 = DefaultsKey<String?>("leftCommand1") static let leftCommand2 = DefaultsKey<String?>("leftCommand2")
ise-uiuc/Magicoder-OSS-Instruct-75K
# 'targets'. self.assertRaises(tuf.RepositoryError, tuf.util.ensure_all_targets_allowed, 'targets/non-delegated_rolename', list_of_targets, parent_delegations) # Test for target file that is not allowed by the parent role.
ise-uiuc/Magicoder-OSS-Instruct-75K
<th scope="col">Actions</th> </tr> </thead> <tbody> @if(count($agents) > 0) @foreach($agents as ...
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from "./eventDetail";
ise-uiuc/Magicoder-OSS-Instruct-75K
case 'PushEvent': return 'md-git-commit'; case 'ForkEvent': return 'md-git-network'; case 'IssuesEvent': return 'md-alert';
ise-uiuc/Magicoder-OSS-Instruct-75K
} bool IsArcAppWindow(aura::Window* window) { if (!window) return false; return window->GetProperty(aura::client::kAppType) == static_cast<int>(ash::AppType::ARC_APP); } void SetArcCpuRestriction(bool do_restrict) { chromeos::SessionManagerClient* session_manager_client =
ise-uiuc/Magicoder-OSS-Instruct-75K
for n in range(0, num): if len(self.contents) == 0: break randindex = random.randint(0, len(self.contents)-1) drawn.append(self.contents.pop(randindex)) return drawn def experiment(hat, expected_balls, num_balls_drawn, num_experiments): ...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>echim/pySteps from core.helpers.point import Point class Circle: def __init__(self, center: Point, radius: int): self._center: Point = center self._radius: int = radius
ise-uiuc/Magicoder-OSS-Instruct-75K
for matrix_ in matrix_list: new_matrix_list.append(matrix_type(matrix_)) return new_matrix_list return list(matrix_list) def matrix_type_conflict(matrix_list):
ise-uiuc/Magicoder-OSS-Instruct-75K
window.blit(text_win, (500, 80)) display.update() clock.tick(FPS)
ise-uiuc/Magicoder-OSS-Instruct-75K
if 'mushrooms' in requested_toppings: print("Adding mushrooms.") if 'pepperoni' in requested_toppings: print("Adding pepperoni.") if 'extra cheese' in requested_toppings: print("Adding extra cheese.") print("\nFinished making your first pizza!")
ise-uiuc/Magicoder-OSS-Instruct-75K
.Add("latlong", "Return latitude/longitude.", v => client.LatLong = v != null) .Add("excludeagencies", "Exclude recruitment agencies.", v => client.ExcludeAgencies = v != null) .Add("c=|country=", "Specify country of job.", v => client.Country = v); List<Strin...
ise-uiuc/Magicoder-OSS-Instruct-75K
export default createSelector((s: AppState) => s, s => s);
ise-uiuc/Magicoder-OSS-Instruct-75K
use super::*; pub(self) use nightsketch_derive::{sketch, sketchlist}; sketchlist! { blossom::Blossom, charcoal::Charcoal, glitch::Glitch, manifold::Manifold, postcard::Postcard, weather::Weather, }
ise-uiuc/Magicoder-OSS-Instruct-75K
:return: list of dictionary objects for every technique: score=0 if not in raw_matches, 1 otherwise, description in comments """ shortlist = [] for match in raw_matches: xid = '' xphase = '' for ref in match.external_references: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} function it_can_read_value_from_public_property() { $object = new ProtectedEntity(); $object->publicProperty = 64;
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public interface ProviderCallback extends ReactorChannelEventCallback, DefaultMsgCallback, RDMLoginMsgCallback, RDMDirectoryMsgCallback, RDMDictionaryMsgCallback { }
ise-uiuc/Magicoder-OSS-Instruct-75K
for t in record.tags: if t in self.tags: if self.tags[t]: should_cb = True continue else: should_cb = False break
ise-uiuc/Magicoder-OSS-Instruct-75K
detail['language'] = response.xpath('//table[@id="vulnprodstable"]/tr')[num].xpath('./td')[7].xpath('./text()').get().strip() yield detail
ise-uiuc/Magicoder-OSS-Instruct-75K
export { DOPK8SDatasource as Datasource, DOPK8SConfigCtrl as ConfigCtrl };
ise-uiuc/Magicoder-OSS-Instruct-75K
string serialCommand = red + "," + green + "," + blue + "," + lower + "," + higher + "\n"; if (SerialPortSelector.Text == "") { //MessageBox.Show("You need to select a serial port."); } else { SerialPort Serial = new SerialPort(Seri...
ise-uiuc/Magicoder-OSS-Instruct-75K
* Date: 2021/3/31
ise-uiuc/Magicoder-OSS-Instruct-75K
kx = np.ones((np.shape(X)[0],)) else: kx = np.genfromtxt(inputpath + 'kx.txt') if not os.path.exists(inputpath + 'cx.txt'): cx = np.ones((len(kx),)) else:
ise-uiuc/Magicoder-OSS-Instruct-75K
for ylabel in sample: if(base_sample[ylabel] != 0 and ylabel != norm_x): data2[key]["samples"][index][ylabel] = sample[ylabel] / base_sample[ylabel]; index += 1 data1[new_key] = data2[key]; data1[new_key]["descriptio...
ise-uiuc/Magicoder-OSS-Instruct-75K
import { NavBarComponent } from './navbar.component';
ise-uiuc/Magicoder-OSS-Instruct-75K
embyAPI = new EmbyClient(); } public bool checkConnection() { return embyAPI.checkConnection(); } public bool checkSettings() { logger.Debug("[Mediaserver Emby] username: \"{0}\"; embyUserid: \"{1}\"; embyAccessToken: \"{2}\"; embyAd...
ise-uiuc/Magicoder-OSS-Instruct-75K
match self { MaybeOwned::Borrowed(v) => v, MaybeOwned::Owned(v) => v, } }
ise-uiuc/Magicoder-OSS-Instruct-75K
rng = np.random.RandomState(seed=10) n_candidates = 10 n_splits = 3 hyperband_search = HyperbandSearchCV( SVC(), cost_parameter_max={}, param_distributions={}) array = rng.uniform(size=n_candidates * n_splits) mns = np.average(array.reshape(10, 3), axis=1, weights=weigh...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_cbc_lp():
ise-uiuc/Magicoder-OSS-Instruct-75K
site.clear() show_messages(messages) course = get_input('Course Serial: ') course = site.get_course(serial=course) if course is None: return ["No such course!"] elif course.owner != site.active_user: return ["You don't have permission to add score ...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// </summary> public float confidence; /// <summary> /// Position of the joints. /// normalized values between 0 and 1 /// </summary> [MarshalAs(UnmanagedType.ByValArray, SizeConst = 21)] public Vector3[] joints; /// <summary>
ise-uiuc/Magicoder-OSS-Instruct-75K
using System.Drawing; using System.Windows.Forms; namespace Cubewise.Query { /// <summary> /// Description of frmRunning. /// </summary> public partial class frmRunning : Form {
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 import React from "react"; const SEARCH_ICON = require("../../../static/images/other/search.svg");
ise-uiuc/Magicoder-OSS-Instruct-75K
queryset = Cluster.objects.all() permission_classes = (ClusterPermission,) AUDITOR_EVENT_TYPES = None
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="b-ol-list-text__item"> <div class="b-ol-list-text__item_number f-ol-list-text__item_number f-primary-b">3</div> <div class="b-ol-list-text__item_info"> <a href="#" class="f-ol-list-text__item_info-title f-primary...
ise-uiuc/Magicoder-OSS-Instruct-75K
s = randint(0, n - 1) f.write(str(s) + " " + str(randint(0, pages[s] - 1)) + " ") d = randint(0, n - 1) f.write(str(d) + " " + str(randint(0, pages[d] - 1)) + "\n")
ise-uiuc/Magicoder-OSS-Instruct-75K
class reviewForm(forms.ModelForm): text = forms.CharField()
ise-uiuc/Magicoder-OSS-Instruct-75K
from temiReceiver import start_pack, working_dir, get_packs import yaml for pack in get_packs(): with open(f"{working_dir}/packs/{pack}.yml", "r") as f: config = yaml.load(f) if config["autostart"]: start_pack(pack)
ise-uiuc/Magicoder-OSS-Instruct-75K
if money > 0: total += money print(f"Increase: {money:.2f}") x = input() elif money < 0: print("Invalid operation!") break print(f"Total: {total:.2f}")
ise-uiuc/Magicoder-OSS-Instruct-75K
$handler->shouldReceive('initiate')->once()->andReturn($data);
ise-uiuc/Magicoder-OSS-Instruct-75K
count_even, count_odd = 0, 0 for chip in chips: if chip % 2 == 0: count_even += 1 else: count_odd += 1 return min(count_even, count_odd) if __name__ == '__main__': solution = Solution() assert 1 == solution.minCostToMoveChips([1...
ise-uiuc/Magicoder-OSS-Instruct-75K
future = executor.submit(wait_for_changes, exit_world, nb_changes) print("\n\n\nPropagating %d change(s) from world %s..." % (nb_changes, entry_world)) profileonce("start test with %d worlds" % nb_worlds) for i in range(nb_changes): n = Node() n.name = "node_%d" % i entry_worl...
ise-uiuc/Magicoder-OSS-Instruct-75K
} public var name: String public var path: MemberExpr public var declContext: DeclContext?
ise-uiuc/Magicoder-OSS-Instruct-75K
$this->setDefaultAgent($ticket, $accountTicketSettings); if($accountTicketSettings->alert_ticket_assign_agent_id > 0 && $accountTicketSettings->default_agent_id > 0 && $ticket->agent_id > 0) {
ise-uiuc/Magicoder-OSS-Instruct-75K
using System.Collections.Generic; using System.Threading.Tasks; using SimplePagedList; namespace AnApiOfIceAndFire.Data {
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- encoding: utf-8 -*- """ KERI keri.vdr Package """ __all__ = ["issuing", "eventing", "registering", "viring", "verifying"]
ise-uiuc/Magicoder-OSS-Instruct-75K
* Over I2C with CMPS14 (compass) * Over serial with Arduino for motor control * Author: <NAME> (<EMAIL>) * Created: 2021-01-08 * Copyright: <NAME> (www.chrisfishing.de) * License: **************************************************************/ #include <sys/ioctl.h> #include <iostream...
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public void emitUnpack () { // close last string chunk:
ise-uiuc/Magicoder-OSS-Instruct-75K
else: logger.debug( "Pod %s was not scheduled for retry because its exit code %d was not found in config", metadata.name,
ise-uiuc/Magicoder-OSS-Instruct-75K
max_number_of_download_attempts=max_number_of_download_attempts, current_attempt=current_attempt + 1) else: for failed_download in failed_downloads.files_reference_data: click.echo(f'- Failed to download: {failed_download.file_name}') else: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0
ise-uiuc/Magicoder-OSS-Instruct-75K
matricula = input("Digite a matricula: ") nome = input("Digite a nome: ") nota1 = float(input("Digite a nota 1: ")) nota2 = float(input("Digite a nota 2: ")) nota3 = float(input("Digite a nota 3: "))
ise-uiuc/Magicoder-OSS-Instruct-75K
print (" -r|--threads <Number of threads> Defaults to 256") print (" -p|--port <Web Server Port> Defaults to 80") print (" -T|--tor Enable anonymising through tor on 127.0.0.1:9050") print (" -h|--help Shows this help\n") print ("Eg. ./torshammer.py -t 192.168.1.100 -r 256\n")
ise-uiuc/Magicoder-OSS-Instruct-75K
if args or kwds: super(hsv_thresh, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.k_size is None: self.k_size = 0 if self.e_size is None: self.e_size = 0 if self.d_size is None:
ise-uiuc/Magicoder-OSS-Instruct-75K
s.add_beam(coord=[0, L], E=E, I=I) s.add_distributed_load((q, q), (0, L)) s.add_nodal_support({'uz': 0, 'ur': "NaN"}, 0) s.add_nodal_support({'uz': 0, 'ur': "NaN"}, L) s.add_nodes(200) s.add_elements(s.nodes) s.solve(s.build_global_matrix(), s.build_load_vector(), s.get_boudary_conditions()...
ise-uiuc/Magicoder-OSS-Instruct-75K
def deserialize_context(self, context): return nova.context.RequestContext.from_dict(context) class ProfilerRequestContextSerializer(RequestContextSerializer): """Serializer and deserializer impl. Serializer and deserializer impl based on Jaeger tracing metadata propagation. For usage check o...
ise-uiuc/Magicoder-OSS-Instruct-75K
"c_send_maillist_ids": c_send_maillist_ids, 'c_send_qty_type': c_send_qty_type, 'c_send_qty': c_send_qty, 'c_send_qty_start': c_send_qty_start, 'c_send_domain': c_send_domain, 'c_send_fullname': c_send_fullname, 'c_send_replyto': c_send_replyto, 'c_track_...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>juanCruzSalina/avernus-hunt-tracker-frontend-v2<gh_stars>0 import React from 'react' import styled from 'styled-components'; const Wrapper = styled.div` width: 100vw; height: 100vh; display: grid; grid-template:
ise-uiuc/Magicoder-OSS-Instruct-75K
int pov = controller.getPOV(); if (pov != -1) {
ise-uiuc/Magicoder-OSS-Instruct-75K
use std::net::SocketAddr; use std::fs::File; use std::io::Read; use std::io::Write; use std::path::Path; use crate::microservice::Microservice; #[derive(Serialize, Deserialize)] struct Pref {
ise-uiuc/Magicoder-OSS-Instruct-75K
impl MessageIter { fn new(client: &ClientHandle, peer: tl::enums::InputPeer) -> MessageIter { // TODO let users tweak all the options from the request Self::from_request( client, MAX_LIMIT, tl::functions::messages::GetHistory { peer,
ise-uiuc/Magicoder-OSS-Instruct-75K
logger.debug('Load logging configuration from file %s', cfg_file) return config def init_logging(): config = get_logging_cfg() logging.config.dictConfig(config)
ise-uiuc/Magicoder-OSS-Instruct-75K
from .models import Image as ImageModel def resize_image(source: ImageModel, width: int, height: int) -> None: """Изменяет размер исходного изображения""" if width is None: width = height if height is None:
ise-uiuc/Magicoder-OSS-Instruct-75K
data = { "start_time": start_time, "end_time": end_time } return data
ise-uiuc/Magicoder-OSS-Instruct-75K
class Meta: namespace = "http://www.opengis.net/gml"
ise-uiuc/Magicoder-OSS-Instruct-75K
@NgModule({ imports: [ BrowserAnimationsModule, FormsModule,
ise-uiuc/Magicoder-OSS-Instruct-75K