seed
stringlengths
1
14k
source
stringclasses
2 values
if taskval.executor == task_consts.M3TaskExecutor.TERRAFORM: perform_terraform(self.conn, self.logger, taskval.specification) self.task_queue.task_done() # if it gets here without an exception that means it is successful self.result_queue.put(taskval)
ise-uiuc/Magicoder-OSS-Instruct-75K
gemEfficiencyAnalyzerCosmicsTwoLeg = gemEfficiencyAnalyzerCosmics.clone( muonTag = 'muons', name = 'Cosmic 2-Leg STA Muon', folder = 'GEM/Efficiency/type1' ) gemEfficiencyAnalyzerCosmicsOneLeg = gemEfficiencyAnalyzerCosmics.clone( muonTag = 'muons1Leg', name = 'Cosmic 1-Leg STA Muon', folder =...
ise-uiuc/Magicoder-OSS-Instruct-75K
If explicit_room_id is set, that room will be polled for events only if it is world readable or the user has joined the room. """ if pagination_config.from_token: from_token = pagination_config.from_token else: from_token = self.event_sources.get_current_t...
ise-uiuc/Magicoder-OSS-Instruct-75K
place_holder = (M + (n - 1) * (M - m)) + positive if min_inf: place_holder = (m + (n - 1) * (m - M)) - positive
ise-uiuc/Magicoder-OSS-Instruct-75K
def yellow(text): return f"\033[93m{text}\033[0m"
ise-uiuc/Magicoder-OSS-Instruct-75K
/* Handles.DrawLine(hitPoint + v0, hitPoint + v1); Handles.DrawLine(hitPoint + v1, hitPoint + v2); Handles.DrawLine(hitPoint + v2, hitPoint + v3);
ise-uiuc/Magicoder-OSS-Instruct-75K
return SwitchOracles(config, proj_dir)
ise-uiuc/Magicoder-OSS-Instruct-75K
N, C, S, *l = map(int, open(0).read().split()) c = 0 S -= 1 ans = 0 for i in l: ans += c == S c = (c+i+N)%N ans += c == S print(ans)
ise-uiuc/Magicoder-OSS-Instruct-75K
migrations.CreateModel( name='Question', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('text', models.TextField()), ('dimensions', models.ManyToManyField(to='dimensions.Dimensio...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "Deleting draft release..." gothub delete -u justsocialapps -r holmes -t v${VERSION} -s ${TOKEN} fi rm holmes_${VERSION}_* if [[ $published ]] ; then echo "Done. You'll find your release here: https://github.com/justsocialapps/holmes/releases/tag/v${VERSION}"
ise-uiuc/Magicoder-OSS-Instruct-75K
# import some common libraries from genericpath import isdir import numpy as np import os import json
ise-uiuc/Magicoder-OSS-Instruct-75K
import SatelliteKitTests var tests = [XCTestCaseEntry]() tests += SatelliteKitTests.allTests() XCTMain(tests)
ise-uiuc/Magicoder-OSS-Instruct-75K
[Fact] public void Vector3LerpTest5() { Vector3 a = new Vector3(1.68, 2.34, 5.43); Vector3 b = a; double t = 0.18; Vector3 expected = new Vector3(1.68, 2.34, 5.43); Vector3 actual = Vector3.Lerp(a, b, t); Assert.True(MathHe...
ise-uiuc/Magicoder-OSS-Instruct-75K
}; export const PullRequestFilesChangedTab = (props: { pr: FetchThirdPartyPullRequestPullRequest; fetch: Function; setIsLoadingMessage: Function; }) => { const { pr } = props; const dispatch = useDispatch(); const derivedState = useSelector((state: CodeStreamState) => { return { providerPullRequests: state....
ise-uiuc/Magicoder-OSS-Instruct-75K
* @param scm Name of SCM * @param scmOrganisation Name of the SCM organization
ise-uiuc/Magicoder-OSS-Instruct-75K
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); return $app; } public function testLogin() { $this->visit('/login') ->type('admin', 'username') ->type('<PASSWORD>', 'password') ->press('login') ->seePageIs('/'); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
Rz = (1j * detuning / 2 * sigmaz() / 2 * dt).expm() Ry = (1j * 2 * signal_strength * sigmay() / 2 * dt / 2).expm() return Rz * Ry * Rz # Dispitive Gates
ise-uiuc/Magicoder-OSS-Instruct-75K
f"{config.MUSIC_BOT_NAME} has just restarted herself. Sorry for the issues.\n\nStart playing after 10-15 seconds again.", ) await remove_active_chat(x) await remove_active_video_chat(x) except Exception: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
sent = [-1, -1, "", -1] else: raise Exception("Illegal num_of_segments: " + str(num_of_segments)) return _replace_sent_with_str(sent, string) def _sents_from_evidences(evidences): sents = set() for evidence in evidences: for s in evidence: sent = _sent_to_str(s) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
try { M(0); } catch (...) { printf("ooops\n"); return 1; }
ise-uiuc/Magicoder-OSS-Instruct-75K
RuntimeInfoProvider runtimeInfoProvider = await RuntimeInfoProvider.CreateAsync(Client); IEnumerable<ModuleRuntimeInfo> modules = await runtimeInfoProvider.GetModules(cts.Token); var returnedModule = modules.First(m => m.Name == Name) as ModuleRuntimeInfo<Dock...
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == "__main__": with open("input", "r") as input_file: input_file_contents = input_file.readline().strip() # Convert to an array of numbers part1(parse_input_line(input_file_contents)) part2(parse_input_line(input_file_contents))
ise-uiuc/Magicoder-OSS-Instruct-75K
self.robocrys.key = "material_id" self.oxidation_states.key = "material_id" super().__init__( source=oxidation_states, target=robocrys, query=query, projection=["material_id", "structure", "deprecated"], **kwargs )
ise-uiuc/Magicoder-OSS-Instruct-75K
value: lit_string[1..lit_string.len() - 1].to_owned(), span: lit.span(), })); } else {
ise-uiuc/Magicoder-OSS-Instruct-75K
Created by Sayem on 14 March, 2021 All rights reserved. Copyright © 2020. """ from .celery import app as celery_app __author__ = "Sayem"
ise-uiuc/Magicoder-OSS-Instruct-75K
float x0d = px0[i]; for (int j = 0; j < LOOP_TIME; ++j) {
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>Andreas237/AndroidPolicyAutomation // Decompiled by Jad v1.5.8g. Copyright 2001 <NAME>. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe
ise-uiuc/Magicoder-OSS-Instruct-75K
func sceneDidEnterBackground(_ scene: UIScene) {
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, tv, *args, **kw): super().__init__(*args, **kw) self.tv = tv # override Style's configure method to reset all its TV's columns to their initial settings before it returns into TtkResizeWidget(). since we undo the TV's automatic changes before the screen redraws, there's no need t...
ise-uiuc/Magicoder-OSS-Instruct-75K
virtual void SetMapAgentIdListFloat(const std::string& param_name, const MapAgentIdListFloat& value) = 0; virtual int operator[](const std::string& param_name) = 0; virtual std::shared_ptr<Params> AddChild(const std::string& name) = 0; };
ise-uiuc/Magicoder-OSS-Instruct-75K
@{ //TODO: essa view layout não atualiza quando ocorrem requisições pelo site, e se ela não atualiza //não tem como não mostrar o menu de criar conta/login, pensar o que fazer para esconder //essa opção do menu quando existir u...
ise-uiuc/Magicoder-OSS-Instruct-75K
$updatedTerimaBarang = $this->terimaBarangRepo->update($fakeTerimaBarang, $terimaBarang->id); $this->assertModelData($fakeTerimaBarang, $updatedTerimaBarang->toArray()); $dbTerimaBarang = $this->terimaBarangRepo->find($terimaBarang->id); $this->assertModelData($fakeTerimaBarang, $dbTer...
ise-uiuc/Magicoder-OSS-Instruct-75K
using DictionaryWeb.DataClass; using System; using System.Linq; using System.Web; using System.Web.UI.WebControls;
ise-uiuc/Magicoder-OSS-Instruct-75K
from .ms1 import MS1Factory return MS1Factory() j.base.loader.makeAvailable(j, 'tools') j.tools._register('ms1', cb)
ise-uiuc/Magicoder-OSS-Instruct-75K
}; bool p2p_server::connect_to_peer( CPeer* peer ) { if ( peer->connected() ) return false; return peer->connect_peer(); }; bool p2p_server::stop_server( void ) { try
ise-uiuc/Magicoder-OSS-Instruct-75K
function addOrder(order: Order) { orders[order.orderID] = order;
ise-uiuc/Magicoder-OSS-Instruct-75K
} public String getEndereco() { return endereco; } public LocalDateTime getQuando() { return quando; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
// nothing to do here }
ise-uiuc/Magicoder-OSS-Instruct-75K
'code': 500, 'message': message }), 500) def respondBadRequest(message='Invalid data sent'):
ise-uiuc/Magicoder-OSS-Instruct-75K
def rydberg_ratio(m, n): return abs(1. / (m * m) - 1. / (n * n)) def ly_series_ratio(n): return rydberg_ratio(1, n) def ly_series_wavelength(n): return lya_center * ly_series_ratio(2) / ly_series_ratio(n) SpectralRange = collections.namedtuple( 'SpectralRange', ['name', 'low', 'high'])
ise-uiuc/Magicoder-OSS-Instruct-75K
# github: https://github.com/dongrixinyu/JioNLP # description: Preprocessing tool for Chinese NLP
ise-uiuc/Magicoder-OSS-Instruct-75K
'"Ubuntu"') sudo apt-get update -y; sudo apt-get install git unzip awscli wget -y git clone https://github.com/anandjain/aws-custom-metrics.git echo "
ise-uiuc/Magicoder-OSS-Instruct-75K
class AbstractAnnotator(abc.ABC):
ise-uiuc/Magicoder-OSS-Instruct-75K
sqlite> .read lab12.sql """, 'teardown': '', 'type': 'sqlite' } ] }
ise-uiuc/Magicoder-OSS-Instruct-75K
} return true; //}
ise-uiuc/Magicoder-OSS-Instruct-75K
""" main block """ def __init__(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Usage: merge_pandas_conll --out=OUTPUT_FN <filenames>... Merge a list of data frames in csv format and print to output file. """ from docopt import docopt import pandas as pd
ise-uiuc/Magicoder-OSS-Instruct-75K
for feature in feature_list: AnnotatedFunctions._AddFunction('Feature:%s' % feature, function) return AnnotatedFunctions._AddFunction('Feature', function) return _AddFeatures
ise-uiuc/Magicoder-OSS-Instruct-75K
<h1>Category Details</h1> </section> <!-- Main content --> <section class="content"> <div class="row"> <!-- left column --> <div class="col-xs-12"> <!-- general form elements -->
ise-uiuc/Magicoder-OSS-Instruct-75K
Id = Constants.MAIN_SITE_ID, DefaultLocaleId = "default", DefaultPathWhenNotFound = "/404", Domains = new System.Collections.Generic.List<string> { "localhost:5104", "localhost:5104" }, Enable = true, Name = "Personal Blog S...
ise-uiuc/Magicoder-OSS-Instruct-75K
[Parameter(Mandatory = true, HelpMessage = "The site relative folder path of the page to be added")] [Alias("Folder")]
ise-uiuc/Magicoder-OSS-Instruct-75K
} coord.l1_norm() } fn solve_part2(moves: &Vec<Move>) -> isize {
ise-uiuc/Magicoder-OSS-Instruct-75K
'default': { 'ATOMIC_REQUESTS': True, 'ENGINE': 'django.db.backends.mysql', 'NAME': 'spug', 'USER': 'spug', 'PASSWORD': '<PASSWORD>', 'HOST': '127.0.0.1', 'OPTIONS': { 'charset': 'utf8mb4', 'sql_mode': 'STRICT_TRANS_TABLES', }
ise-uiuc/Magicoder-OSS-Instruct-75K
Parameters ---------- storage: object Storage object. table: str Table name. schema: str Path to schema file. data: str Path to data file. """
ise-uiuc/Magicoder-OSS-Instruct-75K
password = "<PASSWORD>" login_flag = False print("Welcome to GoozOS") usr = input("Username: ") if usr == username:
ise-uiuc/Magicoder-OSS-Instruct-75K
<div className="form-group"> <label>Password</label> <input type="password" className="form-control" placeholder="<PASSWORD> a password" />
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public boolean contains(float lat, float lon) { return minLat <= lat && maxLat >= lat && minLon <= lon && maxLon >= lon; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Test passing kwargs to Amenity instantation """ json_dict = self.a1.to_dict() a2 = Amenity(**json_dict) self.assertEqual(self.a1.id, a2.id) self.assertEqual(self.a1.created_at, a2.created_at) self.assertEqual(self.a1.updated_at, a2.updated_at) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
#coding: utf-8 #date: 2018/7/30 19:07 #author: zhou_le
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ @PreAuthorize(hasPermi = "wms:outstoreHistory:remove") @Log(title = "出库单快照", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(wmsOutstoreHistoryService.deleteWmsOutstoreHistoryByIds(ids)); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
transforms.Resize((224, 224)), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) ]) self.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") def __getitem__(self, idx): if torch.is_tenso...
ise-uiuc/Magicoder-OSS-Instruct-75K
$query->whereMonth('created_at',Carbon::parse($month)->month);//wheremonth expected month as 5.3..that mean in number so we have to parse month } if($year= $filters['yr']) { $query->whereYear('created_at',$year); } } public static function archive() { return stati...
ise-uiuc/Magicoder-OSS-Instruct-75K
sieve = [True] * n m = int(n ** 0.5) for i in range(2, m + 1): if sieve[i] == True: for j in range(i + i, n, i): sieve[j] = False
ise-uiuc/Magicoder-OSS-Instruct-75K
data = fopen("file.txt", "w+");
ise-uiuc/Magicoder-OSS-Instruct-75K
@dataclass class PreprocessingArguments: """Arguments for data preprocessing.""" code_vocab_size: int = field( default=50000, metadata={'help': 'Maximum size of code vocab'} ) nl_vocab_size: int = field( default=30000,
ise-uiuc/Magicoder-OSS-Instruct-75K
0x13 : "LE SCH Connection_Parameter_Update_Response", 0x14 : "LE SCH LE_Credit_Based_Connection Request", 0x15 : "LE SCH LE_Credit_Based_Connection Response", 0x16 : "LE SCH LE_Flow_Control_Credit",
ise-uiuc/Magicoder-OSS-Instruct-75K
CollectionOwnershipPermissionPolicy) from wagtailvideos import get_video_model from wagtailvideos.models import Video
ise-uiuc/Magicoder-OSS-Instruct-75K
id = models.AutoField(primary_key=True) description = models.TextField(max_length=250) url = models.URLField() price = models.DecimalField(max_digits=10, decimal_places=2) #Changed the float to decimal due to rounding issues developer = models.ForeignKey('Profile', related_name='developed_games', nu...
ise-uiuc/Magicoder-OSS-Instruct-75K
m, n = matrixSize return rowSub * (n - 1) + colSub - 1 inds = sub2ind(depth.shape, velo_pts_im[:, 1], velo_pts_im[:, 0]) dupe_inds = [item for item, count in Counter(inds).items() if count > 1] for dd in dupe_inds: pts = np.where(inds == dd)[0] x_...
ise-uiuc/Magicoder-OSS-Instruct-75K
from .spath import Path
ise-uiuc/Magicoder-OSS-Instruct-75K
* POSSIBILITY OF SUCH DAMAGE.
ise-uiuc/Magicoder-OSS-Instruct-75K
h.update(text) return str(h.hexdigest()) print(get_hash_password('password')) print(get_hash_password('password', 'salt'))
ise-uiuc/Magicoder-OSS-Instruct-75K
self.loop_rate = rospy.Rate(1) # ROS param self.isSimMode = rospy.get_param('~simMode')
ise-uiuc/Magicoder-OSS-Instruct-75K
let root_clone = root.clone(); let e = root.create_lazy_namespace( "constants", Box::new(move |env| { env.declare("true", Value::Bool(true))?; env.declare("false", Value::Bool(false))?; env.declare("global", Value::Scope(root_clone))?; Ok(()) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
if (linking_fd.linked_fd_) { throw usage_error{
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <rr_common/planning/annealing_optimizer.h> #include <rr_common/planning/planning_utils.h> #include <parameter_assertions/assertions.h>
ise-uiuc/Magicoder-OSS-Instruct-75K
for file_prefix in all_files: print(file_prefix) markdown_text='' #Inject a heading and doc-type intro (markdown format) markdown_text = inject_top_level_docs(markdown_text,file_prefix) output_file_name_md_withdir = output_dir+file_prefix+'.md' print("Output filename (md): %s" % output_file_nam...
ise-uiuc/Magicoder-OSS-Instruct-75K
impl Display for EncodingError { fn fmt(&self, f: &mut alloc::fmt::Formatter<'_>) -> alloc::fmt::Result { use EncodingError::*; match self { InvalidAppSegment(nr) => write!(f, "Invalid app segment number: {}", nr),
ise-uiuc/Magicoder-OSS-Instruct-75K
pub use gpioi::*;
ise-uiuc/Magicoder-OSS-Instruct-75K
topLayoutConstraint.constant = max(min(-offset, 0), min(-(height - limit), 0)) } // MARK: - Private private let gradientView = GradientView() private var topLayoutConstraint: NSLayoutConstraint! private func setupView() { backgroundColor = .clear let backgroundViewContainer = UIView()
ise-uiuc/Magicoder-OSS-Instruct-75K
/// This upgrades the lifetime to `'static`. /// /// # Example /// ```rust /// # use kserd::*; /// let kstr = Kstr::brwed("Hello, world!"); /// assert_eq!(kstr.to_owned(), Kstr::owned(String::from("Hello, world!"))); /// ``` pub fn into_owned(self) -> Kstr<'static> { Kstr::ow...
ise-uiuc/Magicoder-OSS-Instruct-75K
export const createGetComponentName = (component: string): (classNameSuffix?: string) => string => { const componentName = `${COMPONENT_NAME_PREFIX}-${component}`; // return class name getter function return (classNameSuffix?: string): string => { return classNameSuffix ? `${componentName}-${classNameSuffix}`...
ise-uiuc/Magicoder-OSS-Instruct-75K
]; return redirect()->back()->with($response)->withInput(); } } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $task = $this->task_model->find($...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_run_command_should_raise_an_exception_when_it_cannot_execute_the_command(self): self.__it_should_raise_an_exception_when_it_cannot_execute_the_command( lambda: shellutil.run_command("nonexistent_command")) def test_run_pipe_should_raise_an_exception_when_it_cannot_execute_the_pipe...
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace ES.FX.Alexa.CustomSkill { public class Intent
ise-uiuc/Magicoder-OSS-Instruct-75K
def get(self, request, *args, **kwargs): return JsonResponse({"ok": "Get response work!"})
ise-uiuc/Magicoder-OSS-Instruct-75K
} bool CCommandLineProcessor::Process( const wchar_t* szParams ) { return false; }
ise-uiuc/Magicoder-OSS-Instruct-75K
tiny.do.everything(pki, pkcs12 = True) print("Observe the pki changes") tiny.show(pki)
ise-uiuc/Magicoder-OSS-Instruct-75K
cin >> cases; while(cases--){ found=false; cin >> n; if(n>30){
ise-uiuc/Magicoder-OSS-Instruct-75K
def main(): parser = argparse.ArgumentParser() parser.add_argument('-i', '--input_image', default='sample.bmp', type=str, help= '(Full name of the input image -- default set to sample.bmp') parser.add_argument('-o', '--output_image', default='sample.png', type=str, help='Full name of output image (should...
ise-uiuc/Magicoder-OSS-Instruct-75K
if compare_array(result, expected_matrix.values, LARGE_EPSILON): queue.put(None) else: queue.put("""Incorrect result after calling gradient_magnitude with: d_x:
ise-uiuc/Magicoder-OSS-Instruct-75K
# significantly altered. Thank you! # ---------------------------------------------------------------------------- if [[ "$STUDIO_TYPE" = "stage1" ]]; then pkg_build_deps=( core/gcc ) fi
ise-uiuc/Magicoder-OSS-Instruct-75K
class User(AbstractUser):
ise-uiuc/Magicoder-OSS-Instruct-75K
if settings.DEBUG: router = DefaultRouter() else: router = SimpleRouter() router.register("users", UserViewSet) router.register("passenger", PassengerViewSet, basename="passengers") router.register("drivers", DriverViewSet, basename="drivers") router.register("buses", BusesViewSet, basename="buses") router.re...
ise-uiuc/Magicoder-OSS-Instruct-75K
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substanti...
ise-uiuc/Magicoder-OSS-Instruct-75K
String expected = "Answer{aid=null, qid=2, answerText='Test Answer', isCorrect=true}"; assertEquals(expected, answer.toString());
ise-uiuc/Magicoder-OSS-Instruct-75K
using System; namespace ShanoLibraries.MVVM.DependencyInjection { /// <summary> /// An abstraction over an IOC container to be used by <see cref="InjectingViewModel"./> /// Implemented by <see cref="DependencyProvider{TContainer}"/> /// </summary> public interface IDependencyProvider {
ise-uiuc/Magicoder-OSS-Instruct-75K
continue else: order = find_order(i, n) if (order == phi): p_root_list.append(i) else: continue return p_root_list
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.util.List; @Service public class CustomPageService<T> { public Page<T> customPage(List<T> list, Pageable pageable) {
ise-uiuc/Magicoder-OSS-Instruct-75K
{ using System.Collections.Generic; /// <summary>
ise-uiuc/Magicoder-OSS-Instruct-75K