prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::iter::repeat;
use std::io::Write;
pub mod export;
pub mod import;
pub fn print_progress(noun: &str, start_time: ::time::Timespec, done: usize, total: usize) {
let remaining_jobs = total - done;
let progress: f64 = 100f64 * done as f64 / total as f64;
... | ); |
<|file_name|>InputFragment.java<|end_file_name|><|fim▁begin|>package com.authpro.imageauthentication;
import android.app.Fragment;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.annotation.Nullable;
import an... | final ViewGroup gridLayout = (ViewGroup)view.findViewById(R.id.rows); |
<|file_name|>fetchDealsData.js<|end_file_name|><|fim▁begin|>import { dealsService } from '../services';
const fetchDealsData = () => {
return dealsService().getDeals()
.then(res => {
return res.data<|fim▁hole|> })
// Returning [] as a placeholder now so it does not error out when this service
//... | |
<|file_name|>bitcoin_ca_ES.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ca_ES" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About StarCoin</source>
<translation>Sobre Star... | |
<|file_name|>maintenance.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
from odoo import api, fields, models, SUPERUSER_ID, _
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
class Maintena... | |
<|file_name|>test_video.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Test for Video Xmodule functional logic.
These test data read from xml, not from mongo.
We have a ModuleStoreTestCase class defined in
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py. You ... | |
<|file_name|>mydict2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 文档测试
class Dict(dict):
'''
Simple dict but also support access as x.y style
>>> d1 = Dict()
>>> d1['x'] = 100
>>> d1.x
100
>>> d1.y = 200
>>> d1['y']
200
>>> d2 = Dict(a=1, b=2, c='3')
... | |
<|file_name|>webinterface_handler_wsgi.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011, 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by t... | if path.startswith(CFG_WEBDIR) and os.path.isfile(path):
return path
return None |
<|file_name|>ex14_word_query.cpp<|end_file_name|><|fim▁begin|>//
// Stroustrup - Programming Principles & Practice
//
// Chapter 21 Exercise 14
//
// Write a word query program that provides information about the text in a
// document. Use the text cleaner from ex13 to produce input.
//
#include <iostream>
#include <s... | |
<|file_name|>testing_public_spec.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC 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 {CompilerConfig, ResourceLoader} from '@angul... | })
class MyModule {
} |
<|file_name|>misc.rs<|end_file_name|><|fim▁begin|>use rules::Rule;
pub struct OwnLineBrace {
}
impl OwnLineBrace {
pub fn new() -> OwnLineBrace {
OwnLineBrace { }
}
}
impl Rule for OwnLineBrace {
fn verify(&self, filename: &str, content: &str) -> Vec<String> {
let mut errors = Vec::new();
let mut line_n... | }
if in_enum && line.to_uppercase() != line {
errors.push(format!("[{}:{}]Enum values must be entirely capitalized. Expected '{}' got '{}'", filename, line_number, line.to_uppercase(), line));
} |
<|file_name|>add_parameterized_profile.py<|end_file_name|><|fim▁begin|># IfcOpenShell - IFC toolkit and geometry engine
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
#
# This file is part of IfcOpenShell.
#<|fim▁hole|># IfcOpenShell is free software: you can redistribute it and/or modify
# it under the terms of... | |
<|file_name|>blend.rs<|end_file_name|><|fim▁begin|>extern crate noise;
use noise::{utils::*, Blend, Fbm, Perlin, RidgedMulti};
fn main() {
let perlin = Perlin::new();
let ridged = RidgedMulti::new();
let fbm = Fbm::new();
let blend = Blend::new(&perlin, &ridged, &fbm);
PlaneMapBuilder::new(&blend... | } |
<|file_name|>Languages.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (c) 2010 SubDownloader Developers - See COPYING - GPLv3
import languages.autodetect_lang as autodetect_lang
import re
import os.path
import logging
log = logging.getLogger("subdownloader.languages.Languages")
import __builtin__
_... | {'locale':'gl', 'ISO639': 'gl', 'SubLanguageID': 'glg', 'LanguageName': _('Galician')},
{'locale':'ka', 'ISO639': 'ka', 'SubLanguageID': 'geo', 'LanguageName': _('Georgian')},
{'locale':'de', 'ISO639': 'de', 'SubLanguageID': 'ger', 'LanguageName': _('German')},
{'locale':'el', 'ISO639': 'el', 'SubLanguageID': 'ell'... |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup
setup(<|fim▁hole|> name = 'ical_dict',
packages = ['ical_dict'],
version = '0.2',
description = 'A Python library to convert an .ics file into a Dictionary object.',
author = 'Jay Ravaliya',
author_email = 'jayra... | |
<|file_name|>customizations_test.go<|end_file_name|><|fim▁begin|>package cognitoidentity_test
import (
"testing"
<|fim▁hole|> "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/cognitoidentity"
)
var svc = cognitoidentity.New(unit.Session)
func TestUnsig... | |
<|file_name|>test_fields.py<|end_file_name|><|fim▁begin|>from rethinkengine.fields import *
import unittest2 as unittest
class PrimaryKeyFieldTestCase(unittest.TestCase):
def test_default(self):
f = ObjectIdField()
self.assertEqual(f._default, None)
with self.assertRaises(TypeError):
... | f = StringField(required=True) |
<|file_name|>libcore_io_Posix.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2011 The Android Open Source Project
*
* 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://w... | }
static jfieldID addressFid = env->GetFieldID(JniConstants::inetSocketAddressClass, "addr", "Ljava/net/InetAddress;"); |
<|file_name|>ServiceContentTags.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2019 Contentful GmbH
*
* 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... | */
interface ServiceContentTags {
@GET("/spaces/{space_id}/environments/{environment_id}/tags") |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// Package featuretests implements black-box tests for various Syncbase<|fim▁hole|><|fim▁end|> | // features.
package featuretests |
<|file_name|>chief_adapter.rs<|end_file_name|><|fim▁begin|>use Chief;
use confectioner::Confectioner;
pub struct ChiefAdapter {
confectioner: Confectioner
}
impl ChiefAdapter {
pub fn new() -> ChiefAdapter {
ChiefAdapter{ confectioner: Confectioner::new() }
}
}
impl Chief for ChiefAdapter {
f... | } |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2019 Philipp Weber
// Use of this source code is governed by the MIT license<|fim▁hole|>It supports all the RESTful service endpoints and parameters of API version 2.
*/
package hibpgo<|fim▁end|> | // which can be found in the repositorys LICENSE file.
/*
Package hibpgo provides access to the "Have I been Pwned?" API from Troy Hunt (https://haveibeenpwned.com). |
<|file_name|>CollectionReceiver.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2016 TomeOkin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.<|fim▁hole|> *
* Unless required by applicable law or agreed to in writing, software... | * You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0 |
<|file_name|>asn1_print.cpp<|end_file_name|><|fim▁begin|>/*
* (C) 2014,2015,2017 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/asn1_print.h>
#include <botan/bigint.h>
#include <botan/hex.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/as... | bool boolean; |
<|file_name|>util.py<|end_file_name|><|fim▁begin|># urllib3/util.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from base64 import b64encode
from collections i... | host = _host
if not port.isdigit(): |
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>/* TOOD: Implement for other kqueue based systems
*/
use {Errno, Result};
#[cfg(not(target_os = "netbsd"))]
use libc::{timespec, time_t, c_int, c_long, intptr_t, uintptr_t};
#[cfg(target_os = "netbsd")]
use libc::{timespec, time_t, c_long, intptr_t, uintptr_t, size_t... | EV_SYSFLAGS;
}
} |
<|file_name|>hash.rs<|end_file_name|><|fim▁begin|>#![feature(core)]
extern crate core;
#[cfg(test)]
mod tests {
use core::hash::SipHasher;
use core::hash::Hasher;
use core::hash::Hash;
// pub trait FixedSizeArray<T> {
// /// Converts the array to immutable slice
// fn as_slice(&self) -... | // }
//
// #[stable(feature = "rust1", since = "1.0.0")]
// impl<T:Copy> Clone for [T; $N] { |
<|file_name|>SolutionVerifier.java<|end_file_name|><|fim▁begin|>/*
* Licensed to GraphHopper GmbH under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* GraphHopper GmbH licenses this file to you under the A... | * limitations under the License.
*/ |
<|file_name|>ModuleAutoTesterUtil.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
'''
Mepinta
Copyright (c) 2011-2012, Joaquin G. Duo
This file is part of Mepinta.
Mepinta 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 Soft... | ''' |
<|file_name|>native.rs<|end_file_name|><|fim▁begin|>use std::fs::File;
use std::io;
use std::os::unix::fs::MetadataExt;
use std::os::unix::io::AsRawFd;
use nix::errno::Errno;
use crate::util::io::io_err;
mod sys {
use nix::libc::c_int;
<|fim▁hole|> #[link(name = "fallocate")]
extern "C" {
pub fn n... | |
<|file_name|>test_log_entries.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import pytest
... | ctx = Context.from_event(event)
order = ctx.get("order")
n_log_entries = ctx.log_entry_queryset.count() |
<|file_name|>custom-fields-edit-directive.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* @ngdoc directive
* @name GO.Core.CustomFields.goCustomFieldsEdit
*
* @description
* Prints custom fields form fieldsets.
*
*
* @param {string} ngModel The customFields model property of the model the customFields b... | * @param {string} serverModel The custom fields server model. |
<|file_name|>test_agents.py<|end_file_name|><|fim▁begin|># Copyright 2012 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/licenses/LICENSE... | 'md5hash': 'add6bb58e139be103324d04d82d8f545',
'agent_id': 1},
{'hypervisor': 'kvm', 'os': 'linux',
'architecture': 'x86', |
<|file_name|>test-amp-vk.js<|end_file_name|><|fim▁begin|>/**
* Copyright 2017 The AMP HTML 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:/... | return createAmpVkElement(params).should.eventually.be.rejectedWith(
/The data-api-id attribute is required for/); |
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|><|fim▁hole|> 400: "Bad request sent to search API ({0})",
401: "Incorrect API Key ({0})",
403: "Correct API but request refused ({0})",
404: "Bad request sent to search API ({0})"}
class SearchException(Exception):
"""
... | # TODO When raising an exception pass a lambda function, the function being the module/path/name thing
ERROR = {'default': "Unknown engine error ({0})", |
<|file_name|>ingress.go<|end_file_name|><|fim▁begin|>/*
Copyright 2017 The Kubernetes 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
Unless... | // This file was automatically generated by lister-gen
|
<|file_name|>instr_vdivpd.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
use ::test::run_test;
#[test]
fn vdivpd_1() {
run_test(&Instruct... | |
<|file_name|>ml_tests.py<|end_file_name|><|fim▁begin|>from sklearn import preprocessing
import numpy as np
X = np.array([[ 1., -1., 2.],
[ 2., 0., 0.],
[ 2., 0., 0.],<|fim▁hole|>
X_scaled = preprocessing.scale(X)
print X_scaled<|fim▁end|> | [ 0., 1., -1.]])
print X |
<|file_name|>S11.13.2_A7.6_T2.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Compound Assignment Operator evaluates its operands from left to right.
description: >
The left-hand side expres... | |
<|file_name|>EditDinnerPresenter.java<|end_file_name|><|fim▁begin|>package biz.golek.whattodofordinner.business.contract.presenters;
import biz.golek.whattodofordinner.business.contract.entities.Dinner;
/**
* Created by Bartosz Gołek on 2016-02-10.<|fim▁hole|>public interface EditDinnerPresenter {
void Show(Dinn... | */ |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 ~ 2018, Alex Stocks.
//
// 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... | // // codec.ReadRequestBody(argv.Interface()) // rpcCodec.ReadRequestBody
// // // func (c *rpcCodec) ReadRequestBody(b interface{}) error {
// // // return c.codec.ReadBody(b)
// // // // func (c *serverCodec) ReadBody(x interface{}) error { |
<|file_name|>instr_stos.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
use ::test::run_test;
#[test]
fn stos_1() {
run_test(&Instruction ... |
#[test] |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = {<|fim▁hole|>};<|fim▁end|> | env: 'test' |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>from pathlib import PosixPath
import pytest
from rpmlint.cli import process_lint_args
from rpmlint.config import Config
from rpmlint.lint import Lint
@pytest.mark.parametrize('test_arguments', [['-c', 'rpmlint/configs/thisdoesntexist.toml']])
def test_parsing_non... | # Verify that all scoring keys are a known checks |
<|file_name|>main_test.go<|end_file_name|><|fim▁begin|>package main
import "testing"
func Test_isSameStack(t *testing.T) {
type args struct {
archiveStackID string
currentStackID string
}
tests := []struct {
name string
args args
want bool
}{
{
"Going from empty to iOS",
args{archiveStackID: "",... | |
<|file_name|>wavpack.py<|end_file_name|><|fim▁begin|># A WavPack reader/tagger
#
# Copyright 2006 Joe Wreschnig <piman@sacredchao.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import os
import inspect
import vcr
def build_path(function):<|fim▁hole|> function.__name__ + '.yml')
vcr = vcr.config.VCR(
func_path_generator=build_path,
cassette_library_dir='tests/cassettes',
match_on=['uri', 'method'],
decode_co... | return os.path.join(os.path.dirname(inspect.getfile(function)),
'cassettes',
function.__module__.split('.')[1], |
<|file_name|>0030_auto_20170707_1727.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-07 17:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0029_au... | ),
] |
<|file_name|>drivertest_celery.py<|end_file_name|><|fim▁begin|>resource_id = "celery-1"
_install_script = """
[ { "id": "celery-1",
"key": {"name": "Celery", "version": "2.3"},
"config_port": {
"password": "engage_129",
"username": "engage_celery",
"vhost": "engage_celery_vhost"
},
"... | |
<|file_name|>preview.rs<|end_file_name|><|fim▁begin|>// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use crate::{
card::CardQueue,
config::SchedulerVersion,
prelude::*,
scheduler::states::{CardState, IntervalKind, PreviewS... | // the exit state should have a 0 second interval, which will show up as (end) |
<|file_name|>install.rs<|end_file_name|><|fim▁begin|>use command_prelude::*;<|fim▁hole|>use cargo::util::ToUrl;
pub fn cli() -> App {
subcommand("install")
.about("Install a Rust binary")
.arg(Arg::with_name("crate").empty_values(false).multiple(true))
.arg(
opt("version", "Spec... |
use cargo::core::{GitReference, SourceId};
use cargo::ops; |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export * from './types'
export * from './takeWhile' |
<|file_name|>toctree.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
sphinx.environment.managers.toctree
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Toctree manager for sphinx.environment.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
... | |
<|file_name|>SoundBySpeciePaginationController.java<|end_file_name|><|fim▁begin|>package net.indrix.arara.servlets.pagination;
import java.sql.SQLException;
import java.util.List;
import net.indrix.arara.dao.DatabaseDownException;
public class SoundBySpeciePaginationController extends
<|fim▁hole|> * Creat... | SoundPaginationController {
/**
|
<|file_name|>issue-2735-3.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<|fim▁hole|>// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.ap... | |
<|file_name|>EG_TextAutofit.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Baliance. All rights reserved.
//
// DO NOT EDIT: generated by gooxml ECMA-376 generator
//
// Use of this source code is governed by the terms of the Affero GNU General
// Public License version 3.0 as published by the Free Software Foundati... | |
<|file_name|>issue-33187.rs<|end_file_name|><|fim▁begin|>// run-pass
// ignore-compare-mode-chalk
struct Foo<A: Repr>(<A as Repr>::Data);
impl<A> Copy for Foo<A> where <A as Repr>::Data: Copy { }
impl<A> Clone for Foo<A> where <A as Repr>::Data: Clone {
fn clone(&self) -> Self { Foo(self.0.clone()) }
}
<|fim▁hole|... | trait Repr {
type Data;
}
|
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack import *
class Vasp(MakefilePackage):
"""... | depends_on('qd', when='%nvhpc')
conflicts('%gcc@:8', msg='GFortran before 9.x does not support all features needed to build VASP')
conflicts('+vaspsol', when='+cuda', msg='+vaspsol only available for CPU') |
<|file_name|>mark.js<|end_file_name|><|fim▁begin|>/*!***************************************************
* mark.js v8.7.0
* https://github.com/julmot/mark.js
* Copyright (c) 2014–2017, Julian Motz
* Released under the MIT license https://git.io/vwTVl
*****************************************************/
"u... | if (ua.indexOf("MSIE") > -1 || ua.indexOf("Trident") > -1) {
this.ie = true;
} |
<|file_name|>snapshot.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
use std::collections::HashMap;
use std::fmt;
use std::hash;
use std::iter::Iterator;
use std::path::{Path, PathBuf};
use std::sync::... | fn from(s: Snapshot) -> Self {
Self::new(s.digest, s.tree)
} |
<|file_name|>slick.core.js<|end_file_name|><|fim▁begin|>/***
* Contains core SlickGrid classes.
* @module Core
* @namespace Slick
*/
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"Event": Event,
"EventData": EventData,
"EventHandler": EventHandler,
"Range... | };
this.getTreeColumns = function () {
return treeColumns; |
<|file_name|>Teacher.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.hoang.fu;
/**
*
* @author hoangpt
*/
public class Teacher extend... | |
<|file_name|>AnimationState.py<|end_file_name|><|fim▁begin|>#
# The Multiverse Platform is made available under the MIT License.
#
# Copyright (c) 2012 The Multiverse Foundation
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# file... | # Property Setters
# |
<|file_name|>binance-batch-orders.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
import sys
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
import ccxt # noqa: E402
exchange = ccxt.binance({
"apiKey": "YOUR_API_KEY",
... | "quantity": float(0.005)
}
] |
<|file_name|>resources.pb.cc<|end_file_name|><|fim▁begin|>// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_serving/resources/resources.proto
#include "tensorflow_serving/resources/resources.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf... | if (from.kind().size() > 0) {
kind_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.kind_);
} |
<|file_name|>TypeCastingException.java<|end_file_name|><|fim▁begin|>/***************************************************************************
* Copyright (C) 2011-2015 by Fabrizio Montesi <famontesi@gmail.com> *
* *
* This program is ... | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
<|file_name|>ar.js<|end_file_name|><|fim▁begin|>/*!
* froala_editor v3.1.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2020 Froala Labs
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('... | 'Manage Images': "\u0625\u062F\u0627\u0631\u0629 \u0627\u0644\u0635\u0648\u0631",
'Loading': "\u062A\u062D\u0645\u064A\u0644",
'Deleting': "\u062D\u0630\u0641", |
<|file_name|>plain.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from behave.formatter.base import Formatter
class PlainFormatter(Formatter):
"""
Provides a simple plain formatter without coloring/formatting.
In addition, multi-line text and tables are not shown in output (SAD).
"""
nam... | |
<|file_name|>scheduler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-02-07 17:05:11
import itertools
import json
import logging
import os
import time
from collecti... | self._cnt['5m_time'].event((task['project'], 'process_time'),
task['track']['process'].get('time'))
self.projects[task['project']].active_tasks.appendleft((time.time(), task)) |
<|file_name|>executer.rs<|end_file_name|><|fim▁begin|>use std::error;
use std::process;
use crate::command::error::CommandError;
use crate::config;
use crate::output;
<|fim▁hole|> config: &'c config::command::ParamsConfig,
}
impl<'c> Executer<'c> {
pub fn from_config(config: &'c config::command::ParamsConfig) ... | use super::super::Executer as ParamsExecuter;
use super::{Arguments, Program};
pub struct Executer<'c> { |
<|file_name|>bin_spike.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
"""
import numpy as np
from numpy import ma
def bin_spike(x, l):
"""
l is the number of points used for comparison, thus l=2 means th... |
N = len(x) |
<|file_name|>verse_scanner.py<|end_file_name|><|fim▁begin|>"""Parent class and utility class for producing a scansion pattern for a line of Latin verse.
Some useful methods
* Perform a conservative i to j transformation
* Performs elisions
* Accents vowels by position
* Breaks the line into a list of syllables by call... | if raw_scansion.startswith(self.constants.SPONDEE + self.constants.UNSTRESSED):
new_scansion = list(
self.constants.SPONDEE + self.constants.SPONDEE + raw_scansion[4:]
) |
<|file_name|>resource_scale_factors.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 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.
"""Presubmit script for Chromium browser resources.
See http://dev.chromium.org/deve... | Returns: |
<|file_name|>treeplot.js<|end_file_name|><|fim▁begin|>var margin = {top: 0, right: 0, bottom: 0, left: 130},
width = 1500 - margin.right - margin.left,
height = 470 - margin.top - margin.bottom;
var i = 0,
duration = 750,
root;
var tree = d3.layout.tree()
.size([height, width]);
var diagonal = d3... | nodeUpdate.select("circle")
.attr("r", 4.5)
.style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; });
|
<|file_name|>graph_loader.py<|end_file_name|><|fim▁begin|>"""
Provided code for Application portion of Module 1
Imports physics citation graph
"""
###################################
# Code for loading citation graph
CITATION_URL = "phys-cite_graph.txt"
def load_graph(graph_url):
"""
Function that loads a g... | for a text representation of the graph
|
<|file_name|>elasticsearch_new.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2014 Michael Malocha <michael@knockrentals.com>
#
# Expanded from the work by Julien Duponchelle <julien@duponchelle.info>.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file ... | uniq_key = self.settings.get('ELASTICSEARCH_UNIQ_KEY') |
<|file_name|>ShowRoute.js<|end_file_name|><|fim▁begin|>import React from 'react';
import Helmet from 'react-helmet';
import { Route } from '../../core/router';
import { Model as Waste } from '../../entities/Waste';
import { Deferred } from '../../util/utils';
import NavLink from '../../components/NavLink';
import Progr... | fetch({ params }) {
this.companyFid = params.fid;
|
<|file_name|>set_version.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
# -*- coding: iso-8859-1 -*-
# WebKOM - a web based LysKOM client
#
# Copyright (C) 2000 by Peter Åstrand
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as... | from webkom_constants import VERSION
|
<|file_name|>process.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# process.py
# This script consists of all core functions.
# Author: Orhan Odabasi (0rh.odabasi[at]gmail.com)
import locale
import csv
import os
from PIL import Image
import re
from collections import Counter
def scanDir(path):
# scan th... | # file size [2] |
<|file_name|>cooperation.js<|end_file_name|><|fim▁begin|>/**
* Created by cin on 1/18/14.
*/
/**
* Created by cin on 1/18/14.
*/
var _ = require('underscore'),
chance = new (require('chance'))(),
syBookshelf = require('./base'),
User = require('./user'),
CoStatus = require('./co-status'),
UserCooperation = req... | return self.data('numPictures', d[0]["count(`id`)"]); |
<|file_name|>country_info.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
# all country info
import os, json, frappe
from frappe.utils.momentjs import get_all_timezones
def get_country_info(country=None):
data = get_all()
data = frappe... | |
<|file_name|>blockchain.js<|end_file_name|><|fim▁begin|>/* globals Promise:true */
var _ = require('lodash')
var EventEmitter = require('events').EventEmitter
var inherits = require('util').inherits
var LRU = require('lru-cache')
var Promise = require('bluebird')
var Snapshot = require('./snapshot')
var errors = requ... | self.on('syncStart', function () { self._isSyncing = true })
self.on('syncStop', function () { self._isSyncing = false })
} |
<|file_name|>black-menu.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'black-menu-component',<|fim▁hole|> styleUrls: ['./black-menu.component.scss']
})
export class BlackMenuComponent implements OnInit {
@Inp... | templateUrl: './black-menu.component.html', |
<|file_name|>test_nbpy.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
from unittest import TestCase
from . import formattest
from .. import nbpy
from .nbexamples import nb0, nb0_py
class TestPy(formattest.NBFormatTest, TestCase):
nb0_ref = nb0_py
ext = 'py'
mod = nbpy
ignored_keys = ['coll... | if isinstance(da, basestring) and isinstance(db, basestring):
# pyfile is not sensitive to preserving leading/trailing
# newlines in blocks through roundtrip |
<|file_name|>test_basic.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base
from misc import GetPageInfo
from models import PageIdentifier
from category import GetSubcategoryInfos
from revisions import GetCurrentContent, GetPageRevisionInfos
from meta import Ge... | rev_list = get_revs() |
<|file_name|>test_bounce.py<|end_file_name|><|fim▁begin|># Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""Test cases for bounce message generation
"""
from twisted.trial import unittest
from twisted.mail import bounce
import cStringIO<|fim▁hole|> """
testcases for bounce message gene... | import email.message
import email.parser
class BounceTests(unittest.TestCase): |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#-------------------------------------------------------------------------------
# Name: Main.py
# Purpose: This script creates chainages from a single or mutile line
#
# Author: smithc5
#
# Created: 10/02/2015
# Copyright: (c) smithc5 2015
# Lic... | |
<|file_name|>flowfield.js<|end_file_name|><|fim▁begin|>/*
* Background sketch
* Author: Uriel Sade
* Date: Feb. 22, 2017
*/
var canvas;
var time_x, time_y, time_z, time_inc;
var field = [];
var particles = [];
var rows, cols;
var scl = 20;
function setup() {
canvas = createCanvas(windowWidth, windowHeight);... | canvas.style('z-value', '-1');
canvas.style('opacity', '0.99'); |
<|file_name|>mitkAccessByItkTest.cpp<|end_file_name|><|fim▁begin|>/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is dis... | TestVectorImageType(float, 2) break;
case Float3D:
TestVectorImageType(float, 3) break; |
<|file_name|>TestCase_Web_Baspd.py<|end_file_name|><|fim▁begin|>#coding=utf-8
#author='Shichao-Dong'
import unittest
import Web_Method_Baspd
import Public_Base_Method
import requests
import time
import HTMLTestRunner
class ST_Bas_pd(unittest.TestCase):
u'商品功能性测试'
def setUp(self):
global cookie
... | self.assertTrue('r.status_code==200',msg='获取停售商品失败')
|
<|file_name|>description.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code,... | # You should have received a copy of the GNU General Public License |
<|file_name|>viewImpl.ts<|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 information.
*---------... | this.linesContent.setWidth(1000000); |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/// bedrock/main.cpp
/// =================
/// Process entry point for Bedrock server.
///
#include <dlfcn.h>
#include <iostream>
#include <signal.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <bedrockVersion.h>
#include <BedrockServer.h>
#include <Bedro... | if(!lib) { |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from tablelist import *<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#pylint: disable=C0301, C0103, W0212, W0401
<|fim▁hole|> :platform: Unix
:synopsis: RADICAL-Pilot is a distributed Pilot-Job framework.
.. moduleauthor:: Ole Weidner <ole.weidner@rutgers.edu>
"""
__copyright__ = "Copyright 2013-2014, http://radical.rutgers.ed... | """
.. module:: pilot |
<|file_name|>_policy_tracked_resources_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license info... | """
|
<|file_name|>test.js<|end_file_name|><|fim▁begin|>'use strict';
var spawn = require('child_process').spawn;
var font2svg = require('../');
var fs = require('graceful-fs');
var noop = require('nop');
var rimraf = require('rimraf');
var test = require('tape');
var xml2js = require('xml2js');
var parseXML = xml2js.pars... | cmd([fontPath, '--include', 'abc'])
.stdout.on('data', function(data) {
t.ok(/<\/svg>/.test(data), 'should accept --include flag.'); |
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#<|fim▁hole|>
class RIlluminahumanmethylation450kannoIlmn12Hg19(RPackage):
"""Annotation for Illumina's 450k methy... | # SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import * |
<|file_name|>test_flake8.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
from __future__ import unicode_literals
import unittest
import os
import sys
<|fim▁hole|> unicode = str
if sys.version_info[:2] == (2, 6):
# Monkeypatch to make tests work on 2.6
def assert_less(first, second, msg=None):
... | from flake8.api import legacy as engine
if sys.version_info[0] == 3: |
<|file_name|>flattened_product.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code... | :type id: str
:param type: Resource Type
:type type: str
:param tags: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.