prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>issue-15689-1.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/l...
fn main() { assert!(Test::Slice(&1) == Test::Slice(&1)) }
<|file_name|>trait-static-method-generic-inference.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or //...
pub trait HasNew<T> { fn new() -> T; fn dummy(&self) { }
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Jetlibs documentation build configuration file, created by # sphinx-quickstart on Wed Dec 23 16:22:13 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration valu...
<|file_name|>asset.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt, add_months, cint, no...
if self.expected_value_after_useful_life < asset_value_after_full_schedule: frappe.throw(_("Expected value after useful life must be greater than or equal to {0}") .format(asset_value_after_full_schedule))
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Module dependencies. */ var util = require('sails-util'), uuid = require('node-uuid'), path = require('path'),<|fim▁hole|> ConnectSession = require('express/node_modules/connect').middleware.session.Session; module.exports = function(sails) { //////...
generateSecret = require('./generateSecret'), cookie = require('express/node_modules/cookie'), parseSignedCookie = require('cookie-parser').signedCookie,
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Werkzeug ======== Werkzeug started as simple collection of various utilities for WSGI applications and has become one of the most advanced WSGI utility modules. It includes a powerful debugger, full featured request and response objects, H...
zip_safe=False, platforms='any'
<|file_name|>lifx_cloud.py<|end_file_name|><|fim▁begin|>""" Support for LIFX Cloud scenes. For more details about this component, please refer to the documentation at https://home-assistant.io/components/scene.lifx_cloud/ """ import asyncio import logging import voluptuous as vol import aiohttp import async_timeout ...
<|file_name|>array.js<|end_file_name|><|fim▁begin|>Astro.createValidator({ name: 'array', validate: _.isArray, events: { validationerror: function(e) { var fieldName = e.data.field; e.data.message = 'The "' + fieldName + '" field\'s value has to be an array';<|fim▁hole|>});<|fim▁end|>
} }
<|file_name|>core.py<|end_file_name|><|fim▁begin|>""" Core classes for the XBlock family. This code is in the Runtime layer, because it is authored once by edX and used by all runtimes. """ import inspect import pkg_resources import warnings from collections import defaultdict from xblock.exceptions import Disallowe...
return class_tags
<|file_name|>LuaExecuteScriptTests.cpp<|end_file_name|><|fim▁begin|>/** * * 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 t...
)"); plan->reset();
<|file_name|>test_institution_nodes_list.py<|end_file_name|><|fim▁begin|>from nose.tools import * from tests.base import ApiTestCase from tests.factories import InstitutionFactory, AuthUserFactory, NodeFactory from framework.auth import Auth from api.base.settings.defaults import API_BASE class TestInstitutionNodeLi...
ids = [each['id'] for each in res.json['data']]
<|file_name|>ext.py<|end_file_name|><|fim▁begin|>import json import logging from foxglove import glove from httpx import Response from .settings import Settings logger = logging.getLogger('ext') def lenient_json(v): if isinstance(v, (str, bytes)): try: return json.loads(v) except (Va...
'%s unexpected response %s /%s -> %s', self.__class__.__name__, method, uri,
<|file_name|>Test_Kivy.py<|end_file_name|><|fim▁begin|>import os<|fim▁hole|>class TestApp(App): pass if __name__ == '__main__': TestApp().run()<|fim▁end|>
os.environ['KIVY_GL_BACKEND'] = 'gl' #need this to fix a kivy segfault that occurs with python3 for some reason from kivy.app import App
<|file_name|>binarysearch.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" ) func binSearch(searchspace []int, key int) int { var min, max int min = searchspace[0] max = searchspace[len(searchspace)-1] for { if max < min { return -1 } m := (min + max) / 2 if searchspace[m] < key { min = ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|><|fim▁end|>
"""Test package."""
<|file_name|>antecedent.ts<|end_file_name|><|fim▁begin|>/** * Created by Maazouza on 07/05/2017.<|fim▁hole|> idAnt: number; idDos: number; dateAnt: string; descriptionAnt: string; commentaireAnt: string; sujetAnt: string; dateCreationAnt: string; }<|fim▁end|>
*/ export class Antecedent {
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|>AuthorizedException = ( BufferError, ArithmeticError, AssertionError, AttributeError, EnvironmentError, EOFError, LookupError, MemoryError,<|fim▁hole|> RuntimeError, SystemError, ...
ReferenceError,
<|file_name|>transaction_generator.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2018 go-nebulas authors // // This file is part of the go-nebulas library. // // the go-nebulas library is free software: you can redistribute it and/or // modify // it under the terms of the GNU General Public License as published by<...
// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // the go-nebulas library is distributed in the hope that it will be useful,
<|file_name|>map.js<|end_file_name|><|fim▁begin|>/*global $, google, InfoBox */ var simulation_manager = (function(){ google.maps.visualRefresh = true; var ua_is_mobile = navigator.userAgent.indexOf('iPhone') !== -1 || navigator.userAgent.indexOf('Android') !== -1; var config = (function(){ var pa...
listener_helpers.notify('vehicles_load'); } });
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|>{ "name": "website_sale_birthdate",<|fim▁hole|> "category": "eCommerce", "vesion": "13.0.1.0", "depends": ["website_sale", "partner_person"], "data": ["views.xml"], "installable": False, }<|fim▁end|>
"author": "IT-Projects LLC, Ivan Yelizariev", "license": "Other OSI approved licence", # MIT "support": "apps@itpp.dev", "website": "https://yelizariev.github.io",
<|file_name|>altered_template.py<|end_file_name|><|fim▁begin|>import sys # If our base template isn't on the PYTHONPATH already, we need to do this: sys.path.append('../path/to/base/templates') import basetemplate<|fim▁hole|> def add_resources(self): self.add_bucket() def add_bucket(self): """...
class AlteredTemplate(basetemplate.BaseTemplate): """This project only needs an S3 bucket, but no EC2 server."""
<|file_name|>pivot_table.js<|end_file_name|><|fim▁begin|>import dt from 'datatables.net-bs'; import 'datatables.net-bs/css/dataTables.bootstrap.css'; import $ from 'jquery'; import { d3format, fixDataTableBodyHeight } from '../javascripts/modules/utils';<|fim▁hole|>import './pivot_table.css'; dt(window, $); module.e...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>############################################################################## # # Copyright Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL shoul...
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
<|file_name|>file_reporter.rs<|end_file_name|><|fim▁begin|>use super::{ErrorReporter, ReportKind, Message }; use std::fs::File; use std::io::{BufRead, BufReader, Write}; use std::cmp; use std::iter; use crate::common::{ constants::SPACES_PER_TAB, node_info::Span, }; /* Reports errors by printing...
}); }
<|file_name|>representative.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you ca...
state_id = fields.Many2one("res.country.state", 'State', ondelete='restrict') country_id = fields.Many2one('res.country', 'Country', ondelete='restrict') email = fields.Char('Email') phone = fields.Char('Phone')
<|file_name|>error.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free S...
func getTemplate(code int) *template.Template { if val, tmpl := templateMap[code]; tmpl { return val } else {
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os.path from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings as django_settings from django.db.models import signals from know.plugins.attachments import settings from know...
return None filename = self.file.name.split("/")[-1] return ".".join(filename.split(".")[:-1])
<|file_name|>menuButton.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' const styles = require('./menuPart.less') import Icon from 'client/components/icon/icon' interface compProps { icon:string; text:string; onClick:()=>any; } const MenuButton:React.StatelessComponent<compProps> = ({icon,...
<|file_name|>NewDebugger.java<|end_file_name|><|fim▁begin|>/** * yamsLog is a program for real time multi sensor logging and * supervision * Copyright (C) 2014 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the ...
if(!readWriteBoolean(null)){ System.out.println("Waiting on projectListAgain"); while (!readWriteBoolean(null));
<|file_name|>fullFocalplane.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """Perform preprocessing and generate raytrace exec scripts for one focal plane. For documentation using the python_control for ImSim/PhoSim version <= v.3.0.x, see README.v3.0.x.txt. For documentation using the python_control for ImSim/Ph...
trimfile = args[0] imsim_config_file = args[1]
<|file_name|>test_hashes.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (C) 2017-2021 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may...
def test_hash160_hash256() -> None:
<|file_name|>0003_auto__add_field_map_bucket.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Map.bucket' db....
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
<|file_name|>SpecializedFunctionKey.java<|end_file_name|><|fim▁begin|>/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
} }
<|file_name|>unique-assign-generic.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apac...
#![allow(unknown_features)] #![feature(box_syntax)]
<|file_name|>PlayListItemAudioPanel.cpp<|end_file_name|><|fim▁begin|>/*************************************************************** * This source files comes from the xLights project * https://www.xlights.org * https://github.com/smeighan/xLights * See the github commit history for a record of contributing * dev...
wxCommandEvent e(EVT_UPDATEITEMNAME);
<|file_name|>z3str.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2012 Aarhus University * * Licensed under the GNU General Public License, Version 3 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.gnu.org/lice...
#include <sstream>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from JumpScale import j from GitFactory import GitFactory j.base.loader.makeAvailable(j, 'clients')<|fim▁hole|><|fim▁end|>
j.clients.git = GitFactory()
<|file_name|>processor.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use std::collections::HashMap; use std::io::Write; use serde_json::{to_string_pretty, to_value, Number, Value}; use crate::context::{ValueRender, ValueTruthy}; use crate::errors::{Error, Result}; use crate::parser::ast::*; use crate::rendere...
"Tried to concat a value that is not a string or a number from ident {}", i
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from typing import Any from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth import authenticate, login, get_backends from django.core.urlresolvers import reverse from dja...
<|file_name|>JobMetricsListener.java<|end_file_name|><|fim▁begin|>/** * 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...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.spark.JavaSparkListener;
<|file_name|>ss_script_handler.py<|end_file_name|><|fim▁begin|># Jacqueline Kory Westlund # May 2016 # # The MIT License (MIT) # # Copyright (c) 2016 Personal Robots Group # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwar...
# Remove whitespace from name before using it. toload["name"] = answer.strip() toload["tag"] = "PlayObject" toload["slot"] = answers.index(answer) + 1
<|file_name|>resources.py<|end_file_name|><|fim▁begin|>from .util import to_datetime, to_iso from .http import request from .exceptions import KloudlessException as KException from . import config import inspect import json import requests import six import warnings class BaseResource(dict): # {'key': (serializ...
'X-Kloudless-Metadata': json.dumps({ 'name': file_name, 'parent_id': parent_id,
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Date: 2/2/2017 Team: Satoshi Nakamoto @Authors: Alex Levering and Hector Muro<|fim▁hole|>* NLTK * Folium * Geocoder * psycopg2 TO DO BEFOREHAND: The following steps are non-automatable and have to be performed manually. * Have the NLTK vade...
Non-standard dependencies: * Twython
<|file_name|>response.js<|end_file_name|><|fim▁begin|>'use strict'; // Load modules const Http = require('http'); const Stream = require('stream'); // Declare internals const internals = {}; exports = module.exports = class Response extends Http.ServerResponse { constructor(req, onEnd) { super({ me...
headers: response._shot.headers, statusCode: response.statusCode, statusMessage: response.statusMessage,
<|file_name|>publish-card.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Input } from '@angular/core';<|fim▁hole|> @Component({ moduleId: module.id, selector: 'app-publish-card', templateUrl: 'publish-card.component.html', styleUrls: ['publish-card.component.css'], directives: [ROUTER_D...
import { ROUTER_DIRECTIVES } from '@angular/router'; import { PublishingItemsService, PublishingItem } from '../shared/index';
<|file_name|>pip3.py<|end_file_name|><|fim▁begin|>import subprocess def release(): <|fim▁hole|><|fim▁end|>
subprocess.call(["python3", "setup.py", "sdist", "upload"])
<|file_name|>maternal_arv_post_mod_manager.py<|end_file_name|><|fim▁begin|>from django.db import models <|fim▁hole|> self, arv_code, report_datetime, visit_instance, appt_status, visit_definition_code, subject_identifier_as_pk): MaternalVisit = models.get_model('mb_maternal', 'MaternalVi...
class MaternalArvPostModManager(models.Manager): def get_by_natural_key(
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2013 Rackspace # # 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 fi...
# limitations under the License.
<|file_name|>matches.component.ts<|end_file_name|><|fim▁begin|>import {Component} from '@angular/core'; <|fim▁hole|>@Component({ selector: 'matches', template: `Matches page content` }) export class MatchesComponent { constructor() {} }<|fim▁end|>
<|file_name|>private_export.d.ts<|end_file_name|><|fim▁begin|>import * as browser from './browser'; import * as browserDomAdapter from './browser/browser_adapter'; import * as location from './browser/location/browser_platform_location'; import * as testability from './browser/testability'; import * as ng_probe from '....
getDOM: typeof dom_adapter.getDOM; setRootDomAdapter: typeof dom_adapter.setRootDomAdapter; _DomRootRenderer?: dom_renderer.DomRootRenderer;
<|file_name|>server.go<|end_file_name|><|fim▁begin|>// Copyright 2015, Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package grpcvtgateservice provides the gRPC glue for vtgate package grpcvtgateservice import ( "google.gol...
// Begin is the RPC version of vtgateservice.VTGateService method func (vtg *VTGate) Begin(ctx context.Context, request *pb.BeginRequest) (response *pb.BeginResponse, err error) { defer vtg.server.HandlePanic(&err) ctx = callerid.NewContext(callinfo.GRPCCallInfo(ctx),
<|file_name|>ConstraintDefinitionsTest.java<|end_file_name|><|fim▁begin|>/** * Jakarta Bean Validation TCK * * License: Apache License, Version 2.0 * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. */ package org.hibernate.beanvalidation.tck.tests.constraints.constra...
<|file_name|>sendannouncementrequest.cpp<|end_file_name|><|fim▁begin|>/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation...
<|file_name|>infer.test.ts<|end_file_name|><|fim▁begin|>/// <reference types="@sanity/types/parts" /> import Schema from '@sanity/schema' import {ObjectSchemaType, Rule, SanityDocument} from '@sanity/types' import createSchema from 'part:@sanity/base/schema-creator' import client from 'part:@sanity/base/client' import...
<|file_name|>cmd_interface_02_server_clients.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 # # StreamBuddy - a video and data streaming serviweng zieleinfahrtce. # Copyright (c) 2015, Tobias Bleiker & Dumeni Manatschal # # This program is free software: you can redistribute it and/or modify # it...
<|file_name|>configuration-edit-ctrl.js<|end_file_name|><|fim▁begin|>'use strict'; var app = angular.module('Fablab'); app.controller('GlobalConfigurationEditController', function ($scope,$route, $location, ConfigurationService, NotificationService) { $scope.selected = {configuration: undefined}; $scope...
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require("gulp"); var $ = require("gulp-load-plugins"); <|fim▁hole|> .pipe(gulp.dest("./.tmp")); });<|fim▁end|>
gulp.task("html", function () { gulp.src("./src/index.html")
<|file_name|>ServerRestMessage.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
/**
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import sys, time, os from django.conf import settings from django.core import mail from django.core.mail.backends import locmem from django.db import DEFAULT_DB_ALIAS from django.test import signals from django.template import Template from django.utils.translation imp...
try:
<|file_name|>IronArrow.cpp<|end_file_name|><|fim▁begin|>// © 2014 - 2017 Soverance Studios // http://www.soverance.com // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www....
SK_WeaponSkeletalMesh = SkeletalMeshObject.Object;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! The implementation of the DOM. //! //! The DOM is comprised o...
pub mod storageevent; pub mod testbinding; pub mod testbindingproxy; pub mod text;
<|file_name|>s2i_dropcaps.go<|end_file_name|><|fim▁begin|>package builds import ( "fmt" kapi "k8s.io/kubernetes/pkg/api" g "github.com/onsi/ginkgo" o "github.com/onsi/gomega" buildapi "github.com/openshift/origin/pkg/build/api" exutil "github.com/openshift/origin/test/extended/util" ) var _ = g.Describe("[bu...
break
<|file_name|>UrlEntity.js<|end_file_name|><|fim▁begin|>var mongoose = require('mongoose'); var urlSchema = require('../schemas/UrlSchema'); var Url = mongoose.model('Url', urlSchema);<|fim▁hole|> var link = new Url({ url, urlMinifie }); link.save(function(err) { if (err) return handleEr...
var insertUrl = function(url, urlMinifie) {
<|file_name|>lxqt-config-appearance_pl_PL.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="pl_PL"> <context> <name>FontsConfig</name> <message> <location filename="../fontsconfig.ui" line="23"/> <source>Font</source> <transl...
<message> <location filename="../fontsconfig.ui" line="189"/> <source>BGR</source>
<|file_name|>day12.rs<|end_file_name|><|fim▁begin|>use std::str::Chars; const INPUT: &'static str = include_str!("data/day12.txt"); const NUMERICAL: [char; 11] = ['-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; pub fn part1() -> i32 { calculate_part1(INPUT) } pub fn part2() -> i32 { calculate_part2(I...
#[test]
<|file_name|>flow.py<|end_file_name|><|fim▁begin|>import re from lxml import etree from nxpy.util import tag_pattern, whitespace_pattern class Flow(object): def __init__(self): self.routes = [] def export(self): flow = etree.Element('flow') if len(self.routes): for route ...
"rate-limit": <rate>/False,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2015-2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)<|fim▁hole|>from . import mass_reconcile from . import advanced_reconciliation<|fim▁end|>
<|file_name|>factories.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.db.models import signals from elections.models import ( Election, ModerationHistory, ElectionType, ElectedRole, ModerationStatus, ModerationStatuses, ) from organisations.tests.factories import ( OrganisationFact...
import datetime import factory
<|file_name|>exc.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class PasteError(AmnesiaError): def __init__(self, container): super() self.container = container def __str__(self): return 'Paste into container {} failed'.format(self.container.id)<|fim▁end|>
# -*- coding: utf-8 -*- from amnesia.exc import AmnesiaError
<|file_name|>util.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { isBlank, isPresent, isPrimitive, isStrictStringMap } from ...
<|file_name|>test428.js<|end_file_name|><|fim▁begin|>if (typeof exports === 'object') { var assert = require('assert'); var alasql = require('..'); } /* Test for issue #379 */ var test = 428; describe('Test ' + test + ' UUID()', function () { before(function () { alasql('CREATE DATABASE test' + test + ';USE t...
<|file_name|>liveness-move-in-loop.rs<|end_file_name|><|fim▁begin|>fn main() { let y: Box<isize> = 42.into(); let mut x: Box<isize>; loop { println!("{}", y); loop { loop { loop { x = y; //~ ERROR use of moved value x.clon...
<|file_name|>peer_storage.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 TiKV Project Authors. Licensed under Apache-2.0. use fail::fail_point; use std::cell::{Cell, RefCell}; use std::collections::VecDeque; use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering}; use std::sync::mpsc::{self, Receiver,...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># flake8: NOQA <|fim▁hole|>from . import evaluations from . import extensions from . import models from . import utils<|fim▁end|>
from . import datasets
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Licensed under a 3-clause BSD style license - see LICENSE.rst from .. import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astropy.table`. """ auto_colname = _config.ConfigItem( 'col{0}', ...
replace_warnings = _config.ConfigItem( ['slice'],
<|file_name|>most_free_time.py<|end_file_name|><|fim▁begin|>''' Have the function MostFreeTime(strArr) read the strArr parameter being passed which will represent a full day and will be filled with events that span from time X to time Y in the day. The format of each event will be hh:mmAM/PM-hh:mmAM/PM. For example,...
def sort_timeList(times): sortedTimes = sorted(times, cmp=make_comparator(less_than), reverse=False)#[::-1] return sortedTimes
<|file_name|>test_select.rs<|end_file_name|><|fim▁begin|>use workdir::Workdir; macro_rules! select_test { ($name:ident, $select:expr, $select_no_headers:expr, $expected_headers:expr, $expected_rows:expr) => ( mod $name { use workdir::Workdir; use super::data; #[tes...
select_test!(select_range_multi_idx, r#"h1-h2,"h[]3"[0]-h4"#, "1-2,3-4", ["h1", "h2", "h[]3", "h4"], ["a", "b", "c", "d"]);
<|file_name|>backtop.js<|end_file_name|><|fim▁begin|>(function($, f) { // If there's no jQuery, Unslider can't work, so kill the operation. if(!$) return f; var Unslider = function() { // Set up our elements this.el = f; this.items = f; // Dimensions this.sizes = []; this.max = [0,0]; // Cu...
*/
<|file_name|>analyses_transposed.py<|end_file_name|><|fim▁begin|># coding=utf-8 # This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing im...
'row_type': 'field', 'hidden': not lcol.get('toggle', True), 'input_class': lcol.get('input_class',''),
<|file_name|>test_vfs.py<|end_file_name|><|fim▁begin|># This file is part of beets. # Copyright 2011, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, in...
<|file_name|>student.py<|end_file_name|><|fim▁begin|>__author__ = 'xubinggui' class Student(object): def __init__(self, name, score): self.name = name self.score = score def print_score(self): print(self.score)<|fim▁hole|><|fim▁end|>
bart = Student('Bart Simpson', 59) bart.print_score()
<|file_name|>cpu_temperature_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Unit tests for the contents of cpu_temperature.py """ # pylint: d...
def testLetBatteryCoolToTemperature_timeoutAfterThree(self): self.mock_device.ReadFile = mock.Mock(side_effect=self.constant_temp) self.cpu_temp.LetCpuCoolToTemperature(42)
<|file_name|>VideoQuestion.test.js<|end_file_name|><|fim▁begin|>import React from 'react'; import renderer from 'react-test-renderer'; import VideoQuestion from './VideoQuestion'; jest.mock('expo', () => ({ Video: 'Video' })); <|fim▁hole|> question="Wer ist eine Ananas?" answers={[ 'Ich bin eine ...
it('renders without crashing', () => { const tree = renderer.create( <VideoQuestion video={require('../../assets/videos/placeholder.mp4')}
<|file_name|>EjerMetods18.java<|end_file_name|><|fim▁begin|>package sergio; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Calendar; import java.util.GregorianCalendar; //Ejercicio Metodos 18 //Realiza una clase llamada milibreria que contenga al menos ci...
System.out.println("Dime tu mes de nacimiento: "); month=Integer.parseInt(lectura.readLine()); System.out.println("Dime tu año de nacimiento: ");
<|file_name|>routes.ts<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2017 Michael Krotscheck * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENS...
import { RequireLoggedOutGuard } from './require-logged-out.guard';
<|file_name|>network_proxy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Softw...
r = {'method':method, 'params':params, 'result':result, 'id':msg_id, 'error':error}
<|file_name|>kanbanery.js<|end_file_name|><|fim▁begin|>/*jslint indent: 2 */ /*global $: false, document: false, togglbutton: false*/ 'use strict'; togglbutton.render('section.task-actions:not(.toggl)', {observe: true}, function (elem) { var link, linkAction = document.createElement("LI"), taskTitle = $("p....
<|file_name|>TileEntityRepositry.java<|end_file_name|><|fim▁begin|>package com.acgmodcrew.kip.tileentity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; /** * Created by Malec on 05/03/2015. ...
return itemstack; } else {
<|file_name|>travel_time_step_cost_estimator.cpp<|end_file_name|><|fim▁begin|>#include <vigir_footstep_planning_default_plugins/step_cost_estimators/travel_time_step_cost_estimator.h> namespace vigir_footstep_planning { TravelTimeStepCostEstimator::TravelTimeStepCostEstimator() : StepCostEstimatorPlugin("travel_ti...
b_swing_inv = 1.0/b_swing_inv; params.getParam("travel_time_cost_estimator/swing/const_time", const_swing_time, 0.0);
<|file_name|>output_merger.rs<|end_file_name|><|fim▁begin|>//! Output Merger (OM) stage description. //! The final stage in a pipeline that creates pixel colors from //! the input shader results, depth/stencil information, etc. use crate::pso::{graphics::StencilValue, State}; /// A pixel-wise comparison function. #[d...
/// Set the value in the stencil buffer to zero. Zero = 1, /// Set the stencil buffer value to `reference` from `StencilFace`. Replace = 2,
<|file_name|>login.py<|end_file_name|><|fim▁begin|>from handlers import Handler from models import User # Login handler class Login(Handler): def get(self): self.render('login-form.html') def post(self): username = self.request.get('username')<|fim▁hole|> u = User.login(username, passw...
password = self.request.get('password')
<|file_name|>chacha.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses...
use super::ChaChaRng; #[test] fn test_rng_rand_seeded() {
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import sys extra_opts = {'test_suite': 'tests'} extra_deps = [] extra_test_deps = [] if sys.version_info[:2] == (2, 6): extra_deps.append('argparse') extra_deps.append('simplejson') extra_test_deps.append('unittest2') extra...
author='MongoDB, Inc.',
<|file_name|>if_expression.cc<|end_file_name|><|fim▁begin|>#include "if_expression.h" #include <glog/logging.h> #include "../internal/compilation.h" #include "../public/value.h" namespace afc { namespace vm { namespace { class IfExpression : public Expression { public: IfExpression(std::shared_ptr<Expression> c...
<|file_name|>publishconf.py<|end_file_name|><|fim▁begin|><|fim▁hole|> # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://rcarneva.github.io' RELATIVE_URLS = False FEED_ALL_ATOM ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals
<|file_name|>matches.rs<|end_file_name|><|fim▁begin|>use clippy_utils::consts::{constant, constant_full_int, miri_to_const, FullInt}; use clippy_utils::diagnostics::{ multispan_sugg, span_lint_and_help, span_lint_and_note, span_lint_and_sugg, span_lint_and_then, }; use clippy_utils::higher; use clippy_utils::source...
_ => return, }; // If this is the last expression in a block or there is an else clause then the whole
<|file_name|>rfc-1014.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
extern "system" {
<|file_name|>endpoints.py<|end_file_name|><|fim▁begin|># coding=utf-8 from re import match from mapi.exceptions import ( MapiNetworkException, MapiNotFoundException, MapiProviderException, ) from mapi.utils import clean_dict, request_json __all__ = [ "omdb_search", "omdb_title", "tmdb_find", ...
except ValueError: raise MapiProviderException("id_tvdb must be numeric")
<|file_name|>stability_cfg2.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or h...
// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
<|file_name|>WindowTools.java<|end_file_name|><|fim▁begin|>/* * #%L * Bio-Formats Plugins for ImageJ: a collection of ImageJ plugins including the * Bio-Formats Importer, Bio-Formats Exporter, Bio-Formats Macro Extensions, * Data Browser and Stack Slicer. * %% * Copyright (C) 2006 - 2015 Open Microscopy Environme...
ImageJ ij = IJ.getInstance(); Point p = new Point();