prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ setup.py file for augeas """ import os prefix = os.environ.get("prefix", "/usr") from distutils.core import setup setup (name = 'python-augeas', version = '0.3.0', author = "Harald Hoyer",<|fim▁hole|> description =...
author_email = "augeas-devel@redhat.com",
<|file_name|>adaptation.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## \file adjoint.py # \brief python package for running adjoint problems # \author T. Lukaczyk, F. Palacios # \version 5.0.0 "Raven" # # SU2 Original Developers: Dr. Francisco D. Palacios. # Dr. Thomas D. Economon...
#
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Exonum Team // // 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 // //...
self.instances.insert(id, info); self.instance_names.insert(name, id); }
<|file_name|>weighted_random_bools.rs<|end_file_name|><|fim▁begin|>use itertools::Itertools; use malachite_base::bools::random::weighted_random_bools; use malachite_base::random::EXAMPLE_SEED; use malachite_base_test_util::stats::common_values_map::common_values_map; use malachite_base_test_util::stats::median; fn wei...
expected_common_values: &[(bool, usize)], expected_median: (bool, Option<bool>), ) {
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Created by dmitry on 21.11.16. */ import React, { Component } from 'react'; import { Container, Content, Spinner } from 'native-base'; // TODO: Рядом лежат спиннеры, поди можно прикрячить<|fim▁hole|> <Container> <Content contentContainerStyle={{ ...
export default class Loading extends Component { render() { return (
<|file_name|>getopt.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
raise NotImplementedError("getopt is not yet implemented in Skulpt")
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for monitoring OctoPrint sensors.""" from __future__ import annotations from datetime import datetime, timedelta import logging from pyoctoprintapi import OctoprintJobInfo, OctoprintPrinterInfo from homeassistant.components.sensor import ( SensorDevi...
self, coordinator: OctoprintDataUpdateCoordinator, sensor_type: str, device_id: str,
<|file_name|>updateView.py<|end_file_name|><|fim▁begin|>import os import shutil import addSubproject import option import utility import grapeGit as git import grapeConfig import grapeMenu import checkout # update your custom sparse checkout view class UpdateView(option.Option): """ grape uv - Updates you...
else:
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>//! Initium is a modern bootloader with no legacy components. #![no_std]<|fim▁hole|>#![no_main] #![feature(asm)] #![feature(try_trait)] #![feature(abi_efiapi)] #![feature(global_asm)] #![feature(const_mut_refs)] #![feature(num_as_ne_bytes)] #![feature(in_band_lifetimes...
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'), concat = require('gulp-concat'), compass = require('gulp-compass'), notify = require('gulp-notify'); function swallowError(error) { this.emit('end'); } function reportError(error) { notify.onError()....
// Default Gulp Task
<|file_name|>point_tests.js<|end_file_name|><|fim▁begin|>import assert from "assert"; import {Point2D, Vector2D, Matrix2D} from "../index.js"; describe("Point2D", () => { it("new point", () => { const p = new Point2D(10, 20); assert.strictEqual(p.x, 10); assert.strictEqual(p.y, 20); })...
it("multiply", () => { const p1 = new Point2D(10, 20); const p2 = p1.multiply(0.5);
<|file_name|>bitcoin_ca@valencia.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ca@valencia" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About NexxusCoin</source> <translat...
<|file_name|>sshplus.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # -*- coding: utf-8 -*- # # SSHplus # A remote connect utlity, sshmenu compatible clone, and application starter. # # (C) 2011 Anil Gulecha # Based on sshlist, incorporating changes by Benjamin Heil's simplestarter # # This program is free software...
menu_item.show()
<|file_name|>garden_real.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import pythymio import random from gardenworld import * init('info2_1') with pythymio.thymio(["acc"],[]) as Thym:<|fim▁hole|> state["delay"] = 10 def dispatch(evtid, evt_name, evt_args): # https://www.th...
state = dict([]) state["time"] = 0
<|file_name|>VerifyPP.js<|end_file_name|><|fim▁begin|>/** * @author Kai Salmen / www.kaisalmen.de */ 'use strict'; if ( KSX.test.projectionspace === undefined ) KSX.test.projectionspace = {}; KSX.test.projectionspace.VerifyPP = (function () { PPCheck.prototype = Object.create(KSX.core.ThreeJsApp.prototype, { ...
this.configure({ name: 'PPCheck', htmlCanvas: elementToBindTo, useScenePerspective: true,
<|file_name|>sync_replicas_optimizer.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # 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...
<|file_name|>create.js<|end_file_name|><|fim▁begin|>/* -------------------------------------------------------------------------- */ /* Copyright 2002-2016, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apa...
roles_index++;
<|file_name|>test_availability_zone.py<|end_file_name|><|fim▁begin|># Copyright 2013 IBM Corp. # # 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/licen...
def test_availability_zone_list(self): response = self._do_get('os-availability-zone')
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" General functions for HTML manipulation, backported from Py3.<|fim▁hole|>module names and locations. """ from __future__ import unicode_literals _escape_map = {ord('&'): '&amp;', ord('<'): '&lt;', ord('>'): '&gt;'} _escape_map_full = {ord('&'): '&amp;', ord('<...
Note that this uses Python 2.7 code with the corresponding Python 3
<|file_name|>GlobalForParameter.py<|end_file_name|><|fim▁begin|># Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License")...
# limitations under the License. # def f(a):
<|file_name|>test_content.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- # # Copyright (c) 2009 Ars Aperta, Itaapy, Pierlis, Talend. # # Authors: Romain Gauthier <romain@itaapy.com> # Hervé Cauwelier <herve@itaapy.com> # David Versmisse <david.versmisse@itaapy.com> # # This file is part of Lp...
' <text:sequence-decl text:display-outline-level="0" ' 'text:name="Illustration"/>\n'
<|file_name|>test_blog_settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest<|fim▁hole|><|fim▁end|>
class TestBlogSettings(unittest.TestCase): pass
<|file_name|>test_del_contact.py<|end_file_name|><|fim▁begin|>from model.contact import Contact import random def test_delete_some_contact(app, db, check_ui): if len(db.get_contact_list()) == 0: app.contact.add(Contact(firstname="test")) old_contacts = db.get_contact_list() contact = random.choice...
assert old_contacts == new_contacts if check_ui:
<|file_name|>GrandStaffApp.java<|end_file_name|><|fim▁begin|>package com.rockhoppertech.music.fx.cmn; /* * #%L * rockymusic-fx * %% * Copyright (C) 1996 - 2013 Rockhopper Technologies * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the...
loadRootFxml(); this.scene = SceneBuilder.create()
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from django.apps import AppConfig<|fim▁hole|><|fim▁end|>
class FinancesConfig(AppConfig): name = "finances"
<|file_name|>client.rs<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2016 Torrie Fischer <tdfischer@hackerbots.net> * * 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://ww...
if let Some(next) = token { args.insert("since", next); args.insert("timeout", "5000"); } else {
<|file_name|>index.js<|end_file_name|><|fim▁begin|>"use strict"; var ArrayCollection_1 = require('./ArrayCollection'); exports.ArrayCollection = ArrayCollection_1.ArrayCollection; var ArrayList_1 = require('./ArrayList'); exports.ArrayList = ArrayList_1.ArrayList; var SequenceBase_1 = require('./SequenceBase'); exports...
var Stack_1 = require('./Stack'); exports.Stack = Stack_1.Stack; var Util_1 = require('./Util'); exports.Util = Util_1.Util;
<|file_name|>DBLogger.py<|end_file_name|><|fim▁begin|>import datetime import MySQLdb from os import sys<|fim▁hole|> self.pwd = '<password>' self.dbase = '<database>' self.location = loc self.conn = MySQLdb.connect(host="localhost", user=self.usr, passwd=self.pwd, db=self.dbase) self.cursor = self.con...
class DBLogger: def __init__(self, loc='default-location'): self.usr = '<user>'
<|file_name|>config.ts<|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 */ <|fim▁hole|>import {Type} from '@angular/core'; import {Observabl...
<|file_name|>functionCallOnConstrainedTypeVariable.ts<|end_file_name|><|fim▁begin|>// @strict: true // Repro from #20196 type A = { a: (x: number) => string }; type B = { a: (x: boolean) => string }; function call0(p: A | B) { p.a("s"); // Error } function callN<T extends A | B>(p: T) { <|fim▁...
p.a("s"); // Error var a: T["a"] = p.a; a(""); // Error
<|file_name|>redis.py<|end_file_name|><|fim▁begin|>from feedly.feed_managers.base import Feedly from feedly.feeds.base import UserBaseFeed from feedly.feeds.redis import RedisFeed from feedly.tests.managers.base import BaseFeedlyTest import pytest class RedisUserBaseFeed(UserBaseFeed, RedisFeed): pass class Red...
<|file_name|>generate.js<|end_file_name|><|fim▁begin|><|fim▁hole|> var pages = [ 'index', 'contact', 'faq', 'registration', 'sponsors', 'travel', 'visit', 'volunteers' ]; pages.forEach(function(page) { cons.dust('views/'+page+'.dust', { views: __dirname+'/views'}, function(err, html) { if(err) return cons...
var fs = require('fs'), cons = require('consolidate'), dust = require('dustjs-linkedin');
<|file_name|>TanteadorTopilejo.java<|end_file_name|><|fim▁begin|>package Calibradores; import java.io.File; import Metricas.MultiescalaConBorde; import Modelo.UrbanizandoFrenos; public class TanteadorTopilejo extends Tanteador { UrbanizandoFrenos CA; public TanteadorTopilejo() { // int[] unConjuntoD...
CA = new UrbanizandoFrenos(72, 56, 11, 4); CA.setInitialGrid(new File ("Topilejo/topi1995.txt")); CA.setBosque(new File ("Topilejo/bosqueb.txt"));
<|file_name|>copy_tree.py<|end_file_name|><|fim▁begin|>''' Created on Dec 12, 2011 @author: sean ''' from . import Visitor import ast #FIXME: add tests class CopyVisitor(Visitor): ''' Copy only ast nodes and lists ''' def visitDefault(self, node): Node = type(node) new_node = Node() ...
new_list = []
<|file_name|>ModalManager.jest.tsx<|end_file_name|><|fim▁begin|>import { LoginForm } from "v2/Components/Authentication/Desktop/LoginForm" import { ModalType } from "v2/Components/Authentication/Types" import { mount, ReactWrapper } from "enzyme" import React from "react" import { Intent, ContextModule } from "@artsy/...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate regex; macro_rules! regex( ($s:expr) => (regex::Regex::new($s).unwrap()); ); pub fn is_valid(kennitala : &str) -> bool { let constants = [3, 2, 7, 6, 5, 4, 3, 2]; let re = regex!(r"^\d{6}-?\d{4}$");<|fim▁hole|> if re.is_match(kennitala) { ...
<|file_name|>vk_parser.py<|end_file_name|><|fim▁begin|>import vk import json from sentiment_classifiers import SentimentClassifier, binary_dict, files class VkFeatureProvider(object): def __init__(self): self._vk_api = vk.API(vk.Session()) self._vk_delay = 0.3 self._clf = SentimentClassifie...
result.append({'source': data['groups'][0]['name'], 'news': news})
<|file_name|>GridList.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { StandardProps } from '..'; export interface GridListProps extends StandardProps< React.HTMLAttributes<HTMLUListElement>, GridListClassKey > { cellHeight?: number | 'auto'; cols?: number; component?: string | Reac...
}
<|file_name|>simrun.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Simulation launch services. Simulation launch services provide the following functionality: - generating simulation id based on local date and time; - generating simulation directory name;<|fim▁hole|>- loading names of simulation directori...
<|file_name|>until_any_or_whitespace.rs<|end_file_name|><|fim▁begin|>use read_token::ReadToken; use range::Range; use std::sync::Arc; use super::{ ParseResult, }; use { DebugId, MetaData, ParseError, }; use tokenizer::{ read_data, TokenizerState }; /// Stores information about reading until whitespace...
state ), None)) } else {
<|file_name|>error.py<|end_file_name|><|fim▁begin|># box # Copyright 2013-2014 Dipen Patel # See LICENSE for details. STATUSCODES = { 200 : "success", 201 : "created", 202 : "accepted", 204 : "no_content", 302 : "redirect", 304 : "not_modifi...
def __init__(self, reason, response=None): self.reason = unicode(reason) self.response = response
<|file_name|>biopore_detect.py<|end_file_name|><|fim▁begin|># coding: utf-8 import numpy as np import matplotlib.pyplot as plt import scipy.ndimage as snd import seaborn as sns from skimage import img_as_float, morphology, measure from skimage.color import rgb2hsv from skimage.morphology import reconstruction from sk...
labeled_patches = label(patches_cleaned) sizes = np.bincount(labeled_patches.ravel())[1:] #first entry (background) discarded
<|file_name|>project.py<|end_file_name|><|fim▁begin|>from corecat.constants import OBJECT_CODES, MODEL_VERSION from ._sqlalchemy import Base, CoreCatBaseMixin from ._sqlalchemy import Column, \ Integer, \ String, Text class Project(CoreCatBaseMixin, Base): """Project Model class represent for the 'project...
project_name = Column('name', String(100), nullable=False
<|file_name|>includer.js<|end_file_name|><|fim▁begin|>const log = require('app/lib/core/log') module.exports = config => props => { const [ pluginName, pluginPath, pluginExports ] = props log.trace(`Initialzing includer: ${log.ul(pluginPath)}.`) const exports = {} exports.name = pluginExports.name || plu...
exports.options = newOpts
<|file_name|>kitchen_sink.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(json_macros)] #[cfg(feature="with-rustc-serialize")] extern crate rustc_serialize; #[cfg(feature="with-serde")] extern crate serde_json; #[cfg(feature="with-rustc-serialize")] fn make_pretty_json(x: i32) -> String { json!({ /...
<|file_name|>compression.go<|end_file_name|><|fim▁begin|>package compression import ( c "gopkg.in/h2non/gentleman.v2/context" p "gopkg.in/h2non/gentleman.v2/plugin" "net/http" ) // Disable disables the authorization basic header in the outgoing request func Disable() p.Plugin { return p.NewRequestPlugin(func(ctx ...
}
<|file_name|>handle.go<|end_file_name|><|fim▁begin|>package dmserver import ( "auth" "colorlog" "conf" "encoding/json" "errors" "fmt" "io/ioutil" "net" "net/http" "os" "strconv" "time" "utils" "regexp" "os/exec" ) var config conf.Cnf var serverSaved = make(map[int]*ServerLocal, 0) var servers = make(ma...
} }
<|file_name|>monorail.py<|end_file_name|><|fim▁begin|># Copyright 2021 Google LLC # # 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 # # Unles...
<|file_name|>test_decorators.py<|end_file_name|><|fim▁begin|># Copyright 2013 IBM Corp # Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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...
self._test_skip_because_helper(bug='12348', condition=True) def test_skip_because_bug_and_condition_false(self): self._test_skip_because_helper(expected_to_skip=False,
<|file_name|>scheduler.py<|end_file_name|><|fim▁begin|># Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
def timeLeft(self):
<|file_name|>typescript.ts<|end_file_name|><|fim▁begin|>import * as path from 'path'; import { stripIndent } from 'common-tags'; import { AotPlugin, AotPluginOptions, AngularCompilerPlugin, AngularCompilerPluginOptions, PLATFORM } from '@ngtools/webpack'; import { WebpackConfigOptions } from '../webpack-confi...
hostReplacementPaths = { [path.resolve(appRoot, sourcePath)]: path.resolve(appRoot, envFile) }; }
<|file_name|>test_buddyns.py<|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 You under the Apach...
zone = zones[0]
<|file_name|>upgrade_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2019 The Skaffold 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.apache.org/licenses/LICENSE-2.0 Unle...
<|file_name|>BbCodeAwareSizeValidator.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2011 JTalks.org Team * This 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 Software Foundation; either * version 2.1...
/** * Removes all BB codes from the text given, simply cutting * out all [...]-style tags found *
<|file_name|>CALC.H<|end_file_name|><|fim▁begin|>///////////////////////////////////////////////////////////////////// // Quantum Calculator example (C++ version) // Copyright (c) 2002 Miro Samek, Palo Alto, CA. // All Rights Reserved. ///////////////////////////////////////////////////////////////////// #ifndef ...
#define calc_h
<|file_name|>inst_float.rs<|end_file_name|><|fim▁begin|>// run-pass<|fim▁hole|><|fim▁end|>
pub type T = float;
<|file_name|>behaviors.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import print_function import sys import re from utils import CDNEngine from utils import request if sys.version_info >= (3, 0): import subprocess as commands import urllib.parse as urlparse else: import commands ...
for addr in addresses: res = request.do('http://' + addr.group()) if res is not None and res.status_code == 500: CDNEngine.find(res.text.lower())
<|file_name|>CylinderShape.hpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2011-2022, The DART development contributors * All rights reserved. * * The list of contributors can be found at: * https://github.com/dartsim/dart/blob/master/LICENSE * * This file is provided under the following "BSD-style" Licens...
* * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer.
<|file_name|>party.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; import { ColyseusGameService } from '../colyseus.game.service'; import { startCase } from 'lodash'; import { LocalStorage } from 'ngx-webstorage'; @Component({ selector: 'app-party',<|fim▁hole|>}) export class Pa...
templateUrl: './party.component.html', styleUrls: ['./party.component.scss']
<|file_name|>refresh.py<|end_file_name|><|fim▁begin|># coding=utf-8 from ..packet import Packet from ..proto import Proto from ..flags import Flags <|fim▁hole|>class Refresh(Packet): __slots__ = ('flags', ) + Packet.__slots__ def __init__(self): super(Refresh, self).__init__() self.flags = 0x0...
<|file_name|>ActiveDictionarySelector.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react' import { Button, Dropdown, Icon, Image, Form, Modal, Segment } from 'semantic-ui-react' import tr from '../app/utils/Translation'; const verticallyCenteredTextStyle = { display: 'inline-flex', alignItems:...
onActiveDictionariesChanged: React.PropTypes.func };
<|file_name|>Singleton.java<|end_file_name|><|fim▁begin|>package com.javarush.test.level14.lesson08.bonus03; /** * Created by Алексей on 12.04.2014. */ public class Singleton { private static Singleton instance; private Singleton() {<|fim▁hole|> if ( instance == null ) { insta...
} public static Singleton getInstance() {
<|file_name|>climate.py<|end_file_name|><|fim▁begin|>"""Plugwise Climate component for Home Assistant.""" import logging from Plugwise_Smile.Smile import Smile from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT,...
_LOGGER.error("Error while communicating to device")
<|file_name|>issue-4252.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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...
} }
<|file_name|>application.js<|end_file_name|><|fim▁begin|>console.log('Hello!'); <|fim▁hole|> $('#temperature_display').css('color', thermostat.colour); }; $(document).ready(function() { updateTemperature(); $('#increase-button').on('click', function() { thermostat.increaseTemp(); updateTemperature(); ...
var thermostat = new Thermostat(); var updateTemperature = function() { $('#temperature_display').text(thermostat.temperature);
<|file_name|>DummyAnimInstance.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>//----------------------------------------------------------------------------- // Class: DummyAnimInstance // Authors: Li, Xizhi // Emails: LiXizhi@yeah.net // Company: ParaEngine // Date: 2014.9.21 //------------------------------------------...
<|file_name|>after.ts<|end_file_name|><|fim▁begin|>import { Rowan, Next, Processor } from "./rowan"; /** <|fim▁hole|> */ export class After<Ctx = any> extends Rowan<Ctx>{ process(ctx: Ctx, next: Next) { return next().then(_ => super.process(ctx, function () { return Promise.resolve() })) } }<|fim▁end|>
* executes its middleware after next has returned.
<|file_name|>adobetv.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, unified_strdate, str_to_int, float_or_none, ISO639Utils, ) class AdobeTVIE(InfoExtractor): _VALID_URL = r'https?://tv\.adobe\.co...
'id': video_id, 'formats': formats, 'title': player_params['title'],
<|file_name|>Coordinate.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accompanies this distribution. * * The Eclipse Public License is avai...
/* * Copyright (c) 2016 The original author or authors *
<|file_name|>event.js<|end_file_name|><|fim▁begin|>/** * helper functions for event entities */ (function () { /** * show self contained popup for listing Course Event entities */ radio('Event-CourseEvent').subscribe(function(modelId){ var id = new Date().getTime(); $.get(document.endpoints.event.get...
<|file_name|>oLanguage.sProcessing.js<|end_file_name|><|fim▁begin|>// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sProcessing" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt", "bDeferRender": t...
} ); oSettings = oTable.fnSettings(); },
<|file_name|>PPCPredicates.cpp<|end_file_name|><|fim▁begin|>//===-- PPCPredicates.cpp - PPC Branch Predicate Information --------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache...
<|file_name|>test_multiple_nic_support.py<|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 you...
cls.testdata["shared_network_sg"]["displaytext"] = "Shared-Network-SG-Test-vlan" + str(random_subnet_number) cls.testdata["shared_network_sg"]["vlan"] = "vlan://" + str(random_subnet_number)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module 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 v...
raise NotImplemented
<|file_name|>unittest_utils.py<|end_file_name|><|fim▁begin|># copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid is free software: you can redistribute it and/or modify it # under the terms of...
"this one redefine the one defined line 42" ''')
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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 vers...
let out_dir = env::var_os("OUT_DIR").unwrap(); let src = Path::new("src/lib.rs.in");
<|file_name|>t_tube.cc<|end_file_name|><|fim▁begin|>/** * This file is part of the CernVM File System. */ #include "gtest/gtest.h" #include "ingestion/tube.h" using namespace std; // NOLINT namespace { class DummyItem { public: DummyItem() : tag_(-1) { } int64_t tag() { return tag_; } int64_t tag_; }; } ...
Tube<DummyItem> *t1 = new Tube<DummyItem>(); grp1.TakeTube(t1); grp1.Activate();
<|file_name|>test_parentHook2to3.py<|end_file_name|><|fim▁begin|>""" Test upgrading L{_SubSchedulerParentHook} from version 2 to 3. """ from axiom.test.historic.stubloader import StubbedTest from axiom.scheduler import _SubSchedulerParentHook from axiom.substore import SubStore from axiom.dependency import _Dependenc...
d.addCallback(cbSetUp) return d
<|file_name|>unsized7.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/licens...
//~^ ERROR `core::marker::Sized` is not implemented for the type `X` }
<|file_name|>test_monitor_log_analytics_cluster.py<|end_file_name|><|fim▁begin|># -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license inf...
from azure.cli.testsdk import ScenarioTest, record_only, ResourceGroupPreparer
<|file_name|>2357b6b3d76_.py<|end_file_name|><|fim▁begin|>"""empty message Revision ID: 2357b6b3d76 Revises: fecca96b9d Create Date: 2015-10-27 10:26:52.074526 """<|fim▁hole|>down_revision = 'fecca96b9d' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - plea...
# revision identifiers, used by Alembic. revision = '2357b6b3d76'
<|file_name|>MRSATreatmentVoBean.java<|end_file_name|><|fim▁begin|>//############################################################################# //# #<|fim▁hole|>//# published by the Free Software Foundation, either version 3 of the # //...
//# Copyright (C) <2014> <IMS MAXIMS> # //# # //# This program is free software: you can redistribute it and/or modify # //# it under the terms of the GNU Affero General Public License as #
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Bien', ...
),
<|file_name|>wine.py<|end_file_name|><|fim▁begin|>from selenium import webdriver from selenium.webdriver.common.keys import Keys import json import time def keys(filename): with open(filename) as f: secret_keys = json.load(f) return secret_keys def access_listpage(secret_keys, driver): driver.ge...
"""
<|file_name|>D3DSurfaceData.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Genera...
return 0L;
<|file_name|>isEmpty.js<|end_file_name|><|fim▁begin|>// @flow import getKeys from "./getKeys"; import type {Composite} from "./types"; /** * Returns true if composite has no own enumerable keys (is empty) or false * otherwise */ const isEmpty = (composite: Composite): boolean =><|fim▁hole|>export default isEmpty;...
getKeys(composite).length === 0;
<|file_name|>tmp-04.cpp<|end_file_name|><|fim▁begin|>#include <cstdlib> #include <iostream> #include <vector> #include <sys/time.h> #include <omp.h> #include <hbwmalloc.h><|fim▁hole|> double drand() { return double(rand()) / double(RAND_MAX); } double wctime() { struct timeval tv; gettimeofday(&tv,NULL); ret...
using namespace std;
<|file_name|>scope_table_builder.rs<|end_file_name|><|fim▁begin|>//! Build the scope table and make sure all variables/symbols can be resolved use driver::interner::Ident; use driver::session; use driver::symbol_table::SymbolTable; use front::ast::*; use front::ast::visit::*; struct ScopeTableBuilder<'a> { curre...
}
<|file_name|>AgendaWizardDialogResources.py<|end_file_name|><|fim▁begin|># # This file is part of the LibreOffice project. # # 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....
# This file incorporates work covered by the following license notice: # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed
<|file_name|>hook_utils.py<|end_file_name|><|fim▁begin|>import re # flag that caches the information whether Windows firewall is running or not fireWallState = None # this function modifies all necessary run settings to make it possible to hook into # the application compiled by Creator def modifyRunSettingsForHookInt...
# this uses the defaultQtVersion currently switchViewTo(ViewConstants.PROJECTS)
<|file_name|>issue-36744-without-calls.rs<|end_file_name|><|fim▁begin|>// build-pass // Tests for an LLVM abort when storing a lifetime-parametric fn into // context that is expecting one that is not lifetime-parametric // (i.e., has no `for <'_>`).<|fim▁hole|> pub struct A<'a>(&'a ()); pub struct S<T>(T); pub fn bad<...
<|file_name|>ecs.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::iter; use world; use entity::{Entity}; use components; use component_ref::{ComponentRef, ComponentRefMut}; use stats; use world::{WorldState}; /// Entity component system. #[derive(RustcDecodable, RustcEncodable)] pub struct Ecs {...
} // Implement the Componet trait for the type, this provides an uniform
<|file_name|>ExpandedResourceRepositoryApplicationContext.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 1998, 2015 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available un...
package org.eclipse.persistence.tools.workbench.framework.context; import org.eclipse.persistence.tools.workbench.framework.resources.IconResourceFileNameMap; import org.eclipse.persistence.tools.workbench.framework.resources.ResourceRepository;
<|file_name|>pipeline.py<|end_file_name|><|fim▁begin|>"""Auth pipeline definitions. Auth pipelines handle the process of authenticating a user. They involve a consumer system and a provider service. The general pattern is: 1. The consumer system exposes a URL endpoint that starts the process. 2. When a user v...
if auth_entry not in _AUTH_ENTRY_CHOICES:
<|file_name|>engine.rs<|end_file_name|><|fim▁begin|>use std::thread; use std::collections::HashMap; use std::intrinsics::type_name; use std::mem; use std::ptr::{self, Unique}; use std::sync::{Arc, Barrier, Mutex}; use std::time::Duration; use bootstrap::input::ScanCode; use bootstrap::window::Window; use bootstrap::wi...
/// Retrieves a reference to current scene. /// /// Panics if the engine hasn't been created yet. pub fn scene<'a>() -> &'a Scene {
<|file_name|>VariableIdPattern.py<|end_file_name|><|fim▁begin|># Copyright 2016 Casey Jaymes # This file is part of PySCAP.<|fim▁hole|># 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. # # PyS...
# # PySCAP is free software: you can redistribute it and/or modify
<|file_name|>activations.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import six import warnings from . import backend as K from .utils.generic_utils import deserialize_keras_object from .engine import Layer def softmax(x, axis=-1): """Softmax activation function. # Arguments ...
<|file_name|>CtrlDialogView.js<|end_file_name|><|fim▁begin|>define(['backbone', 'marionette', 'mustache', 'jquery', 'text!templates/ctrldialog.html'], function(Backbone, Marionette, Mustache, $, template) { return Marionette.ItemView.extend({<|fim▁hole|> this.model = new Backbone.Model( opti...
initialize: function(options) { if (!options.icon_name) { options.icon_name = 'bird'; }
<|file_name|>compress.js<|end_file_name|><|fim▁begin|>/* * grunt-contrib-compress * http://gruntjs.com/ * * Copyright (c) 2016 Chris Talkington, contributors * Licensed under the MIT license. */ 'use strict'; var fs = require('fs'); var path = require('path'); var prettyBytes = require('pretty-bytes'); var chal...
} if (_.endsWith(dest, '.tar.gz')) {
<|file_name|>bootstrap.py<|end_file_name|><|fim▁begin|>############################################################################## # # Copyright (c) 2006 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...
quote('from setuptools.command.easy_install import main; main()'), '-mqNxd', quote(eggs_dir)]