prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>Character.java<|end_file_name|><|fim▁begin|>package lionse.client.stage;
import java.util.ArrayList;
import java.util.List;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.... |
private void updatePosition(float delta) { |
<|file_name|>refeicao.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database';<|fim▁hole|>import { AngularFireAuth } from 'angularfire2/auth';
//import firebase namespace for funct... | |
<|file_name|>MessageService.java<|end_file_name|><|fim▁begin|>package com.aspose.spreadsheeteditor;
import java.util.logging.Logger;
import javax.enterprise.context.ApplicationScoped;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;<|fim▁hole|>import javax.inject.Named;
import org.... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rusttrace;
fn main() {
rusttrace::__init("initialize");
for x in 0..10 {
let s = format!("Value: {}", x);
rusttrace::__trace(&s);
}
<|fim▁hole|>}<|fim▁end|> | rusttrace::__cleanup("cleanup"); |
<|file_name|>comp-2691.component.spec.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
*/
import { async, ComponentFixture, TestBed } fr... |
it('should create', () => { |
<|file_name|>users_api.py<|end_file_name|><|fim▁begin|># coding: utf-8
"""
Gmail
Access Gmail mailboxes including sending user email.
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
impor... | header_params = {}
|
<|file_name|>9040004.js<|end_file_name|><|fim▁begin|>var status = -1;
function action(mode, type, selection) {
if (mode == 1) {
status++;<|fim▁hole|> } else {
if (status == 0) {
cm.dispose();
}
status--;
}
if (status == 0) {
cm.sendSimple("#b#L0#Pokemon Rankings (by Wins)#l\r\n#L1#Pokemon Rank... | |
<|file_name|>rnnocl.cpp<|end_file_name|><|fim▁begin|>/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2017 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associa... | |
<|file_name|>event-valuechange.js<|end_file_name|><|fim▁begin|>/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('event-valuechange', function(Y) {
/**
Adds a synthetic `valueChange` event that fires when the `value` proper... | |
<|file_name|>reporttimeout.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////////////
///
/// \file reporttimeout.cpp
/// \brief This file contains the implementation of a JAUS message.
///
/// <br>Author(s): Bo Sun
/// <br>Created: 17 November 2009
... | ////////////////////////////////////////////////////////////////////////////////////
///
|
<|file_name|>GameComponent.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react';
import * as R from 'ramda';
import { dealCards } from '../../lib/poker/dealer';
import Table from '../../lib/poker/Table';
import * as Cards from '../../lib/cards/cards';
import * as Game from '../../lib/poker/game';
interface ... |
interface State {
gameTurn: Game.GameTurn; |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// encrypter.rs
//
// Copyright 2019 Jordan Petridis <jordan@centricular.com>
//
// 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 re... | )
} |
<|file_name|>PoqmObservationCatalogItem.java<|end_file_name|><|fim▁begin|>package org.molgenis.lifelines.catalog;
import nl.umcg.hl7.service.studydefinition.POQMMT000002UVObservation;
import org.molgenis.omx.catalogmanager.OmxCatalogFolder;
import org.molgenis.omx.observ.Protocol;
public class PoqmObservationCatalog... | return observation.getCode().getDisplayName();
} |
<|file_name|>text-replace-error-tests.js<|end_file_name|><|fim▁begin|>var grunt = require('grunt');
var fs = require('fs');
var gruntTextReplace = require('../lib/grunt-match-replace');
var replace = function (settings) {
return gruntTextReplace.replace(settings);
};
exports.textReplace = {
'Test error handli... | test.equal(grunt.fail.warncount - warnCountBefore, 1);
test.done();
}, |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import sys
import os
from distutils.core import run_setup
# build_ext is subclassed, so we import it with a _ to avoid a collision
from distutils.command.build_ext import build_ext as _build_ext
from setuptools import setup, Extension, find_pack... | |
<|file_name|>snd_app.cpp<|end_file_name|><|fim▁begin|>// ==========================================================================
// snd_app
// ==========================================================================
// Copyright (c) 2006-2012, Knut Reinert, FU Berlin
// All rights ... | |
<|file_name|>package.js<|end_file_name|><|fim▁begin|>Package.describe({
name: 'craigslist-utils',
summary: 'Npm Craigslist-utils packaged for Meteor.'
});
Npm.depends ({
'craigslist-utils': '0.0.7'
});
Package.on_use(function (api) {
api.add_files('craigslist-utils.js', ['server']);
api.export('CL');
});... | api.use('craigslist-utils');
api.use('tinytest'); |
<|file_name|>UserInterface.java<|end_file_name|><|fim▁begin|>/*
* Neon, a roguelike engine.
* Copyright (C) 2017-2018 - Maarten Driesen
*
* 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 Software Foundat... | |
<|file_name|>test_fallback.py<|end_file_name|><|fim▁begin|>from django.contrib.messages import constants
from django.contrib.messages.storage.fallback import (
CookieStorage, FallbackStorage,
)
from django.test import SimpleTestCase
from .base import BaseTests
from .test_cookie import set_cookie_data, stored_cooki... | def get_cookie_storage(self, storage):
return storage.storages[-2]
|
<|file_name|>test_finite_rv.py<|end_file_name|><|fim▁begin|>from sympy.core.compatibility import range
from sympy import (FiniteSet, S, Symbol, sqrt,
symbols, simplify, Eq, cos, And, Tuple, Or, Dict, sympify, binomial,
cancel, KroneckerDelta)
from sympy.concrete.expr_with_limits import AddWithLimits
fro... | assert variance(X) == n*(m/N)*(N - m)/N*(N - n)/(N - 1)
# Only test for skewness when defined |
<|file_name|>ConnectionPoolingTest.java<|end_file_name|><|fim▁begin|>/**
* Copyright Pravega 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/lice... | msgRead.add(data);
}
@Override |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import random
import string
def random_string(n):
result = ''<|fim▁hole|><|fim▁end|> | for _ in range(10):
result += random.SystemRandom().choice(
string.ascii_uppercase + string.digits)
return result |
<|file_name|>query.go<|end_file_name|><|fim▁begin|>// Derived from http://golang.org/src/pkg/net/url/url.go
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the QueryLICENSE file.
package query
func Escape(s string) string {
... | } |
<|file_name|>never.rs<|end_file_name|><|fim▁begin|>// rustfmt-match_arm_leading_pipes: Never
fn foo() {
match foo {
| "foo" | "bar" => {}
| "baz"
| "something relatively long"
| "something really really really realllllllllllllly long" => println!("x"),
| "qux" => println!("y... | _ => {}
}
}
|
<|file_name|>books.ratinginput.directive.js<|end_file_name|><|fim▁begin|>(function(app) {
"use strict";
app.directive("ratingInput", [
"$rootScope", function($rootScope) {
return {
restrict: "A",
link: function($scope, $element, $attrs) {
... | target: "#Rating",
targetKeep: true,
noRatedMsg: "Not Rated yet!",
scoreName: "Rating", |
<|file_name|>ExprSwitch.java<|end_file_name|><|fim▁begin|>/**
* <copyright>
* </copyright>
*
* $Id$
*/
package klaper.expr.util;
import java.util.List;
import klaper.expr.Atom;
import klaper.expr.Binary;
import klaper.expr.Div;
import klaper.expr.Exp;
import klaper.expr.ExprPackage;
import klaper.expr.Expression... | }
/** |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import {NgbdPopoverBasic} from './basic/popover-basic';
export const DEMO_DIRECTIVES = [NgbdPopoverBasic];
export const DEMO_SNIPPETS = {<|fim▁hole|> "basic": {
"code": require('!!prismjs?lang=typescript!./basic/popover-basic'),
"markup": require('!!prismjs?... | |
<|file_name|>AtomicReferenceInstanceSharingTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2008-2017, Hazelcast, Inc. 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 ... | private HazelcastInstance local;
private HazelcastInstance remote;
@Before |
<|file_name|>dimension.py<|end_file_name|><|fim▁begin|># Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
#
# 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, inclu... | # IN THE SOFTWARE.
#
|
<|file_name|>zgematrix-zhematrix.hpp<|end_file_name|><|fim▁begin|>//=============================================================================
/*! zgematrix+=zhematrix operator */
inline zgematrix& zgematrix::operator+=(const zhematrix& mat)
{CPPL_VERBOSE_REPORT;
#ifdef CPPL_DEBUG
if(n!=mat.n || m!=mat.n){
ER... | comple beta =comple(0.,0.);
zhemm_( &side, &uplo, &newmat.m, &newmat.n, &alpha, matB.array, &matB.n, matA.array, &matA.m, &beta, newmat.array, &newmat.m ); |
<|file_name|>playermongoman.js<|end_file_name|><|fim▁begin|>//
// Draws the player object if he is mongoman
// <|fim▁hole|> tileset:"mongoman",
killed:false,
scorecombo:1,
time:-1,
initialize: function() {
// Sets up the objects, properties on our 2D map
toys.topview.initialize(this,{
... | var createPlayerMongoman = function() {
return {
id:"mongoman",
group:"player", |
<|file_name|>tektronixOA5012.py<|end_file_name|><|fim▁begin|>"""
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2016 Alex Forencich
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 S... | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY |
<|file_name|>consumer_tracking_pipeline_visitor_test.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 thi... | first_output |
<|file_name|>version.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | VERSION = None
BRANCH = 'master' |
<|file_name|>IExpression.ts<|end_file_name|><|fim▁begin|>export interface IExpression {<|fim▁hole|> toJSON(): Object
evaluate(context: Object): any
}<|fim▁end|> | |
<|file_name|>tornado_embed.py<|end_file_name|><|fim▁begin|>from jinja2 import Environment, FileSystemLoader
import yaml
from tornado.ioloop import IOLoop
from tornado.web import RequestHandler
<|fim▁hole|>from bokeh.layouts import column
from bokeh.models import ColumnDataSource, Slider
from bokeh.plotting import figu... | from bokeh.application import Application
from bokeh.application.handlers import FunctionHandler
from bokeh.embed import server_document |
<|file_name|>edit_record.py<|end_file_name|><|fim▁begin|>from common.methods import set_progress
from utilities.models import ConnectionInfo
from servicecatalog.models import ServiceBlueprint
from infrastructure.models import CustomField
import json
from ast import literal_eval
import requests
API_CLIENT_CI = "Citrix... |
resource.name = '{}- {}'.format(dnsZone, recordType) |
<|file_name|>affine_linear_operator.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:... | remove_undocumented(__name__, _allowed_symbols) |
<|file_name|>usage_tasks.py<|end_file_name|><|fim▁begin|>from __future__ import division
from django.conf import settings<|fim▁hole|>import datetime
import logging
from cali_water.usage_data_tasks import TasksForMonthlyWaterUseReport
logger = logging.getLogger("accountability_tracker")
class Command(BaseCommand):
... | from django.core.management.base import BaseCommand
import time |
<|file_name|>testbinding.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/. */
// check-tidy: no specs after this line
use dom::binding... | |
<|file_name|>0030_merge.py<|end_file_name|><|fim▁begin|>from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("candidates", "0029_add_ordering_to_fields_meta"),<|fim▁hole|> ("candidates", "0028_auto_20160411_1055"),
]
operations = []<|fim▁end|> | |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>"""This file sets up a command line manager.
Use "python manage.py" for a list of available commands.
Use "python manage.py runserver" to start the development web server on localhost:5000.
Use "python manage.py runserver --help" for additional runserver options.
"""... | if __name__ == "__main__":
# python manage.py # shows available commands |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.auth import views
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'lite_note.views.home', name='home'),
ur... | url(r'^delete/(?P<id>[0-9]+)','lite_note.tools.delet_note'),
url(r'^private/(?P<id>[0-9]+)','lite_note.tools.make_private_note'), |
<|file_name|>regions-borrow-estr-uniq.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.a... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os<|fim▁hole|>from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "my-django-skeleton",
version = "0.1",
url = 'http://github.com/lemonad/my-django-skelet... | |
<|file_name|>ethcore.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (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 version 3 of t... | |
<|file_name|>issue-5884.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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/lice... | // option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(managed_boxes)] |
<|file_name|>memory.rs<|end_file_name|><|fim▁begin|>// TODO: Doc the rest
use core::{cmp, intrinsics, mem};
use core::ops::{Index, IndexMut};
use core::ptr;
use common::paging::PAGE_END;
use sync::Intex;
pub const CLUSTER_ADDRESS: usize = PAGE_END;
pub const CLUSTER_COUNT: usize = 1024 * 1024; // 4 GiB
pub const CL... | unsafe { unalloc(self.ptr as usize) };
}
}
} |
<|file_name|>vector_plot_2d.cpp<|end_file_name|><|fim▁begin|>#include "vector_plot_2d.h"
#include "../graph/vector_graph_2d.h"
namespace Gnuplot {
Vector_plot_2d::Vector_plot_2d()
// Default constructor
: Plot_2d {Representation::TwoDVector}
{
// Add default graph:
this->graphs.push_back(std::make_sha... | } |
<|file_name|>atr.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import numpy as np
h, l, c = np.loadtxt('data.csv', delimiter=',', usecols=(4, 5, 6), unpack=True)
N = 5
h = h[-N:]
l = l[-N:]
print("len(h)", len(h), "len(l)", len(l))
print("Close", c)
previousclose = c[-N -1: -1]
print("len(pr... |
for i in range(1, N): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from sqlalchemy.orm import sessionmaker as sqla_sessionmaker
from sqlalchemy import engine_from_config
import zope.sqlalchemy
import transaction
from .meta import Base
from .user import (
User,
UserTickets,
)<|fim▁hole|>
from .domai... | |
<|file_name|>gtk_deprecated_since_3_20.go<|end_file_name|><|fim▁begin|>//+build gtk_3_6 gtk_3_8 gtk_3_10 gtk_3_12 gtk_3_14 gtk_3_16 gtk_3_18 gtk_deprecated
package gtk
// #include <gtk/gtk.h>
// #include <stdlib.h>
import "C"
import (
"unsafe"
)
/*
* GtkRange
*/
// TODO:
// gtk_range_get_min_slider_size().
// gt... | |
<|file_name|>info.go<|end_file_name|><|fim▁begin|>package atc
type Info struct {
Version string `json:"version"`
WorkerVersion string `json:"worker_version"`<|fim▁hole|><|fim▁end|> | } |
<|file_name|>Wadl2HtmlPipelineTest.java<|end_file_name|><|fim▁begin|>/*
* Licensed to Indoqa Software Design und Beratung GmbH (Indoqa)
* under one or more contributor license agreements. See the NOTICE
* file distributed with this work for additional information
* regarding copyright ownership. Indoqa licenses t... | |
<|file_name|>NumberParser.cpp<|end_file_name|><|fim▁begin|>#include "NumberParser.hpp"
#include <algorithm>
/**
* Operator array
* Used to confirm that a token is an operator
*/
QChar NumberParser::m_operators[] = {
'(', ')', '*', '+', '-', '/', '^', '_'
};
/**
* Shunting-yard algorithm
* Info: http://en.wik... | } |
<|file_name|>test_node_detail.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import mock
import pytest
from urlparse import urlparse
from api.base.settings.defaults import API_BASE
from framework.auth.core import Auth
from osf.models import NodeLog
from osf.models.licenses import NodeLicense
from osf.utils.s... | def user_two(self):
return AuthUserFactory()
@pytest.fixture() |
<|file_name|>stationary.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from scipy import integrate
from .kern import Kern
from ...core.parameterization import Param
from ...util.linalg import tdot
from... | """
OU kernel:
|
<|file_name|>obj_loader.cpp<|end_file_name|><|fim▁begin|>/* Lantern - A path tracer
*
* Lantern is the legal property of Adrian Astley
* Copyright Adrian Astley 2015 - 2016
*/
<|fim▁hole|>#include "scene/obj_loader.h"
#include "math/int_types.h"
#include <tiny_obj_loader/tiny_obj_loader.h>
namespace Lantern {
void... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or m... | # it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# |
<|file_name|>wsgiserver3.py<|end_file_name|><|fim▁begin|>"""A high-speed, production ready, thread pooled, generic HTTP server.
Simplest example on how to use this module directly
(without using CherryPy's application machinery)::
from cherrypy import wsgiserver
def my_crazy_app(environ, start_response):
... | |
<|file_name|>test_assertion.py<|end_file_name|><|fim▁begin|>import sys
import py, pytest
import _pytest.assertion as plugin
from _pytest.assertion import reinterpret, util
needsnewassert = pytest.mark.skipif("sys.version_info < (2,6)")
@pytest.fixture
def mock_config():
class Config(object):
verbose = Fa... | b = '\n'.join(map(str, b))
assert a == b
""") |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>'use strict'
let _ = require('lodash')
let HttpClient = require('./http-client')
/**
* Server configuration and environment information
* @extends {HttpClient}
*/
class Config extends HttpClient {
/**
* @constructs Config
* @param {Object} options Genera... | * to insert or update in the server
* @return {Pomise} A promise that resolves when the config has been set
*/
set (data) { |
<|file_name|>pprust.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/lic... | |
<|file_name|>cmod.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2015-2017 by Brendt Wohlberg <brendt@ieee.org>
# All rights reserved. BSD 3-clause License.
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
... | self['fEvalX'] = False
self['gEvalY'] = True |
<|file_name|>query-item.component.ts<|end_file_name|><|fim▁begin|>/*
* Lumeer: Modern Data Definition and Processing Platform
*
* Copyright (C) since 2017 Lumeer.io, s.r.o. and/or its affiliates.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Publi... | * |
<|file_name|>foscam.py<|end_file_name|><|fim▁begin|>from scrapy import Spider
from scrapy.http import Request
from firmware.items import FirmwareImage
from firmware.loader import FirmwareLoader
class FoscamSpider(Spider):
name = "foscam"
allowed_domains = ["foscam.com"]
start_urls = [
"http://www.... | item.add_xpath("version", "//div[@id='main_right']/span[2]//p[%d]/text()" % (i + 3)) |
<|file_name|>_identify_what_to_count.py<|end_file_name|><|fim▁begin|>def _identify_what_to_count(signature_component_weight):
signature_component_dict = {}
signature_component_differing_dict = {}
signature_component_before_dict = {}
signature_component_before_differing_dict = {}
for signature_c... | " ==> "
)
signature_component_dict[signature_component] = { |
<|file_name|>Declaration.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.mirror.declaration;
<|fim▁hole|>im... |
import java.lang.annotation.Annotation; |
<|file_name|>compiler_state.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use crate::artifact_map::ArtifactMap;
use crate::config::Config;
use cr... | file_source_changes, |
<|file_name|>args-fail.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>... | // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
// |
<|file_name|>video-create.model.ts<|end_file_name|><|fim▁begin|>import { VideoPrivacy } from './video-privacy.enum'
import { VideoScheduleUpdate } from './video-schedule-update.model'
export interface VideoCreate {
name: string<|fim▁hole|> licence?: number
language?: string
description?: string
support?: stri... | channelId: number
category?: number |
<|file_name|>interfaces.go<|end_file_name|><|fim▁begin|>package jobapi
// Copyright (c) Microsoft and contributors. 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
... |
import (
"context" |
<|file_name|>unittest_utils.py<|end_file_name|><|fim▁begin|># Copyright 2017 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://www.apa... | def create_random_image(image_format, shape):
"""Creates an image with random values. |
<|file_name|>admin.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.contrib import admin
from ionyweb.page.models import Page, Layout
admin.site.register(Page)
admin.site.register(Layout)<|fim▁end|> | # -*- coding: utf-8 -*-
|
<|file_name|>trait-default-method-xc.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.ap... | assert!(!a.test_neq(&a));
|
<|file_name|>middleware.spec.ts<|end_file_name|><|fim▁begin|>import { inject, TestBed, async } from '@angular/core/testing';
import { IsolatedMiddlewareFactory } from './index';
import { Request } from '../controllers/request';
import { Response } from '../controllers/response';
import { Route } from '../controllers/ro... | {provide: RemoteCli, useClass: RemoteCliMock},
{provide: AuthService, useClass: AuthServiceMock}, |
<|file_name|>Header.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'
import { connect } from 'react-redux'
import { setSearchTerm } from './actionCreators'
import { Link } from 'react-router'
class Header extends Component {
constructor (props) {
super(props)
this.handleSearchTermChan... | let utilSpace
if (this.props.showSearch) { |
<|file_name|>optionsdialog.cpp<|end_file_name|><|fim▁begin|>#include "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h"
#include "optionsmodel.h"
#include <QDir>
#include <QIntValidator>
#include <QLocale>
#include <QMessageBox>
OptionsDial... | if(model)
{ |
<|file_name|>massRosinRammler.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd ... | virtual scalar sample() const; |
<|file_name|>errors_test.go<|end_file_name|><|fim▁begin|>// Copyright 2020 The NATS 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
/... | }
func TestErrCtxWrapped(t *testing.T) {
ctxO := "Original Ctx" |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from Model import *<|fim▁end|> | |
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>"""
Tests for django-registration's built-in views.<|fim▁hole|>from django.core.urlresolvers import reverse
from django.test import override_settings, TestCase
from ..models import RegistrationProfile
@override_settings(ROOT_URLCONF='registration.tests.urls')
c... |
"""
|
<|file_name|>driver.py<|end_file_name|><|fim▁begin|>"""pytest_needle.driver
.. codeauthor:: John Lane <jlane@fanthreesixty.com>
"""
import base64
from errno import EEXIST
import math
import os
import re
import sys
import pytest
from needle.cases import import_from_string
from needle.engines.pil_engine import ImageDi... | :param bool value: Cleanup on success flag
:return: |
<|file_name|>screen.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright 2016,暗夜幽灵 <darknightghost.cn@gmail.com>
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 Software Fo... |
import curses
import traceback |
<|file_name|>removals.py<|end_file_name|><|fim▁begin|># Copyright 2014 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 License at
#
# http://ww... | |
<|file_name|>BigDataExtensions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# OpenStack Heat Plugin for interfacing with VMware Big Data Extensions
#
# Chris Mutchler - chris@virtualelephant.com
# http://www.VirtualElephant.com
#
# Licensed under the Apache License, Version 2.0 (the "License"); you m... | |
<|file_name|>arboretum_cv.py<|end_file_name|><|fim▁begin|>import gc
from concurrent.futures import ThreadPoolExecutor
import pandas as pd
import numpy as np
import os
import arboretum
import json
import sklearn.metrics
from sklearn.metrics import f1_score, roc_auc_score
from sklearn.model_selection import train_test_s... | order_prev = pd.merge(order_train, orders, on='order_id')
order_prev.order_number -= 1 |
<|file_name|>HelptextBuilder.java<|end_file_name|><|fim▁begin|>package ee.shy.cli;
import ee.shy.Builder;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
<|fim▁hole|>/**
* Class for building help text with preset format
*/
public class HelptextBuilder impleme... | |
<|file_name|>basic_example.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 A... | from kudu.client import Partitioning
# Parse arguments |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
def readfile(fn):
"""Read fn and return the contents."""
with open(path.join(here, fn), "r", encoding="utf-8") as f:
... |
setup( |
<|file_name|>smartcontracts.py<|end_file_name|><|fim▁begin|>import os
from typing import List, Tuple
from raiden.network.blockchain_service import BlockChainService
from raiden.network.pathfinding import get_random_service
from raiden.network.proxies.service_registry import ServiceRegistry
from raiden.network.rpc.clie... |
def get_list_of_block_numbers(item): |
<|file_name|>executable.py<|end_file_name|><|fim▁begin|>import balanced
balanced.configure('ak-test-2eKlj1ZDfAcZSARMf3NMhBHywDej0avSY')
debit = balanced.Debit.fetch('/debits/WD5EW7vbyXlTsudIGF5AkrEA')
debit.description = 'New description for debit'
debit.meta = {
'facebook.id': '1234567890',
'anykey': 'valuegoesh... | }
debit.save() |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Symplicity.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)<|fim▁end|> | #!/usr/bin/env python
import os |
<|file_name|>network.py<|end_file_name|><|fim▁begin|>"""Commands related to networks are in this module"""
import click
import sys
from hil.cli.client_setup import client
@click.group()
def network():
"""Commands related to network"""
@network.command(name='create', short_help='Create a new network')
@click.arg... | |
<|file_name|>0008_auto_20210519_1117.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 = [
('servicos', '0007_auto_20210416_0841'),
]
operations = [
... | model_name='tiposervico', |
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-tslint');
var pkg = grunt.file.readJSON('packa... | },
tslint: { |
<|file_name|>app.e2e-spec.ts<|end_file_name|><|fim▁begin|>import { FriendlyEnginePage } from './app.po';
describe('friendly-engine App', () => {
let page: FriendlyEnginePage;
beforeEach(() => {
page = new FriendlyEnginePage();
});
it('should display message saying app works', () => {
page.navigateTo(... | expect(page.getParagraphText()).toEqual('app works!'); |
<|file_name|>sh.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Common filesystem operations """
from __future__ import absolute_import... | # remove existing stuff
if os.path.lexists(dest):
rm(dest)
if sys.stdout.isatty() and not quiet: |
<|file_name|>Change.py<|end_file_name|><|fim▁begin|>import collections
<|fim▁hole|> def __init__(self):
super(Change, self).__init__()
def makeChange(self, change):
coinVaulues = collections.OrderedDict()
coinVaulues['h'] = 50
coinVaulues['q'] = 25
coinVaulues['d'] = 10
coinVaulues[... | class Change(object): |
<|file_name|>test_preparers.py<|end_file_name|><|fim▁begin|>import unittest
from restkiss.preparers import Preparer, FieldsPreparer
<|fim▁hole|> setattr(self, k, v)
class LookupDataTestCase(unittest.TestCase):
def setUp(self):
super(LookupDataTestCase, self).setUp()
self.preparer = Fi... | class InstaObj(object):
def __init__(self, **kwargs):
for k, v in kwargs.items(): |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.