seed
stringlengths
1
14k
source
stringclasses
2 values
TEST_CASE("Day 5 getSeatInfo works", "[2020][Day05]") { const auto indexes = Day05Puzzle::getSeatInfo("FBFBBFFRLR"); REQUIRE(44 == indexes.row); REQUIRE(5 == indexes.column); REQUIRE(357 == indexes.seatId); } TEST_CASE("Day 5 Part 1 Example work", "[2020][Day05]") { const std::vector<std::string...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.addrule("!PKG_EXIST=dummy") self.addrule("PKG_EXIST=replace")
ise-uiuc/Magicoder-OSS-Instruct-75K
print('Error in saving pickle') # Make a few tweets using the data for i in range(5):
ise-uiuc/Magicoder-OSS-Instruct-75K
print(line.decode('utf-8').strip()) else: container = client.containers.run('paloaltonetworks/pan-ansible', "ansible-playbook otp.yml -e "+ansible_variables+" -i inventory.yml", auto_remove=True, volumes_from=socket.gethostname(), working_dir=os.getcwd(), user=os.getuid(), detach=True) for line in conta...
ise-uiuc/Magicoder-OSS-Instruct-75K
url='https://github.com/wlwg/sns-message-validator', python_requires='>=3.7', install_requires=DEPENDENCIES, packages=find_packages(exclude=EXCLUDED_PACKAGES), )
ise-uiuc/Magicoder-OSS-Instruct-75K
// 不存在,则记录查询次数,未超过次数,返回UNKNOW,超过次数,返回ROLLBACK_MESSAGE
ise-uiuc/Magicoder-OSS-Instruct-75K
export const getWeekday = (): { index: number; string: string } => { const array = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']; const index = random(6); return { index, string: array[index], }; };
ise-uiuc/Magicoder-OSS-Instruct-75K
ROOT_URLCONF = 'wtfhack.urls'
ise-uiuc/Magicoder-OSS-Instruct-75K
java -Djava.library.path=`pwd`/lib/native/linux-amd64 -jar composerApp.jar
ise-uiuc/Magicoder-OSS-Instruct-75K
} AZUIK_TEST_CASE(any_of) { std::vector<int> v1{1, 2, 3, 4, 5}; std::vector<int> v2{2, 2, 2, 2, 2}; AZUIK_TEST(core::any_of(v1, 3) == true); AZUIK_TEST(core::any_of(v2, 6) == false); AZUIK_TEST(core::any_of(v2, 3) == false); AZUIK_TEST(core::any_of(v2, 2) == t...
ise-uiuc/Magicoder-OSS-Instruct-75K
} else if (conversion.getStatus() == AssetConversionStatus.FAILED) {
ise-uiuc/Magicoder-OSS-Instruct-75K
if len(training_set) == 0: load_dataset(data_set_path, training) if training: predictions = fit(test_set, training_set, k) accuracy = calculate_accuracy(test_set, predictions) print('Accuracy: ' + repr(accuracy) + '%') else: predictions = fit(to_predict, training_set...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Show an error message in the web interface (at next request).
ise-uiuc/Magicoder-OSS-Instruct-75K
get {
ise-uiuc/Magicoder-OSS-Instruct-75K
{ try { ConfigInstallation configInstallation = new ConfigInstallation(); string configInstallationPath = Path.Combine(projectDirectory, "I"); configInstallation.Load(configInstallationPath); Console.Write(configInstallation...
ise-uiuc/Magicoder-OSS-Instruct-75K
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); else if(input.isKeyPressed(GLFW_KEY_F2)) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
ise-uiuc/Magicoder-OSS-Instruct-75K
Support for generating documentation readmes for the extensions. Extracts from decorated lua block comments and xml comments. ''' from pathlib import Path from lxml import etree import sys from itertools import chain
ise-uiuc/Magicoder-OSS-Instruct-75K
urlparse.urljoin(Investigate.BASE_URL, uri), params=params, data=data, headers=self._auth_header ) def _request_parse(self, method, *args): r = method(*args) r.raise_for_status()
ise-uiuc/Magicoder-OSS-Instruct-75K
QUOTA=25 WARN_FROM=10 if ! [[ $TEAM =~ ^[0-9]+$ ]]; then echo "team number validation error" exit 1 fi vm="test_team${TEAM}" VBoxManage snapshot "$vm" delete "$NAME"
ise-uiuc/Magicoder-OSS-Instruct-75K
"Service": "apigateway.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } client = boto3.client('iam') ROLE_NAME = 'awslimits'
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(10): p = Process(target=foo,args=(i,)) p.start() #p.join() print('main process stop!') from multiprocessing import Process from multiprocessing import Queue
ise-uiuc/Magicoder-OSS-Instruct-75K
public async Task CastsToObject() { // Given, When Config<object> config = 10; // Then (await config.GetAndTransformValueAsync(null, null)).ShouldBe(10); } [Test] public async Task CastsFromDocu...
ise-uiuc/Magicoder-OSS-Instruct-75K
while True: next_cmd = input("> ") print(eval(next_cmd))
ise-uiuc/Magicoder-OSS-Instruct-75K
class AliasNotFound(Exception):
ise-uiuc/Magicoder-OSS-Instruct-75K
self.oHelper.SearchBrowse(f"D MG 01 000020", "Filial+atendimento") self.oHelper.SetButton("Visualizar") self.oHelper.SetButton("Outras Ações", "Tracker da Entidade") self.oHelper.SetButton("Rastrear") self.oHelper.ClickTree("Atendimento Telemarketing - 000020") self.oHe...
ise-uiuc/Magicoder-OSS-Instruct-75K
self, train_sampler, enc_len: int, dec_len: int, time_series_fields: List[str] = None, target_in="target", is_pad_out: str = "is_pad", start_in: str = "start", forecast_start_out: str = "forecast_start", ) -> None: assert enc_len > 0, "...
ise-uiuc/Magicoder-OSS-Instruct-75K
errors = True processing = True if processing: rerun_processing(no_index, eager)
ise-uiuc/Magicoder-OSS-Instruct-75K
import dataclasses import unittest import pytest from netdisc.tools import pandor @dataclasses.dataclass class Included: ip_address: str = "10.20.30.40" short: str = "included"
ise-uiuc/Magicoder-OSS-Instruct-75K
print(obj.check_record(s4))
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_case_5(self): self.assertEqual(find_lcis_length([2, 1, 3]), 2) def test_case_6(self): self.assertEqual(find_lcis_length([-1, -3, -5, -4, -7]), 2) if __name__ == "__main__":
ise-uiuc/Magicoder-OSS-Instruct-75K
from rest_framework import serializers
ise-uiuc/Magicoder-OSS-Instruct-75K
return fi waffles_resource_current_state="present" }
ise-uiuc/Magicoder-OSS-Instruct-75K
} public void closeModeration( String pollId,
ise-uiuc/Magicoder-OSS-Instruct-75K
continue record[k] = v data[app][model].append(record) return json.dumps(data, ensure_ascii=False)
ise-uiuc/Magicoder-OSS-Instruct-75K
sum(inserts.values()), sum(deletes.values()), sum(subs.values()) ), file=out_file,
ise-uiuc/Magicoder-OSS-Instruct-75K
"querie4": "MATCH (b:Beer)-[r:BEER_CATEGORY]->(c:Category {category: 'Irish Ale'})" "RETURN b.name AS BEER_NAME, b.abv AS ALC ,c.category AS CATEGORY " "ORDER BY b.abv DESC " "LIMIT 10", "querie5": "MATCH (b:Bee...
ise-uiuc/Magicoder-OSS-Instruct-75K
embed = discord.Embed(description=f'{latency_message[:-6]} \nRound-trip time: [{rt_ping} ms] ```**', color=await helpers.get_color()) await ping_message.edit(embed=embed)
ise-uiuc/Magicoder-OSS-Instruct-75K
#main2.roleplayRun(sys.argv[1],sys.argv[2],sys.argv[3]) main2.roleplayRun()
ise-uiuc/Magicoder-OSS-Instruct-75K
('login', '0002_auto_20190720_1846'),
ise-uiuc/Magicoder-OSS-Instruct-75K
/root/magento.sh > /var/log/magento-init/magento-stdout.log 2> /var/log/magento-init/magento-stderr.log && cron -f -L 15
ise-uiuc/Magicoder-OSS-Instruct-75K
self.calc_var() print('=================================') print('============ Control ============') print('Sample size:\t\t{}'.format(self.N_c)) print('Value:\t\t\t{:.7f}'.format(self.val_c)) print('Standard deviation:\t{:.7f}'.format(np.sqrt(self.var_c))) print...
ise-uiuc/Magicoder-OSS-Instruct-75K
MAIN_CONFIG_TEMPLATE_PATH = str(tensorhive_package_dir / 'main_config.ini') HOSTS_CONFIG_TEMPLATE_PATH = str(tensorhive_package_dir / 'hosts_config.ini')
ise-uiuc/Magicoder-OSS-Instruct-75K
from rest_framework.pagination import PageNumberPagination class UserListPagination(PageNumberPagination): """ 获取用户列表的分页器 """ page_size = 64 page_query_param = "page" page_size_query_param = "size" max_page_size = 64
ise-uiuc/Magicoder-OSS-Instruct-75K
cummax_output = ([[[11, 11, 1, 7, 11], [11, 11, 18, 7, 11], [12, 11, 18, 11, 11]], [[18, 8, 10, 17, 14], [18, 20, 10, 20, 14], [18, 20, 10, 20, 16]], [[6, 13, 19, 14, 8], [17, 19, 19, 14, 8], [18, 19, 19, 14, 16]], [[10, 7, 7, 7, 19], [15, 7, 15, 7, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
LayoutName = __generate_keyboard_layout_enum() def get_layout(layout_name: LayoutName) -> Dict: if not isinstance(layout_name, LayoutName): raise ValueError( 'Invalid input type, layout_name must be type LayoutName') layout_file_name = layout_name.value + YAML_EXTENSION stream = resour...
ise-uiuc/Magicoder-OSS-Instruct-75K
import KratosMultiphysics # Import applications
ise-uiuc/Magicoder-OSS-Instruct-75K
from datetime import datetime,timedelta try: import common from ManifestGenerator import * except ImportError as import_err: print import_err sys.exit(1)
ise-uiuc/Magicoder-OSS-Instruct-75K
file_path = (base_dir, ) + tuple(path) return open(os.path.join(*file_path)).read() setup( name="PyLocache", url="https://github.com/psjay/PyLocache", version="0.0.4", license='WTFPL', description="PyLocache is a Python implementation of LRU local cache.", long_description=( re...
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Given the center point and normal boundary map :param normal_boundary_map: ndarray, HxW, 0/1 :param box_x: int :param box_y: int :return: UL_x, UL_y, BR_x, BR_y """ h, w = normal_boundary_map.shape x_left_min = 0 x_left_max = box_x - ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# # Lightnet data transforms # Copyright EAVISE
ise-uiuc/Magicoder-OSS-Instruct-75K
mock_account_get_balance = mock.patch('cli.account.service.Account.get_balance') mock_account_get_balance.return_value = return_async_value(13500) References: - https://github.com/pytest-dev/pytest-mock/issues/60 """ return value
ise-uiuc/Magicoder-OSS-Instruct-75K
QObject::connect(Core::getInstance(), &Core::friendStatusChanged, autoBroadcast);
ise-uiuc/Magicoder-OSS-Instruct-75K
import sublime_plugin class DeepcodeGoToFileAndIgnoreCommand(sublime_plugin.TextCommand): def open_file_and_add_deepcode_ignore_comment( self, view, file, row, col, type, reason ): view.run_command( "deep_code_ignore", {"point": view.text_point(row - 1, col), "type": ty...
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php return [
ise-uiuc/Magicoder-OSS-Instruct-75K
struct ItemStatus_Previews: PreviewProvider { static var previews: some View { VStack { ItemStatus(status: UIModelDataValue(value: "success", dataType: "text", rawValue: "status", ...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "##[set-output name=version;]$new_version"
ise-uiuc/Magicoder-OSS-Instruct-75K
map :{ if{ class C{ class c{enum S<T where g:a{{} class A{{} let h=B class B<a class B
ise-uiuc/Magicoder-OSS-Instruct-75K
def ok(self, message, values): self.status_code = 200 return self.create_payload_response(message, values)
ise-uiuc/Magicoder-OSS-Instruct-75K
} private void InitializeComponent() { AvaloniaXamlLoader.Load(this); }
ise-uiuc/Magicoder-OSS-Instruct-75K
from lispyc.parser import parse VALID = [ ("(lambda () ())", (), nodes.List(())), ( "(lambda ((int int) (bool bool) (float float)) (Y b 123))", ( Param(Variable("int"), types.IntType()), Param(Variable("bool"), types.BoolType()), Param(Variable("float"), type...
ise-uiuc/Magicoder-OSS-Instruct-75K
save(file, args.output_dir, 'checkpoint_{}'.format(name)) save(model.state_dict(), args.output_dir, 'model_{}'.format(name)) @trainer.on(Events.EPOCH_COMPLETED) def run_validation(engine): pbar.log_message("Start Validation - Epoch: [{}/{}]".format(engine.state.epoch, engine.state.max_...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod models; pub mod operations;
ise-uiuc/Magicoder-OSS-Instruct-75K
# Compose alias 'dk-c'="docker-compose"
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertEqual(hero.ban_state_end_at, attributes['ban_state_end_at']) def test_attributes(self): self.attributes.update({'race': game_relations.RACE.random(), 'gender': game_relations.GENDER.random(), 'name': game_names.generator().g...
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>install.sh rm -rf build dist preimutils.egg-info python3 setup.py sdist bdist_wheel pip install --upgrade .
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_fingerprint_list() -> None: l1 = [1, 2, 3] l2 = [1, 3, 2] fp1, fp2 = (OptionsFingerprinter().fingerprint(ListValueComponent.create, l) for l in (l1, l2)) assert fp1 != fp2 def test_fingerprint_file(rule_runner: RuleRunner) -> None: fp1, fp2, fp3 = ( OptionsFingerprinter().fingerp...
ise-uiuc/Magicoder-OSS-Instruct-75K
import airflow from airflow.operators.bash_operator import BashOperator from airflow.operators.sensors import ExternalTaskSensor
ise-uiuc/Magicoder-OSS-Instruct-75K
// } catch { // return self.httpClient.eventLoopGroup.next().makeFailedFuture(error) // }
ise-uiuc/Magicoder-OSS-Instruct-75K
{ [Collection(PublishedSitesCollection.Name)] public class EventLogTests : IISFunctionalTestBase { private readonly PublishedSitesFixture _fixture;
ise-uiuc/Magicoder-OSS-Instruct-75K
""" ari = (4.71 * self.coreMetrics.getTotalCharacters() / self.coreMetrics.getTotalWords()) + \ (0.5 * self.coreMetrics.getTotalWords() / self.coreMetrics.getTotalSentences()) - 21.43 return ari def computeSMOG(self) -> float: """ Compute Simple Measure of Gobb...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Status State = '' Health = '' HealthRollup = '' def init_from_url(self, redfishConfig, url): Trace.log(TraceLevel.DEBUG, ' ++ Storage Group init from URL {}'.format(url)) link = UrlAccess.process_request(redfishConfig, UrlStatus(url)) if (link.valid and link.jsonD...
ise-uiuc/Magicoder-OSS-Instruct-75K
$criterio="%$criterio%"; $stm->bindParam(":criterio",$criterio);
ise-uiuc/Magicoder-OSS-Instruct-75K
async def cmd_profits(hodlRpcClient: HodlRpcClient, *, dumpJson: bool, ) -> None: vlog(1, "Fetching profit information") apiDict = await hodlRpcClient.get(f"getProfits") if dumpJson: print(json.dumps(apiDict, indent=4)) else: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
return lst print(mysteryAlgorithm([6, 4, 3, 8, 5]))
ise-uiuc/Magicoder-OSS-Instruct-75K
pygame.display.set_icon(icon) pygame.display.set_caption("Pygame壁球") ball = pygame.image.load("PYG02-ball.gif") ballrect = ball.get_rect() fps = 300 fclock = pygame.time.Clock() still = False while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() elif eve...
ise-uiuc/Magicoder-OSS-Instruct-75K
for field_name, field in serializer_instance.get_fields().items(): self._extract_field_info(model, field_name, field, fields, relationships, adapter, target_app, True) return fields, relationships
ise-uiuc/Magicoder-OSS-Instruct-75K
import scrapy from pyquery import * class SafariSpider(scrapy.Spider):
ise-uiuc/Magicoder-OSS-Instruct-75K
print(*aa)
ise-uiuc/Magicoder-OSS-Instruct-75K
self.one_class_classifier = self.pkl_registry[0][0] assert type(self.one_class_classifier) == OneClassSVM self.fit_status = True
ise-uiuc/Magicoder-OSS-Instruct-75K
n=int(input("Enter a number:")) print(harshad(n))
ise-uiuc/Magicoder-OSS-Instruct-75K
{ Tree oak; Tree elm; Tree pine; cout << "We have " << oak.getObjectCount() << " Trees in our program!\n"; return 0; }
ise-uiuc/Magicoder-OSS-Instruct-75K
logger.error('Invalid time timezone string value \"%s\", please check!' %(time_zone)) raise ValueError('Invalid time timezone string value') # Get manual hour informed in event
ise-uiuc/Magicoder-OSS-Instruct-75K
# Retrieves the xpresso Tag xpressoTag = op.GetTag(c4d.Texpresso) if xpressoTag is None: raise ValueError("Make sure the selected object get an Xpresso Tag.") # Retrieves the node master
ise-uiuc/Magicoder-OSS-Instruct-75K
from butter.clone import unshare, setns import pytest @pytest.mark.clone def test_setns(mock): m = mock.patch('butter.clone._lib') m = mock.patch('butter.clone._lib.setns') m.return_value = 0 setns(fd=5)
ise-uiuc/Magicoder-OSS-Instruct-75K
self = self.process_command(cmd);
ise-uiuc/Magicoder-OSS-Instruct-75K
} } /// <summary> /// Looks up a localized string similar to Trener z wieloletnią praktyką w zakresie nauczania technologii w obszarze IT, programista fullstack, ze szczególnym uwzględnieniem zakresu baz danych - głównie w obszarze technologii Microsoftu. Specjalista, nau...
ise-uiuc/Magicoder-OSS-Instruct-75K
def has_been_edited(self): """Return whether the object has been changed since creation""" return abs((self.last_changed_date - self.created_date).seconds) > 1
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public int getVersion() { return 2; }
ise-uiuc/Magicoder-OSS-Instruct-75K
#: Envelope recipient of the SMTP transaction. #: E.g ``RCPT TO: <<EMAIL>>`` self.envelope_to = None
ise-uiuc/Magicoder-OSS-Instruct-75K
@foreach($blog->tags as $tag) <a href="{{ url('/blog/labels/' . $tag->name) }}">{{ $tag->name }}@unless($loop->last), @endunless</a> @endforeach</i></small> @endif
ise-uiuc/Magicoder-OSS-Instruct-75K
self.inp = inp self.ksize = ksize self.stride = stride self.wn_fc1 = nn.Conv2d(inp_gap, self.M//self.G*inp, 1, 1, 0, groups=1, bias=True) self.sigmoid = nn.Sigmoid()
ise-uiuc/Magicoder-OSS-Instruct-75K
# Register your models here. from .models import Question,Choice
ise-uiuc/Magicoder-OSS-Instruct-75K
override func viewDidLoad() { super.viewDidLoad() initView(); } override func viewWillAppear(_ animated: Bool) {
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod routing; pub mod sla;
ise-uiuc/Magicoder-OSS-Instruct-75K
if args.verbose: print('finding adjacency maps...') if not os.path.isfile(matrix_filename) or \ not os.path.isfile(labels_filename): labels, matrix = label_adjacency_matrix(args.label_filename, out_dir=args.output_dirname)[:2] ...
ise-uiuc/Magicoder-OSS-Instruct-75K
#[cfg(test)] mod parser_tests { use robin_core::ast::{BooleanExpression, Expression}; use robin_core::table::Table; #[test] fn find_known_local_variable_without_parent() { let mut table = Table::new(None); table.insert( "example".to_string(), Expression::Boolea...
ise-uiuc/Magicoder-OSS-Instruct-75K
public class Send { private final static String QUEUE_NAME = "test_work_queue"; public static void main(String[] args) throws IOException, TimeoutException, InterruptedException { //获取连接以及通道 Connection connection = ConnectionUtils.getConnection(); //从连接中创建通道,这是完成大部分API的地方 Channe...
ise-uiuc/Magicoder-OSS-Instruct-75K
length = np.prod(shape) parameters[key] = x[cursor:cursor + length].reshape(shape) cursor += length return parameters def _set_parameters(self, parameters): """ Updates the model and the random effect realization attributes. """
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>1-10 export interface DateCountDown { days: number; hours: number; minutes: number; seconds: number; remain_seconds: number; } export declare class CountDown { timeRemaining: number; onComplete?: Function;
ise-uiuc/Magicoder-OSS-Instruct-75K
f=station6() print(str(f)+'Station 6 OK') def station5(): GPIO.output(19,True) time.sleep(1) GPIO.output(19,False) while GPIO.input(21)==False: start=time.time() while GPIO.input(21)==True: end=time.time()
ise-uiuc/Magicoder-OSS-Instruct-75K