seed
stringlengths
1
14k
source
stringclasses
2 values
from collections import defaultdict from math import ceil, sqrt def solution(t_limit: int = 1000000, n_limit: int = 10) -> int: """ Return the sum of N(n) for 1 <= n <= n_limit.
ise-uiuc/Magicoder-OSS-Instruct-75K
app = Flask(__name__) app.register_blueprint(user.bp, url_prefix='/User') app.register_blueprint(attendance.bp, url_prefix='/Attend')
ise-uiuc/Magicoder-OSS-Instruct-75K
// MARK: - Initializer /// Initializes a `NavigationRow` with a title and a subtitle.
ise-uiuc/Magicoder-OSS-Instruct-75K
""" ) }
ise-uiuc/Magicoder-OSS-Instruct-75K
dev_import dev io dev_import dev io cmd_color() { dev_info "This is a info message." dev_success "This is a success message." dev_warning "This is a warning message." dev_error "This is a error message." } cmd_stdout_and_stderr() { echo "message-0" echo "error-0" >&2
ise-uiuc/Magicoder-OSS-Instruct-75K
yaml_round_trip_load) from dodo_commands.framework.config import merge_into_config from dodo_commands.framework.paths import Paths def create_config_dir(config_dir):
ise-uiuc/Magicoder-OSS-Instruct-75K
@hp.given( precontents=st.lists(st.binary(max_size=2), min_size=0, max_size=4), contents=st.lists(st.binary(max_size=2), min_size=0, max_size=4) ) @hp.example(precontents=[], contents=[]) @hp.example(precontents=[b''], contents=[b'ab'])
ise-uiuc/Magicoder-OSS-Instruct-75K
export type ReviewCardProps = { cover: string; link: string; }; const ReviewCard = ({ cover, link }: ReviewCardProps) => ( <S.Wrapper href={link}> <S.Image src={cover} alt="review card" /> </S.Wrapper> ); export default ReviewCard;
ise-uiuc/Magicoder-OSS-Instruct-75K
python3 -m python_sources.master.run_scenario_service
ise-uiuc/Magicoder-OSS-Instruct-75K
} Self::Var(index) => { return write!(f, "{}", index); } Self::Ident(ident) => { return write!(f, "{}", ident); } }; f.write_str(s) } } impl FromStr for ListOp {
ise-uiuc/Magicoder-OSS-Instruct-75K
print('Experiment name2: ', exp_name2) print('Output directory: ', out_dir2) generator = get_derivable_generator(args.gan_model, args.inversion_type, args) generator = torch.nn.DataParallel(generator) generator.cuda() fmap_size, fmap_ch, image_size, image_ch = get_generator_info(args, generato...
ise-uiuc/Magicoder-OSS-Instruct-75K
private MenuTheme(string name, int value) : base(name, value) { } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
using Sdl.Desktop.IntegrationApi.Extensions; using Sdl.TellMe.ProviderApi; using Sdl.TranslationStudioAutomation.IntegrationApi; using Sdl.TranslationStudioAutomation.IntegrationApi.Extensions;
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace HoloLight.Isar.Shared { internal static class Fmt { public static readonly string LogFormat = "{0}({1}): [{2}] {3}"; //public static readonly string LogFormatExtended = "{0}({1}): [{2}] {3}\n{4}"; } internal static class Debug
ise-uiuc/Magicoder-OSS-Instruct-75K
labelText = 'Agent ID'; message: string; isValueValid: boolean; placeholder$: Observable<string>; private lengthGuide: string; private MAX_CHAR = 24; constructor( private changeDetectorRef: ChangeDetectorRef, private translateService: TranslateService, private trans...
ise-uiuc/Magicoder-OSS-Instruct-75K
print("0")
ise-uiuc/Magicoder-OSS-Instruct-75K
$distance = $spd * $dur; /* Some magic if we have a line or a string! */ $lats = Array(); $lons = Array(); if ($row["lat"]){ $lats[] = floatval($row["lat"]); $lons[] = floatval($row["lon"]); } else if ($row["line"]){ preg_match_all('/(?P<lon>[0-9\.\-]+) (?P<lat>[0-9\.\-]+)/', $row["line"], $matches);...
ise-uiuc/Magicoder-OSS-Instruct-75K
import Inserter class Main(object):
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Writing database to file") self.save() downloadCounter = 0 self.save() def __getitem__(self, number):
ise-uiuc/Magicoder-OSS-Instruct-75K
} } protected void FocusExit(FocusArgs args) {
ise-uiuc/Magicoder-OSS-Instruct-75K
this.authenticationManager = authenticationManager; setFilterProcessesUrl("/v1/oauth/login"); } @Override public Authentication attemptAuthentication(HttpServletRequest req, HttpServletResponse res) throws AuthenticationException { try { UserModel user = new ObjectMapper().readValue(req.getInputStream(), U...
ise-uiuc/Magicoder-OSS-Instruct-75K
returned. """ response = test_client.get("/register") assert response is not None assert response.status_code == 200 assert b"Register" in response.data
ise-uiuc/Magicoder-OSS-Instruct-75K
from .refcocog_infocpler import RefCOCOgInfoCpler from .refclef_infocpler import RefClefInfoCpler from .hatefulememes_infocpler import HatefulMemesInfoCpler from .visualentailment_infocpler import VisualEntailmentInfoCpler from .lxmertpretrain_infocpler import LXMERTPreTrainInfoCpler from .m4c import *
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php if( $controller->hasAccess('add-quote') ): ?> <a href="<?php echo site_url( $class_name."/save" ); ?>" style="display: inline;"> <i class="fa fa-plus"></i>
ise-uiuc/Magicoder-OSS-Instruct-75K
rospy.sleep(4)
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace App\Http\Controllers; use Illuminate\Http\Request;
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.conf.urls.defaults import patterns, url
ise-uiuc/Magicoder-OSS-Instruct-75K
SearchResults = new ObservableCollection<object>(); } private bool CanExecuteSearchCommand() { return !string.IsNullOrWhiteSpace( SearchQuery ); } private async void ExecuteSearchCommand() { IsSearching = true; var context = ContextList.Contexts.First(); SearchResults.Clear(); switch( M...
ise-uiuc/Magicoder-OSS-Instruct-75K
APP_DIR="$PWD" docker run --rm --name research_share -v $APP_DIR:/usr/app -v :/usr/app/node_modules -p 3000:3000 -it node:latest /bin/bash -c "cd /usr/app && npm install && npm start"
ise-uiuc/Magicoder-OSS-Instruct-75K
except ValueError: warnings.warn( "Coudln't convert input color array to a proper numpy array." " Please make sure that your input data is in a parsable format." " Converting input to a white color array." ) return np.ones((max(len(colors), 1), 4), dtype=n...
ise-uiuc/Magicoder-OSS-Instruct-75K
x >= z, ] substitutions = {'z': 1} return constraints, substitutions
ise-uiuc/Magicoder-OSS-Instruct-75K
'bridge_relation'=>$bridge_relation, 'bridge_column'=>PropertyInfo::BRIDGED_MODEL_META[$model_key]['column'], 'serve_id'=>$serve_id ]);
ise-uiuc/Magicoder-OSS-Instruct-75K
{ let _db_guard = proto::open_db(dir.path()).unwrap(); assert_eq!(msg, proto::SingleRecord::get().unwrap()); } } #[test] fn case_insensitive() { let dir = tempdir().expect("Failed to create temp dir"); let msg = proto::CaseInsensitive { id: String::from("test"), }; { let _db_guard = proto::...
ise-uiuc/Magicoder-OSS-Instruct-75K
self._image_dim)
ise-uiuc/Magicoder-OSS-Instruct-75K
from docopt import docopt args = docopt(__doc__) schema = schema.Schema({'--algos': schema.And(list, [lambda n: n in ['BFS', 'parallel_coloring']]), '--help': bool, '--has-GRU': bool, '--num-seeds': schema.Use(int), ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def main(_): (train_images, train_labels), (test_images, test_labels) = ( datasets.cifar10.load_data()) # Normalize pixel values to be between 0 and 1 train_images, test_images = train_images / 255.0, test_images / 255.0 strategy = tf.distribute.MirroredStrategy()
ise-uiuc/Magicoder-OSS-Instruct-75K
if isinstance(IN[0], list): OUT = [GetElevationMarkerView(x) for x in items] else: OUT = GetElevationMarkerView(items)
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>100-1000 using Stashbox.Lifetime; using Xunit; namespace Stashbox.Tests.IssueTests { public class DefinesScopeDoesNotWorkCorrectly {
ise-uiuc/Magicoder-OSS-Instruct-75K
{ public static void Run() {
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
ise-uiuc/Magicoder-OSS-Instruct-75K
private $systemConfigService; /** * @var SalesChannelContext */ private $salesChannelContext; protected function setUp(): void {
ise-uiuc/Magicoder-OSS-Instruct-75K
if [ -f 'ppm-error.txt' ] ; then ppm_error="$(cat ppm-error.txt)" else ppm_error='0' fi rtl_fm_command="rtl_fm -f 144.390M -s 22050 -l ${squelch_level} -p ${ppm_error} -"
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; /** * * @author Victor */ @RunWith(Parameterized.class) @SuppressWarnings("static-access") public class AFSymbolsRemoverTest { AdminFrame frame;
ise-uiuc/Magicoder-OSS-Instruct-75K
import logging import os h = logging.FileHandler(".i3pystatus-" + str(os.getpid()), delay=True) logger = logging.getLogger("i3pystatus") logger.addHandler(h) logger.setLevel(logging.CRITICAL) __path__ = extend_path(__path__, __name__) __all__ = [ "Status",
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/sh ssh pi<EMAIL>.local "/home/pi/vision/stop_vision.sh"
ise-uiuc/Magicoder-OSS-Instruct-75K
UpdateUsername(username) => { self.username = username; } UpdatePassword(password) => { self.password = password; }
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Name = property(lambda self: object(), lambda self, v: None, lambda self: None)
ise-uiuc/Magicoder-OSS-Instruct-75K
print("common_last") #---------------------------------------------------------------------------------------------- parser = argparse.ArgumentParser(description='Set up system for build.') parser.add_argument('-n', '--nop', action="store_true", help='no operation') # parser.add_argument('--bool', action="sto...
ise-uiuc/Magicoder-OSS-Instruct-75K
@pulumi.getter def value(self) -> pulumi.Input[str]: return pulumi.get(self, "value") @value.setter def value(self, value: pulumi.Input[str]): pulumi.set(self, "value", value) @pulumi.input_type class BranchBasicAuthConfigArgs:
ise-uiuc/Magicoder-OSS-Instruct-75K
is_throws = False while self.__tokens[pos].get_value() not in ('{', ';'): if self.__tokens[pos].get_value() == 'throws': is_throws = True elif is_throws and self.__tokens[pos].get_type() == TokenType.IDENTIFIER:
ise-uiuc/Magicoder-OSS-Instruct-75K
import copy class CooSparseMatrix: def _prepare_coords(self, coords): i, j = tuple(map(int, coords)) if 0 > i or i >= self.Shape[0] or 0 > j or j >= self.Shape[1]: raise TypeError return i, j def __get_copy(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
class Solution: # @param A : tuple of integers # @param B : tuple of integers # @return a list of integers def intersect(self, A, B): res = [] n = len(A) m = len(B) i = 0 j = 0
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php $pdo = new PDO('mysql:host=localhost;dbname=modulo_8','root',''); ?>
ise-uiuc/Magicoder-OSS-Instruct-75K
warn?: boolean; } export const MiniTokenDisplay: FC<Props> = (props) => { return ( <div className={styles.container}> <div
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "Content-Language: zh-CN" echo "" cd /my-blog/ if [ ! -d "blog" ]; then mkdir /my-blog/blog fi cd /my-blog/blog/ if [ ! -d "public" ]; then
ise-uiuc/Magicoder-OSS-Instruct-75K
if nei not in color: color[nei] = 1-color[cur] q.append(nei) return True
ise-uiuc/Magicoder-OSS-Instruct-75K
Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors Licensed under Apache License v2.0 with Runtime Library Exception See https://swift.org/LICENSE.txt for license information See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors ----------------------------------------...
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, in_channels, **kwargs): super(RPNHead, self).__init__(2, in_channels, **kwargs) def _init_layers(self): self.rpn_conv = nn.Conv2d( self.in_channels, self.feat_channels, 3, padding=1) self.rpn_cls = nn.Conv2d(self.feat_channels, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} public static int Main() {
ise-uiuc/Magicoder-OSS-Instruct-75K
} fn erlang_record_headers(
ise-uiuc/Magicoder-OSS-Instruct-75K
#FUNCTION: histdarts #PURPOSE: This function is meant to plot a histogram of the estimated pi value of several dart simulations. #INPUTS: Number of histogram points; number of darts per simulation def histdarts(numdarts, numsims): #Below Section: Generates several simulations of given number of darts each estpis = n...
ise-uiuc/Magicoder-OSS-Instruct-75K
'Yo momma so fat a vampire bit her and got Type 2 diabetes', 'Yo momma so fat she uses butter for her chapstick',
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "<i class='fa fa-trash'></i></a>"; echo "</td>"; echo'</tr>'; } ?> </tbody> </table> </div><!-- /.box-body...
ise-uiuc/Magicoder-OSS-Instruct-75K
await api.equip_part(item_value['id']) await api.get_opponent() for item_type, item_value in now_equipment_ids.items(): if bad_equipment_ids.get(item_type) is not None: await api.equip_part(item_value) loot_fight = await api.play_...
ise-uiuc/Magicoder-OSS-Instruct-75K
for words, oririn_repre, aug_repre_ids, mask in train_iterator: model.train() optimizer.zero_grad() batch_num += 1 if batch_num % 1000 == 0: print('sample = {b}, loss = {a}'.format(a=epoch_loss/batch_num, b=batch_num*args.batch_size)) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
" was provided, but need four arguments, " + "delta, margin" + "ratio of comparisons, if dense " + "labels are supposed to be evaluated." ) raise Exception(msg) print("WhdrHingeLossLayer uses", ...
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 gove...
ise-uiuc/Magicoder-OSS-Instruct-75K
import akka.testkit.TestActorRef; import no.ks.eventstore2.Eventstore2TestKit; import no.ks.eventstore2.Handler; import org.junit.Test; import java.util.UUID; import static junit.framework.Assert.assertTrue;
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by Rucha Tambe on 3/21/21. // import SwiftUI import WebKit struct HTMLView: UIViewRepresentable{ let htmlString: String func makeUIView(context: Context) -> WKWebView { return WKWebView()
ise-uiuc/Magicoder-OSS-Instruct-75K
base.OnApplyTemplate(); var itemsControl = GetTemplateChild("PART_Items") as Panel; _items = itemsControl?.Children; } /// <summary> /// Shows a toast inside the notification area /// </summary> /// <param name="content">The content that shoul...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub fn run_command(mut command: String) -> String { if !command.is_empty() { match command.as_str() { ":" => {}
ise-uiuc/Magicoder-OSS-Instruct-75K
@pytest.fixture(scope="session") def text():
ise-uiuc/Magicoder-OSS-Instruct-75K
""" SKU of the namespace. :param pulumi.Input['SkuName'] name: Name of this SKU. :param pulumi.Input['SkuTier'] tier: The tier of this SKU. """ pulumi.set(__self__, "name", name) if tier is not None: pulumi.set(__self__, "tier", tier) @property ...
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash OUT=../README.md cat ./readme-intro.md > ${OUT} echo -e "\n---\n\n" >> ${OUT} ./self-doc-gen.sh >> ${OUT} echo -e "\n---\n\n" >> ${OUT} cat ./Copyright.md >> ${OUT}
ise-uiuc/Magicoder-OSS-Instruct-75K
for chain_value, call in product(CHAINS, TOKEN_HANDLER_METHODS): TOKEN_PARAMS.append([chain_value] + call[:2] + [chain_value in call[2]]) @pytest.mark.parametrize("chain,method,parameters,raises", TOKEN_PARAMS) def test_token_handler(chain, method, parameters, raises): handler = TokenHandler(initial_headers=H...
ise-uiuc/Magicoder-OSS-Instruct-75K
Input: n = 1 Output: [0] Constraints: 1 <= n <= 1000 """ from typing import List class Solution:
ise-uiuc/Magicoder-OSS-Instruct-75K
}) }) .next() .map(|(index, _)| index as i64 + 1) .unwrap() } }
ise-uiuc/Magicoder-OSS-Instruct-75K
Add any Pluggable Transport method TYPE found in the **line** to the list of ``transports``. Currently, a request for a transport is recognized if the email line contains the ``'transport'`` command. :param str line: The line from the email wherein the client requested some...
ise-uiuc/Magicoder-OSS-Instruct-75K
ROS_MASTER_URI="http://localhost:${ROS_PORT}" /srv/maverick/software/ros/current/bin/roslaunch mavros ${MAVROS_LAUNCHER} fcu_url:=tcp://localhost:${MAVLINK_PORT} >/srv/maverick/var/log/ros/$1/mavros.$DT.log 2>&1
ise-uiuc/Magicoder-OSS-Instruct-75K
fileprivate var authenticatedTriggers: [VoidClosure] = [] fileprivate var authenticationRequest: DataRequest? fileprivate let lock = NSLock()
ise-uiuc/Magicoder-OSS-Instruct-75K
Form.setObjectName("Form") Form.resize(428, 544) self.horizontalLayout_2 = QtWidgets.QHBoxLayout(Form) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setSpacing(0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.cha...
ise-uiuc/Magicoder-OSS-Instruct-75K
from .seam_data import SEAM, TileBase
ise-uiuc/Magicoder-OSS-Instruct-75K
init { deinit { class A { }
ise-uiuc/Magicoder-OSS-Instruct-75K
from molsysmt import puw
ise-uiuc/Magicoder-OSS-Instruct-75K
accessed by other users on your system. The warning reads "Unsafe permissions on credentials configuration file", followed by the path to the credentials file. This warning will be emitted each time Certbot uses the credentials file, including for renewal, and cannot be silenced except by addressing the issue (e.g., by...
ise-uiuc/Magicoder-OSS-Instruct-75K
for e in events: row = [
ise-uiuc/Magicoder-OSS-Instruct-75K
image = get_image(page) if image is not None: embed.set_thumbnail(url=image) embed.set_footer(text='Powered by Wikipedia API',
ise-uiuc/Magicoder-OSS-Instruct-75K
float num1, num2, num3, sum, diff, prod, quot, average; //declares the variables needed for the program. cout<<"Hello. Welcome to the OPERATIONS program. \n"; //First prompt/text for the user to read. cout<<"Please enter three numbers to use this program.\n"; //Asks for ...
ise-uiuc/Magicoder-OSS-Instruct-75K
@State(Scope.Benchmark)
ise-uiuc/Magicoder-OSS-Instruct-75K
if self.dns == False:
ise-uiuc/Magicoder-OSS-Instruct-75K
cc_info = None compilation_context = cc_common.create_compilation_context() providers = [ # We must repropagate the dependencies' DefaultInfos, otherwise we # will lose runtime dependencies that the library expects to be # there during a test (or a regular `bazel run`). ...
ise-uiuc/Magicoder-OSS-Instruct-75K
NSM_VERSION="0.6.0" echo "remove mesh" nginx-meshctl remove echo "delete images" gcloud container images delete "gcr.io/${GCP_PROJECT}/nginx-mesh-api:v${NSM_VERSION}" gcloud container images delete "gcr.io/${GCP_PROJECT}/nginx-mesh-sidecar:v${NSM_VERSION}" gcloud container images delete "gcr.io/${GCP_PROJECT}/nginx-m...
ise-uiuc/Magicoder-OSS-Instruct-75K
class Emissive(Material): def __init__(self, color, **kwargs): if isinstance(color, vec3): self.texture_color = solid_color(color) elif isinstance(color, texture): self.texture_color = color super().__init__(**kwargs) def get_color(self, scene, ray,...
ise-uiuc/Magicoder-OSS-Instruct-75K
<CopyRight /> </div> </> );
ise-uiuc/Magicoder-OSS-Instruct-75K
else: name = os.environ["EXP"] print("Running experiment: {} (from environment variable).".format(name)) config = util.get_config("experiments.conf")[name] config["log_dir"] = util.mkdirs(os.path.join(config["log_root"], name)) # Dynamic batch size. config["batch_size"] = -1 config["max_tokens_per...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>quantsegu/Python-Reusable-Scripts<filename>GitHubCode/untitled0.py<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Fri Apr 24 20:46:29 2020 @author: segul """ import math i = "1" print(i) for x in range(10**100): print(0)
ise-uiuc/Magicoder-OSS-Instruct-75K
deviceName = std::string(hostname);
ise-uiuc/Magicoder-OSS-Instruct-75K
unsigned int win_width = win.getSize().x; unsigned int win_height = win.getSize().y; const float epsilon = 1E-4; if (position.x < dist_threshold) { repelling_force.x += dist_threshold / position.x; } else if (position.x > win_width - dist_threshold) { int delta = position.x - win_w...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Kernel initializer ki = tf.keras.initializers.glorot_uniform(seed=seed) # Architecture
ise-uiuc/Magicoder-OSS-Instruct-75K
features = [] with TTFont(font_file) as font:
ise-uiuc/Magicoder-OSS-Instruct-75K