seed
stringlengths
1
14k
source
stringclasses
2 values
for agent in self.schedule.agents: if agent.agent_type == 1: if agent.unique_id == 0: count_left += agent.count_cars() elif agent.unique_id == 1: count_left += agent.count_cars() elif agent.unique_id == 2: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
dependencies = [ ('assopy', '0006_add_bank_to_payment_options'), ] operations = [ migrations.AddField( model_name='invoice', name='customer', field=models.TextField(default=''), preserve_default=False, ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
:type data: str :rtype: TreeNode """ deserial = data.split(',') root = TreeNode(-1) bfs = collections.deque([(root, RIGHT)]) while len(deserial) > 0: curr_serial_val = deserial.pop()
ise-uiuc/Magicoder-OSS-Instruct-75K
.multilineTextAlignment(.center) } } } } struct UserPermissionView_Previews: PreviewProvider { static var previews: some View { UserPermissionView(channelId: nil) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
#--------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------- def main(): # pylint: disable=too-many-locals, too-many-statements """ The main function. """
ise-uiuc/Magicoder-OSS-Instruct-75K
# clients go to the counter user.set_checkpoint(f'Got to the counter') time_discussing = 12.0 td = random.expovariate(1.0 / time_discussing) # yield as long as the customer is discussing at the counter yield user.waits(td) # release the...
ise-uiuc/Magicoder-OSS-Instruct-75K
public init(catalog: String, changeSetId: String) { self.catalog = catalog self.changeSetId = changeSetId } public func validate(name: String) throws { try validate(self.catalog, name: "catalog", parent: name, max: 64) try validate(self.catalog, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
for (it = str.begin(); it != str.end(); it ++) { std::cout << *it << std::endl; } return 0; }
ise-uiuc/Magicoder-OSS-Instruct-75K
this.couponCode = couponCode; } public void addOrderItem(OrderItem orderItem) { orderItems.add(orderItem); } public Long getOrderId() { return orderId; } public Customer getCustomer() {
ise-uiuc/Magicoder-OSS-Instruct-75K
S: Serializer, { let mut seq = serializer.serialize_seq(Some(m.len()))?; for e in m { seq.serialize_element(&UnsignedMessageJsonRef(e))?; } seq.end() } pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<UnsignedM...
ise-uiuc/Magicoder-OSS-Instruct-75K
test_score = \ np.mean(classifier.predict(test_set[0]) != test_set[1]) test_disp_str = 'best: test err %.4f%%' % (test_score * 100.) logging.info(test_disp_str) # early stopping # ################## # end for (the last break...
ise-uiuc/Magicoder-OSS-Instruct-75K
public function saveParametro(Request $request) { $temp = new Parametro($request->all()); $temp->save(); broadcast(new NewParametro($temp)); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
import nibabel as nib import numpy as np from scipy import ndimage # initalize data work_dir = '/mindhive/saxelab3/anzellotti/forrest/output_denoise/'
ise-uiuc/Magicoder-OSS-Instruct-75K
@person_lister def name_format(person): return ("Mr. " if person[3] == "M" else "Ms. ") + person[0] + " " + person[1] def hr_zip():
ise-uiuc/Magicoder-OSS-Instruct-75K
name: 'Atlas Default', scheme: 'xyz', tilejson: '2.2.0', tiles: [`${host}/v4/atlas/{z}/{x}/{y}.pbf`], });
ise-uiuc/Magicoder-OSS-Instruct-75K
SCRIPT_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" PROJECT_DIRECTORY="$SCRIPT_DIRECTORY/.." cd "$PROJECT_DIRECTORY" tsc --build --clean tsc --build sed -i '' '/exports,\.*__esModule/d' build/main.js
ise-uiuc/Magicoder-OSS-Instruct-75K
.user(Some(self.mysql.username.as_ref().unwrap())) .db_name(Some(self.mysql.database.as_ref().unwrap())); let pool = Pool::new(opts)?;
ise-uiuc/Magicoder-OSS-Instruct-75K
proper2.ca.state1, proper2.ca.state2 = 1,2 self.assertEqual(proper2.ca.state1, 1) self.assertEqual(proper2.ca.state2, 2) # now reset them proper2.ca.reset('all')
ise-uiuc/Magicoder-OSS-Instruct-75K
newplaycount = mediaitem['playcount'] - 1 newlastplayed = lastplayed - (lastplayed - dateadded) / newplaycount quickjson.set_item_details(dbid, mediatype, playcount=newplaycount, lastplayed=str(newlastplayed).split('.')[0]) xbmc.executebuiltin('Container.Refresh')
ise-uiuc/Magicoder-OSS-Instruct-75K
#$ -N logreg_prott5 #$ -cwd source ml-actual/bin/activate cd SF/ export PATH=/share/apps/python-3.7.2-shared/bin:$PATH export LD_LIBRARY_PATH=/share/apps/python-3.7.2-shared/lib:$LD_LIBRARY_PATH python3 logreg_prott5.py
ise-uiuc/Magicoder-OSS-Instruct-75K
using Luis.MasteringExtJs.WebApi; using Microsoft.Owin; using Owin; //[assembly: OwinStartup(typeof(Startup))] namespace Luis.MasteringExtJs.WebApi { public partial class Startup { public void Configuration(IAppBuilder app) {
ise-uiuc/Magicoder-OSS-Instruct-75K
import torch import torch.nn as nn from tests.utils import jitVsGlow
ise-uiuc/Magicoder-OSS-Instruct-75K
class MediaPart(Model): class Meta: database = db db_table = 'media_parts'
ise-uiuc/Magicoder-OSS-Instruct-75K
impl Player for AI { fn name(&self) -> String { match self.id { PlayerId::One => "Boox One".to_string(), PlayerId::Two => "Boox Two".to_string(), } } fn play(&self, board: Board) -> Edge { let (claimers, others): (Vec<Edge>, Vec<Edge>) = board .i...
ise-uiuc/Magicoder-OSS-Instruct-75K
version https://git-lfs.github.com/spec/v1 oid sha256:b0cadf532d33209341a7c05d64b70011571a6cd71ce7f1287b3e88f011402186 size 3263
ise-uiuc/Magicoder-OSS-Instruct-75K
.expect("Unable to open a connection to D-Bus"); // open d-bus
ise-uiuc/Magicoder-OSS-Instruct-75K
package com.caih.cloud.iscs.charge.service.impl; import com.alipay.api.AlipayApiException; import com.alipay.api.AlipayClient; import com.alipay.api.DefaultAlipayClient;
ise-uiuc/Magicoder-OSS-Instruct-75K
# all possible f/j configurations at each time step (*4) # And predict a 4-way probability distribution over f/j configs: self.attention = nn.Linear(self.depth_size * self.depth, 4, bias=False)
ise-uiuc/Magicoder-OSS-Instruct-75K
BackdropWidget::BackdropWidget() : QGraphicsProxyWidget(0, Qt::Widget), internal_widget_(new QWidget()) { setupUi(internal_widget_); setWidget(internal_widget_); } void BackdropWidget::SetContentWidth(qreal width) {
ise-uiuc/Magicoder-OSS-Instruct-75K
// ContentModeViewController.swift // Cacao // // Created by Alsey Coleman Miller on 5/29/16. // Copyright © 2016 PureSwift. All rights reserved. // #if os(Linux) import Glibc #endif
ise-uiuc/Magicoder-OSS-Instruct-75K
# Check that the page was unpublished self.assertFalse(SimplePage.objects.get(id=self.test_page.id).live)
ise-uiuc/Magicoder-OSS-Instruct-75K
</td> <td> <a href="{{ route('posts.show', $item->id) }}">{{ $item->title }}</a> </td> <td>{{ $item->category->name }}</td> <td> <div class="act...
ise-uiuc/Magicoder-OSS-Instruct-75K
def testRange(min, max, evens): print('Testing [{},{}] {}...'.format(min, max, 'evens' if evens else 'odds')) for i in range(min, max, 2): i = i if evens else i - 1 result = isEven(i) if(not result and evens): raise Exception('Test failed. Got: isEven({}) = {}. Expected: '\ ...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertEqual(str(self.bucketlist), '<Bucketlist {}>'.format(self.bucketlist.name)) def test_items(self): """Test the list of items of bucketlist instance""" self.assertEqual(len(self.bucketlist.items), 1) def test_item_string_representation(self): """Test the representation...
ise-uiuc/Magicoder-OSS-Instruct-75K
import os import ntpath from src.models import CollabWebService as Ws
ise-uiuc/Magicoder-OSS-Instruct-75K
packages="libxayagame jsoncpp libglog gflags libzmq openssl" g++ hello.cpp -o hello \
ise-uiuc/Magicoder-OSS-Instruct-75K
assert!(event.0 != 0); SetEvent(event).ok()?; let result = WaitForSingleObject(event, 0);
ise-uiuc/Magicoder-OSS-Instruct-75K
print("correct:", class_correct) print(" total :", class_total) print('Accuracy average: ', accuracy_sum / len(classes)) average_accuracy_list.append(accuracy_sum / len(classes)) print(max(average_accuracy_list), average_accuracy_list.index(max(average_accuracy_list)) + 1)
ise-uiuc/Magicoder-OSS-Instruct-75K
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language govern...
ise-uiuc/Magicoder-OSS-Instruct-75K
def kml2latlon(ifile): """Read lon lat from kml file with single path""" from fastkml import kml, geometry with open(ifile, 'rt') as myfile: doc = myfile.read()
ise-uiuc/Magicoder-OSS-Instruct-75K
guard shouldContinueBatches else { return } autoreleasepool { let batch = started(batch: batchCount, size: level.batchSize)
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash if [ ! -s "$PGDATA/PG_VERSION" ]; then
ise-uiuc/Magicoder-OSS-Instruct-75K
{ public $file;
ise-uiuc/Magicoder-OSS-Instruct-75K
mosquitto -c /etc/mosquitto/mosquitto.conf
ise-uiuc/Magicoder-OSS-Instruct-75K
# Register your models here. admin.site.register(Quiz) admin.site.register(Question) admin.site.register(Answer) admin.site.register(Label) admin.site.register(Submit)
ise-uiuc/Magicoder-OSS-Instruct-75K
"construct_hth", "construct_dia", ]
ise-uiuc/Magicoder-OSS-Instruct-75K
n, k, v = int(input()), int(input()), [] for i in range(n): v.append(int(input())) v = sorted(v, reverse=True) print(k + v[k:].count(v[k-1]))
ise-uiuc/Magicoder-OSS-Instruct-75K
base = expand(self.vim.vars['junkfile#directory']) candidates = []
ise-uiuc/Magicoder-OSS-Instruct-75K
include_package_data=True, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment',
ise-uiuc/Magicoder-OSS-Instruct-75K
published: DateTime<Tz>, } impl Into<JsonResponse> for Update { fn into(self) -> JsonResponse { match serde_json::to_value(self.clone()) { Ok(v) => JsonResponse::Ok(JsonValue(v)), Err(err) => { eprintln!( "Failed to convert Update {:?} into Js...
ise-uiuc/Magicoder-OSS-Instruct-75K
ServerError{code: u16, message: String} = "ServerError: {code} => {message}", ReqwestError{source: reqwest::Error} = "Reqwest Failure!", SerdeError{source: serde_json::error::Error} = "Unable to deserialize payload", }
ise-uiuc/Magicoder-OSS-Instruct-75K
// Advection of velocity SolverSelection::SetAdvectionSolver(m_settings, &adv_vel, m_settings.get("solver/advection/type")); // Diffusion of velocity SolverSelection::SetDiffusionSolver(m_settings, &dif_vel, m_settings.get("solver/diffusion/type"));
ise-uiuc/Magicoder-OSS-Instruct-75K
fatalError("Couldn't find UITableViewCell for \(String(describing: className))") } return cell } func dequeueReusableHeaderView<T: UITableViewHeaderFooterView>(className: T.Type, identifier: String = String(describing: T.self)) -> T { guard let cell = dequeueReusable...
ise-uiuc/Magicoder-OSS-Instruct-75K
std::stringstream input;
ise-uiuc/Magicoder-OSS-Instruct-75K
const res = await postItemDatasource.getByUserId(authorizer.principalId); console.log('res::', JSON.stringify(res)); return { items: res }; }) .use(apiGatewayMiddleware(200)) .use(apiGatewayHandleErrors());
ise-uiuc/Magicoder-OSS-Instruct-75K
* EXR format references: https://www.openexr.com/documentation/openexrfilelayout.pdf */ import { WebGLRenderer, WebGLRenderTarget, TextureDataType } from '../../../src/Three'; export const NO_COMPRESSION: 0; export const ZIPS_COMPRESSION: 2; export const ZIP_COMPRESSION: 3; export interface EXRExporterParseOptions...
ise-uiuc/Magicoder-OSS-Instruct-75K
this.GrpSelectOptionSet.Controls.Add(this.groupBox1); this.GrpSelectOptionSet.Location = new System.Drawing.Point(12, 124); this.GrpSelectOptionSet.Name = "GrpSelectOptionSet"; this.GrpSelectOptionSet.Size = new System.Drawing.Size(461, 114); this.GrpSelectOpt...
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "Font/LoadPSF.hpp" #include <SDL.h> #include <iostream> // TODO: // Draw pixels to an SDL_Texture in DrawPSF.cpp, return the texture? // Scale the texture or whatever then RenderCopy or somehow get the renderer to draw the texture?
ise-uiuc/Magicoder-OSS-Instruct-75K
@Test public void equals() { List<String> firstPredicateKeywordList = Collections.singletonList("10"); List<String> secondPredicateKeywordList = Arrays.asList("10", "20"); IssueContainsKeywordsPredicate firstPredicate = new IssueContainsKeywordsPredicate( firstPredicateK...
ise-uiuc/Magicoder-OSS-Instruct-75K
"MOD13Q1.A2022017.h12v11.061.2022034232400.hdf",
ise-uiuc/Magicoder-OSS-Instruct-75K
lines_i = f.readlines() f.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
def single_player_prompt(player): """Show players in the console.""" continue_prompt = True while (continue_prompt): answer = main_question(player)
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Created by TOSHIBA on 2018/3/21. */ public class Comment { private String author;//作者 private String time;//时间 private String content;//作者 private String location;//位置 public String getAuthor() { return author; }
ise-uiuc/Magicoder-OSS-Instruct-75K
async fn add_table(&self, _: u64, table: TableDesc) -> Result<VersionDesc> { let version = self.core.add_table(table).await; self.schedule_compaction().await; Ok(version) }
ise-uiuc/Magicoder-OSS-Instruct-75K
#give them an plot index tf_data_overview.loc[:,'Plot position'] = range(len(tf_list)) plt.figure(figsize = (10.1 / 2.54, 12 / 2.54)) plt.rcParams['font.sans-serif'] = 'Arial' ax = plt.gca() plt.axvline(x = 0, ymin = 0, ymax = 1, linewidth = 2, color = 'grey', linestyle = '--') #plot groups boxplot_groups = {} for gro...
ise-uiuc/Magicoder-OSS-Instruct-75K
unset($provider, $queue); $this->assertSame(1, $this->provider->count('RiverlineWorkerBundleTest_create_multi')); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
print('dir already exists') ## load_cascade num_cascade = cv2.CascadeClassifier('haar_cascade/cascade.xml') for image in os.listdir('samples'): img = cv2.imread('samples/'+image,cv2.IMREAD_GRAYSCALE) numbers = num_cascade.detectMultiScale(img) flag = False for (x,y,w,h) in numbers: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
__all__ = ['genetic', 'functions', 'fitness'] print("GPLEARN MOD")
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public void run() { System.out.println("=================="+new Date()); } }, new Date(now.getTime()+5000)); try { Thread.sleep(20000); } catch (InterruptedException e) { // TODO Auto-generated...
ise-uiuc/Magicoder-OSS-Instruct-75K
let client = Client::new(address); let client = try_ffi!(client); *out = Box::into_raw(Box::new(client)); 0 } #[doc(hidden)] #[no_mangle] pub unsafe extern "C" fn hedera_client_close(client: *mut Client) { debug_assert!(!client.is_null());
ise-uiuc/Magicoder-OSS-Instruct-75K
/// information can be parsed out of the JSON for inclusion in the `meta` /// property of the response object. If an error is encountered during /// processing, an `error` property will be added. /// The input _data_ is expected to be an object or array. If it is a string, /// ...
ise-uiuc/Magicoder-OSS-Instruct-75K
var isFollowed = false var isCurrentUser: Bool { return Auth.auth().currentUser?.uid == uid } var stats: UserStats! init(dictionary: [String: Any]) { email = dictionary["email"] as? String ?? "" fullname = dictionary["fullname"] as? String ?? ""
ise-uiuc/Magicoder-OSS-Instruct-75K
obj2 = obj[0].items.filter(item__slug=slug) if obj2.exists(): return obj2[0].quantity return 0
ise-uiuc/Magicoder-OSS-Instruct-75K
url = "https://maps.googleapis.com/maps/api/place/textsearch/json?query=123%20main%20street&key=YOUR_API_KEY" payload={} headers = {} response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
ise-uiuc/Magicoder-OSS-Instruct-75K
from . import rl from . import worlds
ise-uiuc/Magicoder-OSS-Instruct-75K
def android(): """Package Android app.""" global ran_android print("android") ran_android = True
ise-uiuc/Magicoder-OSS-Instruct-75K
MappingType_.stringtoint64map_ = new ::CoreML::Specification::StringToInt64Map; }
ise-uiuc/Magicoder-OSS-Instruct-75K
aws iam get-instance-profile --instance-profile-name "$INSTANCE_PROFILE" > /dev/null rm -f "$TRUST_POLICY" "$PERMISSIONS_POLICY" } delete_profile_for_volume_attachment() { echo "Deleting test instance profile $INSTANCE_PROFILE ..." aws iam remove-role-from-instance-profile --instance-profile-name "$IN...
ise-uiuc/Magicoder-OSS-Instruct-75K
bot.send_message(message.chat.id, 'I not understend you.', reply_markup=keyboard)
ise-uiuc/Magicoder-OSS-Instruct-75K
aclocal -I m4 autoheader autoconf
ise-uiuc/Magicoder-OSS-Instruct-75K
String hobby; } public static void main(String[] args) throws Exception { Field f1 = FieldSpy.class.getField("b"); System.out.println(f1.getType()); // System.out.println(f1.get(null)); // 只有pulic 包括父类 Field[] f2 = FieldSpy.class.getFields(); Arrays.asLi...
ise-uiuc/Magicoder-OSS-Instruct-75K
componentPosted = valispace.post("components/", component)
ise-uiuc/Magicoder-OSS-Instruct-75K
) def downgrade(): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
def download(number=-1, name="", save_dir='./'): """Download pre-trained word vector :param number: integer, default ``None`` :param save_dir: str, default './' :return: file path for downloaded file """ df = load_datasets() if number > -1: row = df.iloc[[number]] elif name: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
import { Module } from '@nestjs/common'; import { MongooseModule } from '@nestjs/mongoose'; import { PassportModule } from '@nestjs/passport'; import { PriorityController } from './priority.controller'; import { PriorityRepository } from './Priority.repository'; import { PriorityService } from './priority.service'; imp...
ise-uiuc/Magicoder-OSS-Instruct-75K
"env-variant": "No-op start", "score": 15177.10, }, {
ise-uiuc/Magicoder-OSS-Instruct-75K
def find_nearest_neighbor(image, reference_path, reference_file_names): '''
ise-uiuc/Magicoder-OSS-Instruct-75K
if not exp.analysis_type == 'blank': disable() sleep(exp.cleanup)
ise-uiuc/Magicoder-OSS-Instruct-75K
templateUrl: './post-card.component.html', styleUrls: ['./post-card.component.scss'], animations: $animations }) export class PostCardComponent implements OnInit {
ise-uiuc/Magicoder-OSS-Instruct-75K
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class buttonStop : MonoBehaviour { public static buttonStop _instance; private Image imag; public Sprite stop;
ise-uiuc/Magicoder-OSS-Instruct-75K
import pkg_resources
ise-uiuc/Magicoder-OSS-Instruct-75K
if hasattr(response, 'content'): self.visit_log.response_length = len(response.content) self.visit_log.response_body = response.content[:4096] elif 'Content-Length' in response: self.visit_log.response_length = response['Content...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Oracle typed a help response chat to the navigator, so disable gold view. # In addition, enable the navigator to do navigation. else: speaker_m.extend([{"type": "update", "action": "disable_gold_view"}]) listener_m.extend([{"type": "update", "action"...
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/usr/bin/env python """ Read TFLOC output from stdin and write out a summary in which the nth line contains the number of sites found in the nth alignment of the input. TODO: This is very special case, should it be here? """ import sys from collections import defaultdict counts = defaultdict(int) max_index = -1
ise-uiuc/Magicoder-OSS-Instruct-75K
return _ListTreeIterator(self) def _is_memory_allocated(self, node_id):
ise-uiuc/Magicoder-OSS-Instruct-75K
def func(test: str): assert test and isinstance(test, str)
ise-uiuc/Magicoder-OSS-Instruct-75K
results_dir = r'C:\Users\ecfne\Documents\Eric\Research\Stats Simulations\MUSim\results' colors = ['lightgreen', 'navy', 'cornflowerblue', 'red', 'lightcoral', 'firebrick'] make_power_figures(colors, results_dir) make_null_figures(results_dir) make_EW_figures(colors, results_d...
ise-uiuc/Magicoder-OSS-Instruct-75K
packages=find_packages(), py_modules=['antiope'], url='https://github.com/WarnerMedia/antiope-aws-module.git', python_requires='>=3.6', include_package_data=True, install_requires=[ 'boto3 >= 1.10.0', 'botocore >= 1.13.0' ] )
ise-uiuc/Magicoder-OSS-Instruct-75K
with open(folder_path + str(i) + '.json') as f: d = json.load(f) json_arr.append(d)
ise-uiuc/Magicoder-OSS-Instruct-75K
elif n2 > n1: print('O segundo número é maior') else: print('Ambos os números são iguais')
ise-uiuc/Magicoder-OSS-Instruct-75K