seed
stringlengths
1
14k
source
stringclasses
2 values
# ============================================================ return J[0]
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>kualkua/php-token-reflection <?php class TokenReflection_Test_ClassPrivateClone { private function __clone() { } }
ise-uiuc/Magicoder-OSS-Instruct-75K
for middleware in self.middlewares: m_res = await middleware.pre_process_event(event) if not m_res: return MiddlewareResult(False) return MiddlewareResult(True)
ise-uiuc/Magicoder-OSS-Instruct-75K
job = pygenie.jobs.HiveJob() \ .command_arguments('explicitly stating command args') \ .script('select * from something') \ .property('source', 'tester') \ .property_file('properties.hive') assert_equals(
ise-uiuc/Magicoder-OSS-Instruct-75K
} //UserNtuples->fillg10(xx,1.); //UserNtuples->fillg12(zz,1.); //UserNtuples->fillg32(rr,1.); // ========= // double xPrimAtZhit = vx + (zz-vz)*tan(th)*cos(phi); // double yPrimAtZhit = vy + (zz-vz)*tan(th)*sin(phi);
ise-uiuc/Magicoder-OSS-Instruct-75K
assert_eq!(engine.eval::<INT>("let x = 0b1111; x")?, 15); assert_eq!(engine.eval::<INT>("let x = 0B1111; x")?, 15); assert_eq!( engine.eval::<INT>("let x = 0b0011_1100_1010_0101; x")?, 15525 ); Ok(()) }
ise-uiuc/Magicoder-OSS-Instruct-75K
class InvalidUrlException extends \Exception { public function __construct($value) { parent::__construct(sprintf(ErrorMessages::INVALID_URL_MESSAGE, \var_export($value, true)), ErrorCodes::INVALID_URL); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
print('A={:.4f}'.format(area))
ise-uiuc/Magicoder-OSS-Instruct-75K
logger.log_debug("Next try to join") if modem.join(): location = "01" # Arbitrary location identifier, sent to server, but not used anywhere yet while True: encoded_temp = hex_int_from_2dp_celcius(get_temp_celcius()) logger.log_debug(f"Sending Temperature:{encoded_temp}") modem...
ise-uiuc/Magicoder-OSS-Instruct-75K
pyidf.validation_level = ValidationLevel.error obj = AirflowNetworkDistributionComponentCoil() # object-list var_coil_name = "object-list|Coil Name" obj.coil_name = var_coil_name # alpha var_coil_object_type = "Coil:Cooling:DX:SingleSpeed" obj.coil_objec...
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 import socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto(b'Test message', ('localhost', 8888))
ise-uiuc/Magicoder-OSS-Instruct-75K
* Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param $roles * @param $permission * @return mixed */ public function handle($request, Closure $next, $roles = null, $permission = null) { $user = $request->user...
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace Pulumi.GoogleNative.BigQuery.V2.Outputs { [OutputType]
ise-uiuc/Magicoder-OSS-Instruct-75K
"order": 2 }, "total": { "type": "integer", "title": "Total",
ise-uiuc/Magicoder-OSS-Instruct-75K
def result(self): return self._result
ise-uiuc/Magicoder-OSS-Instruct-75K
use Eraple\Core\App; use Eraple\Core\Task; class SampleTaskHandlesReplaceTaskEvent extends Task {
ise-uiuc/Magicoder-OSS-Instruct-75K
template_name = "teacher/index.html" context_object_name = "teachers"
ise-uiuc/Magicoder-OSS-Instruct-75K
CID_SWITCH = 8 CID_THERMOSTAT = 9 CID_SENSOR = 10 CID_SECURITY_SYSTEM = 11
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright © 2020 Nail Sharipov. All rights reserved. // import SwiftUI
ise-uiuc/Magicoder-OSS-Instruct-75K
using System; using System.Collections.Immutable;
ise-uiuc/Magicoder-OSS-Instruct-75K
day = std::atoi(argv[1]); else { std::cout << "Enter day: "; std::cin >> day;
ise-uiuc/Magicoder-OSS-Instruct-75K
//} } }
ise-uiuc/Magicoder-OSS-Instruct-75K
public void testBuscarTarea_Codigo() { Tarea tareaNueva = tareaSer.buscarTarea("Calc01"); assertEquals("Calculadora simple", tareaNueva.getDescripcion()); tareaNueva = tareaSer.buscarTarea("Calc0001"); assertNull(tareaNueva.getDescripcion()); } @Test public void testBuscarTarea() {
ise-uiuc/Magicoder-OSS-Instruct-75K
#results = sp.search(q='drei ???', limit=20,type='artist') #print(results) #for idx, track in enumerate(results['tracks']['items']): # print(idx, track['name']) # found artist uri: spotify:artist:3meJIgRw7YleJrmbpbJK6S
ise-uiuc/Magicoder-OSS-Instruct-75K
?> </tbody> </table>
ise-uiuc/Magicoder-OSS-Instruct-75K
// Built-In names changed from v1.0 -> v1.1 // to remove kAAF prefix. so we have to deal with both // old and new style names. // The lookup on the originally provided name failed due to // the name not being found (not some other error). // So here we add kAAF if it isn't there or ...
ise-uiuc/Magicoder-OSS-Instruct-75K
public float sizemultiplier=0.2f; public float despownoffset=10; public GameObject car; GameObject self; public Sprite[] sprites; void Start() { self = this.gameObject; self.gameObject.transform.localScale = new Vector3(self.transform.localScale.x*sizemultiplier * self.transf...
ise-uiuc/Magicoder-OSS-Instruct-75K
import PackageDescription
ise-uiuc/Magicoder-OSS-Instruct-75K
pip uninstall pysexpr -y && devp clean && python setup.py install
ise-uiuc/Magicoder-OSS-Instruct-75K
public static void main(String[] args) {
ise-uiuc/Magicoder-OSS-Instruct-75K
Create a new service identity. :param kwargs: Valid fields are... name - required description status - valid values are active, inactive - if omitted will default to active :return: Details of the newly created user. """
ise-uiuc/Magicoder-OSS-Instruct-75K
var fundraiser = _fundraiserRepository.FindById(request.Id); fundraiser.Name = request.Name; fundraiser.Description = request.Description; fundraiser.IsActive = request.IsActive; _fundraiserRepository.Update(fundraiser); } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# format value as bits
ise-uiuc/Magicoder-OSS-Instruct-75K
} declare const REDUX_STATE: ReduxState
ise-uiuc/Magicoder-OSS-Instruct-75K
for character in reversed(message): secret = secret + str(chr(ord(character)+1)) print(secret)
ise-uiuc/Magicoder-OSS-Instruct-75K
velocidade = float(input('Qual a velocidade atual do veículo? ')) if velocidade > 80: print('VOCÊ FOI MULTADO! Pois você excedeu o limite permitido de 80Km/h') multa = (velocidade - 80) * 7 print('Você deve pagar uma multa por excedente no valor de R${:.2f}!'.format(multa)) else: print('Tenha um Bom di...
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace App\Models; use Carbon\Carbon; use Illuminate\Database\Eloquent\Collection;
ise-uiuc/Magicoder-OSS-Instruct-75K
mkdir -p ${out_dir}
ise-uiuc/Magicoder-OSS-Instruct-75K
override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. ...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>Ryro3753/project-w<gh_stars>0 namespace API.Models.Character { public class CharacterBasics { public int Id { get; set; }
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.core.management import call_command from django.core.management.base import BaseCommand class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument( '--database', default=DEFAULT_DB_ALIAS, help='Name of database') parser.add_argument( ...
ise-uiuc/Magicoder-OSS-Instruct-75K
fields.remove('order')
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "crypto/crypto_wrapper.h" #include "configurations.h" #include "extern_consts.h" #define _default_response ""
ise-uiuc/Magicoder-OSS-Instruct-75K
mod upgrader;
ise-uiuc/Magicoder-OSS-Instruct-75K
resCenter = i return s[(resCenter - resLen + 1) // 2:(resCenter + resLen - 1) // 2]
ise-uiuc/Magicoder-OSS-Instruct-75K
class Meta:
ise-uiuc/Magicoder-OSS-Instruct-75K
# pylint: disable=import-error, invalid-name
ise-uiuc/Magicoder-OSS-Instruct-75K
if (form.is_valid()): print(form.cleaned_data)
ise-uiuc/Magicoder-OSS-Instruct-75K
</div><!-- /.row --> </div> <br>
ise-uiuc/Magicoder-OSS-Instruct-75K
do echo "============================================================" echo $i cat $i done echo $(date): Smoketests completed. set -e
ise-uiuc/Magicoder-OSS-Instruct-75K
Figglewatts <<EMAIL>> """ __version__ = "0.1.3"
ise-uiuc/Magicoder-OSS-Instruct-75K
multicast_tunnel_endpoint = "172.16.31.10" multicast_tunnel_endport = 2500 local_multicast_group = "192.168.3.11" local_multicast_port = 1600 multicast_receiver = Multicast_transceiver("0.0.0.0", local_multicast_port, local_multicast_group, local_multicast_port) detupler...
ise-uiuc/Magicoder-OSS-Instruct-75K
joined_list = [] joined_list.append(input_jd) joined_list.append(input_resume) final_list = [] for line in joined_list: # print(line) # print("#"*50) text_tokens = word_tokenize(line[0]) # print("*"*50) # print(text_tokens) # print("*"*50) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Finished, your new end time must be:", start_time) ======= os.system(f"git clone {repository.clone_url} repos/{repository.owner.login}/{repository.name}") >>>>>>> 9a201987d7a6490e552e7d03d8281330895ef733
ise-uiuc/Magicoder-OSS-Instruct-75K
mov r256[8],r256[7] ; cpy a256[1],a256[7] ; cnv f128[4],a128[3] ; spy a1024[15],r1024[24] ; gt.u a8[5],a64[9] ; lt.s a8[5],a64[9] ; gt.e f64[...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Do not let actor exit grid #include <algorithm> #include <iostream> #include <stdlib.h> #include <fstream>
ise-uiuc/Magicoder-OSS-Instruct-75K
mixed_param_attr=mixed_param, mixed_bias_param_attr=False, gru_bias_attr=gru_bias, gru_param_attr=gru_param)
ise-uiuc/Magicoder-OSS-Instruct-75K
m += 1
ise-uiuc/Magicoder-OSS-Instruct-75K
} return i; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>djmoney/__init__.py __version__ = "1.0.dev" default_app_config = "djmoney.apps.MoneyConfig"
ise-uiuc/Magicoder-OSS-Instruct-75K
self.stories = self._get_stories_from_profile(soup, fav_stories=False) self.favorite_stories = self._get_stories_from_profile(soup, fav_stories=True) self.favorite_authors = self._get_favorite_authors(soup) def get_json_dump(self): return { 'id': self.id, 'ti...
ise-uiuc/Magicoder-OSS-Instruct-75K
package fr.gtm.blog.dao; import org.springframework.data.jpa.repository.JpaRepository; import fr.gtm.blog.domain.Article; public interface ArticleRepository extends JpaRepository<Article, Integer> { // List<Article> findByTitleContains(String search); }
ise-uiuc/Magicoder-OSS-Instruct-75K
nrow, ncol = len(matrix), len(matrix[0]) for i in range(nrow): for j in range(ncol): if matrix[i][j] == 0: matrix[i][j] = 'X' for k in range(ncol): if matrix[i][k] != 0: matrix[i][k] =...
ise-uiuc/Magicoder-OSS-Instruct-75K
suu1 = int(ei) suu2 = int(ei*ei) suu3 = int(ei*ei*ei) print(suu1 + suu2 + suu3)
ise-uiuc/Magicoder-OSS-Instruct-75K
'max' => [ 'numeric' => 'The :attribute may not be greater than :max.', 'file' => 'The :attribute may not be greater than :max kilobytes.', 'string' => 'The :attribute may not be greater than :max characters.', 'array' => 'The :attribute may not have more than...
ise-uiuc/Magicoder-OSS-Instruct-75K
''' def __setup_rabbit_connection(self, params): LOGGER.debug('Setting up the connection with the RabbitMQ.') self.__start_connect_time = datetime.datetime.now() self.__all_hosts_that_were_tried.add(params.host)
ise-uiuc/Magicoder-OSS-Instruct-75K
luhn.validate(1); // $ExpectType boolean
ise-uiuc/Magicoder-OSS-Instruct-75K
extension UIView { func dropShadow(scale: Bool = true) { layer.masksToBounds = false layer.shadowColor = UIColor.black.cgColor layer.shadowOpacity = 0.5 layer.shadowOffset = CGSize(width: 1, height: 1) layer.shadowRadius = 5 layer.shadowPath = UIBezierPath(rect: bound...
ise-uiuc/Magicoder-OSS-Instruct-75K
export interface descriptionObj { head: string tail: string // Make below a mapping of severity warnings severity: string } export interface decodedLocationsObj {
ise-uiuc/Magicoder-OSS-Instruct-75K
if(flag) return "YES"; else return "NO";
ise-uiuc/Magicoder-OSS-Instruct-75K
def predict(self, X): assert (self.trained == True), "Must call fit first!" if self.oneclass == False: tmp_pred = self.learner.predict(X).reshape(-1) else: tmp_pred = np.zeros((X.shape[0]))
ise-uiuc/Magicoder-OSS-Instruct-75K
tail = input() body = input() head = input()
ise-uiuc/Magicoder-OSS-Instruct-75K
res.append(correct_k.mul_(100.0 / batch_size)) return res def multi_class_auc(all_target, all_output, num_c = None): from sklearn.preprocessing import label_binarize
ise-uiuc/Magicoder-OSS-Instruct-75K
public IList<CharacterClass> Classes { get; internal set; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash curl 'http://localhost:8000/snippets/' | jq
ise-uiuc/Magicoder-OSS-Instruct-75K
//this variable is used to change the background whenever the user clicks on the button let mut white_background = true; loop { while let Some(e) = inputs.next_event().await { //whenever we are given an event, we pass it to context so it can update the widget. context.event(&...
ise-uiuc/Magicoder-OSS-Instruct-75K
[1,0,1], [0,1,0]]) ) smooth_block = np.array([[0,1,0], [1,0,1], [0,0,0]]) def __init__( self, img ):
ise-uiuc/Magicoder-OSS-Instruct-75K
Ok(()) } pub fn global_state() -> Result<()> { insert("apple"); insert("orange"); insert("peach"); { let db = FRUIT.lock().map_err(|_| "Failed to acquire MutexGuard")?; db.iter().enumerate().for_each(|(i, item)| {
ise-uiuc/Magicoder-OSS-Instruct-75K
let textFieldCategory = UIMutableUserNotificationCategory() textFieldCategory.setActions([responseTextAction], for: .default) textFieldCategory.identifier = "TEXT_FIELD" let oneButtonCategory = UIMutableUserNotificationCategory() oneButtonCategory.setActions([fi...
ise-uiuc/Magicoder-OSS-Instruct-75K
test case for get_steps """ res_body = { 'name': 'job01', 'id': 'j001', 'type': 'Java', 'actionOnFailure': 'Continue', 'properties': bmr.java_step_properties( 'bos://path/to/jar', 'WordCount', ...
ise-uiuc/Magicoder-OSS-Instruct-75K
print(name.title())
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Get the template for a ServiceType. :param service_type: ServiceTypes :return: template dict """ if service_type == ServiceTypes.ASSET_ACCESS: return ACCESS_SLA_TEMPLATE['serviceAgreementTemplate'].copy() elif service_type == ServiceTypes.CLOUD_COMPUTE: return COMPUTE_SL...
ise-uiuc/Magicoder-OSS-Instruct-75K
if file.endswith(new_extension): new_name = file.replace(new_extension, '') + ".jpg"
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <string.h> #define MAXVEX 100 typedef char VertexType[3]; /*定义VertexType为char数组类型*/ typedef struct vertex { int adjvex; /*顶点编号*/
ise-uiuc/Magicoder-OSS-Instruct-75K
last_sender_id_(), n_callbacks_logged_(), dummy_wr_(), dummy_rd_(), dummy_buff_() { set_reader(this); set_writer(this); } s32 read(uint8_t *buf, const uint32_t n) override { uint32_t real_n = n; memcpy(buf, dummy_buff_ + dummy_rd_, real_n);
ise-uiuc/Magicoder-OSS-Instruct-75K
InitializeComponent(); textBox.Text = name; numericId.Value = orderEditsEnabled ? (decimal)id : 1; if (!orderEditsEnabled) { groupBoxId.Visible = false; } } private void buttonConfirm_Click(object sender, EventArgs ...
ise-uiuc/Magicoder-OSS-Instruct-75K
prvd_xmark($result); } return $result; }
ise-uiuc/Magicoder-OSS-Instruct-75K
component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy();
ise-uiuc/Magicoder-OSS-Instruct-75K
public int Rate { get; set; } public List<Comment> Comments { get; set; } public List<Image> Photo { get; set; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
foo.data.name = 'foo' bar = mock.MagicMock() bar.data.name = 'bar' baz = mock.MagicMock() baz.data.name = 'baz' stages_mock.return_value = [foo, bar, baz] result = pipeline_instance.stage(name='bar')
ise-uiuc/Magicoder-OSS-Instruct-75K
// `as!` checks func blackhole<T>(_ : T) { }
ise-uiuc/Magicoder-OSS-Instruct-75K
with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle: js = json.load(handle) self.assertEqual("AllergyIntolerance", js["resourceType"]) return allergyintolerance.AllergyIntolerance(js) def testAllergyIntolerance1(self): inst = self.instantia...
ise-uiuc/Magicoder-OSS-Instruct-75K
Move a rectangle across the terminal. <3 """ from juc2 import art, Stage
ise-uiuc/Magicoder-OSS-Instruct-75K
OTHER_BAZEL_VERSIONS = [ "6.0.0-pre.20220223.1", ] SUPPORTED_BAZEL_VERSIONS = [ CURRENT_BAZEL_VERSION, ] + OTHER_BAZEL_VERSIONS
ise-uiuc/Magicoder-OSS-Instruct-75K
@mock.patch("absl.logging.exception") @mock.patch("absl.logging.info") def test_log_failure(self, mock_info, mock_exc): """Tests that an error thrown by an activity is correctly caught.""" with self.assertRaisesRegex(ValueError, "Intentional"): with utils.log_activity("for test"):
ise-uiuc/Magicoder-OSS-Instruct-75K
calib_context = '' for camera in frame.context.camera_calibrations: tmp = np.array(camera.extrinsic.transform).reshape(4, 4) tmp = self.cart_to_homo(self.T_front_cam_to_ref) @ np.linalg.inv(tmp) Tr_velo_to_cam.append(["%e" % i for i in tmp[:3,:].reshape(12)]) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
model_dir = Path("../") test_images_dir = Path("test_images") output_images_dir = Path("output_images") with open(str(model_dir/'model.p'), 'rb') as file: model = pickle.load(file) svc = model['classifier'] scaler = model['scaler'] def display_images(img1, img2, img1_title=None, img2_title=None, gray_cmap=False...
ise-uiuc/Magicoder-OSS-Instruct-75K
XCTAssertEqual(xs.subscriptions, [ Subscription(200, 450), Subscription(450, 700), Subscription(700, 950), Subscription(950, 1100)
ise-uiuc/Magicoder-OSS-Instruct-75K
double threshold, int? thresholdDuration,
ise-uiuc/Magicoder-OSS-Instruct-75K
"meta": { "total": 3 } }, "headers": { "content-type": "application/json; charset=utf-8", "status": 200, "ratelimit-limit": 1200, "ratelimit-remaining": 1137, "ratelimit-reset": 1415984218 }, };
ise-uiuc/Magicoder-OSS-Instruct-75K