prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>build.js<|end_file_name|><|fim▁begin|>"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const config_1 = require("../models/config");
const version_1 = require("../upgrade/version");
const common_tags_1 = require("common-tags");
const Command = require('../ember-cli/lib/models/co... | aliases: ['v'], |
<|file_name|>Mon_Wash_3_temp.py<|end_file_name|><|fim▁begin|>import sys
# where RobotControl.py, etc lives
sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary')
from RobotControl import *
#################################
### Define Deck Layout
#################################
deck="""\
DW96W DW96W DW... | # eventually row in 0,1,2,3 |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>// Break out the application running from the configuration definition to
// assist with testing.
require(['config'], function() {
// Kick off the application.
require(['app', 'router'], function(app, Router) {
// Define your master router on the application nam... | });
}); |
<|file_name|>UIManager3x.java<|end_file_name|><|fim▁begin|>package org.emdev.ui.uimanager;
<|fim▁hole|>import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.content.ComponentName;
import android.content.Context;
import android.view.View;
import android.view.Window;
i... | import android.annotation.TargetApi;
import android.app.Activity; |
<|file_name|>clipboards.py<|end_file_name|><|fim▁begin|>import sys
import subprocess
from .exceptions import PyperclipException
EXCEPT_MSG = """
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit https://pyperclip.readthedocs.org """
PY2 = sys.version_inf... | |
<|file_name|>GenModel.java<|end_file_name|><|fim▁begin|>package com.baicai.util.help;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.beetl.core.Configuration;
<|fim▁hole|>/**
*
* @Description: 使用beetl来生成model类... | import org.beetl.core.GroupTemplate;
import org.beetl.core.Template;
import org.beetl.core.resource.FileResourceLoader;
|
<|file_name|>client.py<|end_file_name|><|fim▁begin|>"""
A simple client to query a TensorFlow Serving instance.
Example:
$ python client.py \
--images IMG_0932_sm.jpg \
--num_results 10 \
--model_name inception \
--host localhost \
--port 9000 \
--timeout 10
Author: Grant Van Horn
"""
from __future__ import absolute... | |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 NEC Corporation
#
# 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
#
# ... | |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>import os
from copy import deepcopy
bids_schema = {
# BIDS identification bits
'modality': {
'type': 'string',
'required': True
},
'subject_id': {
'type': 'string',
'required': True
},
'session_id': {'type': '... | },
'icvs_gm': { |
<|file_name|>pathvector2.cc<|end_file_name|><|fim▁begin|>/* A RapidNet application. Generated by RapidNet compiler. */
#include "pathvector2.h"
#include <cstdlib>
#include "ns3/nstime.h"
#include "ns3/simulator.h"
#include "ns3/type-ids.h"
#include "ns3/rapidnet-types.h"
#include "ns3/rapidnet-utils.h"
#include "ns3/a... | void |
<|file_name|>logistic_regression.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7
# -*- coding:utf-8 -*-
import sklearn.datasets as skds
import numpy as np
import random
import theano.tensor as T
import theano
import matplotlib.pyplot as plt
import math
#I don't know what the jesus 'housing.data' means so I u... | X = T.dscalar('X') |
<|file_name|>test_quantile.py<|end_file_name|><|fim▁begin|>import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, Index
import pandas._testing as tm
@pytest.mark.parametrize(
"interpolation", ["linear", "lower", "higher", "nearest", "midpoint"]
)
@pytest.mark.parametrize(
"a_vals,... | (["a", "b", "b", np.nan], range(4), ["a", "b"], [0, 1.5]), |
<|file_name|>BlockFlag.java<|end_file_name|><|fim▁begin|>package mcid.anubisset.letsmodreboot.block;
import mcid.anubisset.letsmodreboot.creativetab.CreativeTabLMRB;<|fim▁hole|> * Created by Luke on 30/08/2014.
*/
public class BlockFlag extends BlockLMRB
{
public BlockFlag()
{
super();
this.se... |
/** |
<|file_name|>linkedList.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.
*-------... | }
return element;
}
}; |
<|file_name|>translateFromPosition.js<|end_file_name|><|fim▁begin|>import { SplashEffect } from "./effect.js";
import { Linear } from "../interpolation.js";
export class TranslateFromPosition extends SplashEffect {
constructor(element, options) {
super(element);
options = options || {};
this.x = options.x || ... | this._set(
this.interpolation.in(value * -1 + 1) * this.x,
this.interpolation.in(value * -1 + 1) * this.y
); |
<|file_name|>Todo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import vim
import itertools as it
from orgmode._vim import echom, ORGMODE, apply_count, repeat, realign_tags
from orgmode import settings
from orgmode.liborgmode.base import Direction
from orgmode.menu import Submenu, ActionEntry
from orgmode.k... | |
<|file_name|>uncompress.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2004 Conectiva, Inc.
#
# Written by Gustavo Niemeyer <niemeyer@conectiva.com>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager is free software; you can redistribute it and/or
# modify it under the terms of the GNU Genera... | if handler.query(localpath):
return handler
getHandler = classmethod(getHandler) |
<|file_name|>wordfreq-morph.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Скрипт извлекает слова из текстового файла и сортирует их по частоте.
# С помощью модуля pymorphy2 можно привести слова к начальной форме (единственное число, именительный падеж).
# Нужен pymorphy2 и русскоязыч... | |
<|file_name|>Colleague1.java<|end_file_name|><|fim▁begin|>package gof.behaviour.mediator;
public class Colleague1 extends Colleague {
public Colleague1(Mediator m){
super(m);
}
@Override
public void action() {
<|fim▁hole|>
}<|fim▁end|> | System.out.println("Colleague1");
}
|
<|file_name|>Taowa.py<|end_file_name|><|fim▁begin|>user_input = raw_input()
class Taowa:
def __init__(self):
return
def setSize(self, m1, m2):
self.width = m1
self.height = m2
self.area = m1 * m2
class Sorter:
def __init__(self):
self.taowas = []
self.lastW... |
for idx in range(l):
m1 = self.arr[idx*2] |
<|file_name|>webjournal_tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License ... | issue2 = '07/2008' |
<|file_name|>receiver.js<|end_file_name|><|fim▁begin|>let connectionIdx = 0;
let messageIdx = 0;
function addConnection(connection) {
connection.connectionId = ++connectionIdx;
addMessage('New connection #' + connectionIdx);
connection.addEventListener('message', function(event) {
messageIdx++;
const da... | document.querySelector("#message-list").appendChild(listItem);
};
function maybeSetFruit(message) { |
<|file_name|>acetic.rs<|end_file_name|><|fim▁begin|>#![feature(env)]
#![feature(core)]
#![feature(os)]
extern crate acetic;
#[macro_use] extern crate log;
use std::env;
fn main() {
for arg in env::args().skip(1) {
debug!("Parsing: {:?}", arg);
let krate = acetic::parse_crate(&arg.into_string().unw... | acetic::compile_crate(krate)
}
} |
<|file_name|>p0016.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
<|fim▁hole|>def sum_digits(n):
return sum(int(d) for d in str(n))
print(sum_digits(2**1000))<|fim▁end|> | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# pkpgcounter : a generic Page Description Language parser
#
# (c) 2003-2009 Jerome Alet <alet@librelogiciel.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gen... | lang = mofile.split(os.sep)[1]
directory = os.sep.join(["share", "locale", lang, "LC_MESSAGES"]) |
<|file_name|>localip.js<|end_file_name|><|fim▁begin|>"use strict";
var dns = require('dns'),
os = require('os');
// Because localtunnel doesn't work reliably enough,
// hack the config to point at the local ip.
module.exports = function(ctx, done){
if(ctx.environment !== 'development'){<|fim▁hole|> ret... | // Only run this hack in dev for real. |
<|file_name|>cycle-projection-based-on-where-clause.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
/... | where T : Trait,
T : Add<T::Item>
//~^ ERROR unsupported cyclic reference between types/traits detected |
<|file_name|>modal.spec.ts<|end_file_name|><|fim▁begin|>import {CommonModule} from '@angular/common';
import {Component, Injectable, Injector, NgModule, OnDestroy, ViewChild} from '@angular/core';
import {ComponentFixture, fakeAsync, TestBed, tick} from '@angular/core/testing';
import {NgbModalConfig} from './modal-con... | expect(fixture.nativeElement).toHaveModal();
|
<|file_name|>incremental.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/. */
use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFE... | get_font.font_family, get_font.font_style, get_font.font_variant, get_font.font_weight,
get_font.font_size, get_font.font_stretch,
get_inheritedbox.direction, get_inheritedbox.writing_mode, |
<|file_name|>palindromes_test.py<|end_file_name|><|fim▁begin|>import unittest
from palindromes import is_palindrome
cases = (
('lsdkjfskf', False),
('radar', True),
('racecar', True),
)
<|fim▁hole|> for word, expectation in cases:
self.assertEqual(is_palindrome(word), expectation)<|fim... | class TestCorrectness(unittest.TestCase):
def test_identifies_palindromes(self): |
<|file_name|>GruposCallback.java<|end_file_name|><|fim▁begin|>package br.ufpe.sabertecnologias.acervoapp.ui.callbacks;
import java.util.ArrayList;
import br.ufpe.sabertecnologias.acervoapp.modelo.dados.Grupo;
/**<|fim▁hole|> * Created by joaotrindade on 25/10/16.
*/
public interface GruposCallback{
public void ... | |
<|file_name|>ignore-scripts.js<|end_file_name|><|fim▁begin|>var test = require("tap").test
var npm = require.resolve("../../bin/npm-cli.js")
var spawn = require("child_process").spawn
var node = process.execPath
// ignore-scripts/package.json has scripts that always exit with non-zero error
// codes. The "install" sc... | HOME: process.env.HOME,
Path: process.env.PATH, |
<|file_name|>capabilities_test.go<|end_file_name|><|fim▁begin|>package agouti_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/sclevine/agouti"
)
var _ = Describe("Capabilities", func() {
var capabilities Capabilities
BeforeEach(func() {
capabilities = NewCapabilities("firstEn... | "firstEnabled": true,
"secondEnabled": true,
"proxy": {
"proxyType": "manual", |
<|file_name|>const.py<|end_file_name|><|fim▁begin|>"""Provides the constants needed for component."""
from typing import Final
SUPPORT_ALARM_ARM_HOME: Final = 1
SUPPORT_ALARM_ARM_AWAY: Final = 2
SUPPORT_ALARM_ARM_NIGHT: Final = 4
SUPPORT_ALARM_TRIGGER: Final = 8<|fim▁hole|>CONDITION_TRIGGERED: Final = "is_triggered"
... | SUPPORT_ALARM_ARM_CUSTOM_BYPASS: Final = 16
SUPPORT_ALARM_ARM_VACATION: Final = 32
|
<|file_name|>SwtFileFolderMenu.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015 Namihiko Matsumura (https://github.com/n-i-e/)
*
* 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
... | gl_compositeToolBar.verticalSpacing = 0;
gl_compositeToolBar.marginWidth = 0;
|
<|file_name|>TrendsWrapperMixin.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2011 France Telecom R&D Beijing Co., Ltd 北京法国电信研发中心有限公司
*
<|fim▁hole|> *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is di... | * 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
|
<|file_name|>vehicle-details-general.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidatorFn, FormControl } from '@angular/forms';
import { SharedValidatorsService } fro... | this.subscriptions.push(onIsDismantlingReadyAndSurveyRoundsChange_);
} |
<|file_name|>jqt.activityIndicator.js<|end_file_name|><|fim▁begin|>/*
_/ _/_/ _/_/_/_/_/ _/
_/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/
_/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/... | |
<|file_name|>matching.py<|end_file_name|><|fim▁begin|>"""
********
Matching
********
"""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
# Copyright (C) 2011 by
# Nicholas Mancus... |
# Compute delta1: the minumum value of any vertex dual.
if not maxcardinality:
deltatype = 1 |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os
CSRF_ENABLED = True
ENV = os.environ.get('ENVIRONMENT', 'dev')
MODEL_HASH = os.environ.get('MODEL_HASH')
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
ROOT_PATH = BASE_DIR = os.path.join(os.path.dirname(__file__), '..')
SECRET_KEY = os.environ... | if ENV == 'dev':
PORT = 7070 |
<|file_name|>search_filter.py<|end_file_name|><|fim▁begin|>from zou.app.models.search_filter import SearchFilter
from .base import BaseModelResource, BaseModelsResource
class SearchFiltersResource(BaseModelsResource):<|fim▁hole|>class SearchFilterResource(BaseModelResource):
def __init__(self):
BaseModel... | def __init__(self):
BaseModelsResource.__init__(self, SearchFilter)
|
<|file_name|>django_wsgi_production.py<|end_file_name|><|fim▁begin|>import os, sys
PATH = os.path.join(os.path.dirname(__file__), '..')
sys.path += [
os.path.join(PATH, 'project/apps'),
os.path.join(PATH, 'project'),
os.path.join(PATH, '..'), <|fim▁hole|><|fim▁end|> | PATH]
os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings.production'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler() |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>"""
Forms and validation code for user registration.
"""
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from registration.models import RegistrationProfile
# I put this on all required f... | raise forms.ValidationError(_(u'This username is already taken. Please choose another.'))
def clean(self): |
<|file_name|>keys.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
__all__ = (
'Key',
'Keys',
)
class Key(object):
def __init__(self, name):
#: Descriptive way of writing keys in configuration files. e.g. <C-A>
#: for ``Control-A``.
self.name = name
de... | ControlB = Key('<C-B>')
ControlC = Key('<C-C>')
ControlD = Key('<C-D>')
ControlE = Key('<C-E>') |
<|file_name|>DataFrame.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2013 Jad
*
* This file is part of Jad.
* Jad is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License,... |
if (rows.size() < 1){
return false;
} |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
impl super::OBR {
#[doc = r" Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
}
#[doc ... | }; |
<|file_name|>ScrKeyboard.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2010 TUBITAK/UEKAE
#
# 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 Foundation; either version 2 of t... |
def execute(self):
ctx.interface.informationWindow.hide() |
<|file_name|>path_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Hugo 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.apache.org/li... |
for _, test := range tests { |
<|file_name|>ansible.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
import bottle
import settings
from controller import admin as admin_controller
from controller import email as email_controller
<|fim▁hole|>app.route(settings.BASEPATH + '/', 'GET', admin_controller.index)
app.route(
settings.BASEPATH + '/task... | app = application = bottle.Bottle()
# Base url for regular users
app.route(settings.BASEPATH, 'GET', admin_controller.index) |
<|file_name|>get_comments.py<|end_file_name|><|fim▁begin|>import click
from arrow.cli import pass_context, json_loads<|fim▁hole|>
@click.command('get_comments')
@click.argument("feature_id", type=str)
@click.option(
"--organism",
help="Organism Common Name",
type=str
)
@click.option(
"--sequence",
h... | from arrow.decorators import custom_exception, dict_output
|
<|file_name|>regular_expression_matching.py<|end_file_name|><|fim▁begin|>class R:
def __init__(self, c):
self.c = c
self.is_star = False
def match(self, c):
return self.c == '.' or self.c == c
class Solution(object):
def isMatch(self, s, p):
"""
:type s: str
... | |
<|file_name|>libraries.processor.ts<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////////////////////////////
/// NOTE: This file is also used in the Script Lab Samples project. ///
/// Please be sure that any changes that you ma... | |
<|file_name|>lexer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Collection of raw lexer test cases and class constructor.
"""
from __future__ import unicode_literals
import textwrap
swapquotes = {
39: 34, 34: 39,
# note the follow are interim error messages
96: 39,
}
<|fim▁hole|># from htt... | # The structure and some test cases are taken |
<|file_name|>system_interceptors.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 Google 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 License at
//
// http://www.ap... | |
<|file_name|>test_unittest.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
test.
"""
import torndb
import unittest<|fim▁hole|>
class PrimesTestCase(unittest.TestCase):
"""Tests for `primes.py`."""
def test_is_five_prime(self):
""""""
self.assertTrue(case.is_prime(2), msg='断言出错'... |
from ..views import case |
<|file_name|>auth.go<|end_file_name|><|fim▁begin|>// Package auth handles user management: creation, deletion, and authentication.
package auth
import (
"encoding/json"
deis "github.com/deis/controller-sdk-go"
"github.com/deis/controller-sdk-go/api"
)
// Register a new user with the controller.
// If controller r... | if err != nil {
return err
}
|
<|file_name|>httpd.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Taboot - Client utility for performing deployments with Func.
# Copyright © 2009, Red Hat, Inc.
#
# 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
# t... | """TODO: Decide what to do with this file""" |
<|file_name|>FACEWrapper.java<|end_file_name|><|fim▁begin|>package com.openMap1.mapper.converters;
import java.util.Iterator;
import org.eclipse.emf.common.util.EList;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.openMap1.mapper.ElementDef;
import com.openMap... | Element tempEl = xout.XSLElement("template");
|
<|file_name|>tabnanny.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3
"""The Tab Nanny despises ambiguous indentation. She knows no mercy.
tabnanny -- Detection of ambiguous indentation
For the time being this module is intended to be called as a script.
However it is possible to import it into an ID... | |
<|file_name|>representation.go<|end_file_name|><|fim▁begin|>package rest
import (
"fmt"
"io"
"net/http"
"github.com/tliron/kutil/ard"
"github.com/tliron/kutil/js"
"github.com/tliron/prudence/platform"
)
//
// RepresentationFunc
//
type RepresentationFunc func(context *Context) error
func NewRepresentationFun... | ContentType: contentType_,
Language: NewLanguage(language), |
<|file_name|>test_character_sets.py<|end_file_name|><|fim▁begin|># Copyright 2015 F5 Networks Inc.
#
# 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... | from f5.bigip.tm.asm.policies.character_sets import Character_Sets |
<|file_name|>ComplexLine.py<|end_file_name|><|fim▁begin|>#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# This file is part of the E-Cell System
#
# Copyright (C) 1996-2016 Keio University
# Copyright (C) 2008-2016 RIKEN
# Copyright (C) 2005-2009 The Molecular Scie... | aSpecific = aDescriptor[ SD_SPECIFIC ] |
<|file_name|>AirshipsBlock.java<|end_file_name|><|fim▁begin|>package com.octagon.airships.block;
import com.octagon.airships.reference.Reference;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecra... | |
<|file_name|>Version.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2017-present Open Networking Foundation
*
* 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.... | public int hashCode() { |
<|file_name|>test_cron.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
from cron_status import *
class TestChangeDetection(unittest.TestCase):<|fim▁hole|> """Test if the change detection is operational."""
# Please note that status_history_list is backwards,
... | |
<|file_name|>cleanup.py<|end_file_name|><|fim▁begin|># Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
import time
from datetime import date, datetime, timedelta
from optparse import make_option
import openid.store.nonce
from dja... | while True:
email_ids = EmailAddress.objects.filter(**kwargs).values_list(
'pk')[:limit] |
<|file_name|>option.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|>suppliers.py<|end_file_name|><|fim▁begin|>from flask.ext.wtf import Form
from wtforms import IntegerField, StringField, FieldList
from wtforms.validators import DataRequired, Email, ValidationError
def word_length(limit=None, message=None):
message = message or 'Must not be more than %d words'
me... | |
<|file_name|>manage.js<|end_file_name|><|fim▁begin|>module.exports = require('../crud/list')({
view: 'users/manage',
model: require('../../models/user'),
sort: {
name: 1<|fim▁hole|>});<|fim▁end|> | } |
<|file_name|>strings.js<|end_file_name|><|fim▁begin|>define({
root:({
mode: "Mode",
saveToPortal: "Save to Portal",
saveToDisk: "Save To Disk",
title: "Title",
description: "Description",
tags: "Tags",
defineExtent: "Define Extent",
submit: "Submit",
pixelSize: "Pixel Size",
outputSpatialRefer... | errorPixelSize: "Error! No Imagery Layer visible on the map.",
layer: "Layer", |
<|file_name|>ln-CF.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
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gu... | |
<|file_name|>producertask.py<|end_file_name|><|fim▁begin|>"""
Copyright 2015-2018 IBM
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 requir... | |
<|file_name|>student.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = function(sequelize, DataTypes) {
var Student = sequelize.define('Student', {
name: DataTypes.STRING,
timeReq: DataTypes.INTEGER,
}, {
classMethods: {
associate: function() {
}
}
});
return Student;<|f... | |
<|file_name|>pass.hpp<|end_file_name|><|fim▁begin|>// Copyright © 2014-2016 Ryan Leckey, All Rights Reserved.
// Distributed under the MIT License
// See accompanying file LICENSE
#ifndef ARROW_PASS_H
#define ARROW_PASS_H
#include <memory>
#include <string>
#include "arrow/generator.hpp"
namespace arrow {
class P... | |
<|file_name|>overrides.py<|end_file_name|><|fim▁begin|>"""Implementation of __array_function__ overrides from NEP-18."""
import collections
import functools
import os
import textwrap
from numpy.core._multiarray_umath import (
add_docstring, implement_array_function, _get_implementing_args)
from numpy.compat._inspe... | implementation : function |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { combineReducers } from 'redux'
import auth from './auth'
import watt from './watt'
import locations from './locations'<|fim▁hole|> auth,
watt,
locations
})<|fim▁end|> |
export default combineReducers({ |
<|file_name|>model.rs<|end_file_name|><|fim▁begin|>// Copyright 2019-2020 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
... | return Err(StoreError::NoCapacity); |
<|file_name|>client.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google Inc.
#
# 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 ... | self._send_error_report(traceback.format_exc(),
http_context=http_context,
user=user) |
<|file_name|>CylinderMCNPX.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
MCNPX Model for Cylindrical RPM8
"""
import sys
sys.path.append('../MCNPTools/')
sys.path.append('../')
from MCNPMaterial import Materials
import subprocess
import math
import mctal
import numpy as np
import itertools
import os
clas... |
surfString += 'c ------------------------ Encasing Material -----------------------------\n' |
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from rest_framework import serializers
from . import models
class Invoice(serializers.ModelSerializer):
class Meta:
model = models.Invoice<|fim▁hole|><|fim▁end|> | fields = (
'id', 'name', 'additional_infos', 'owner',
'creation_date', 'update_date',
) |
<|file_name|>GlobalSystems.cpp<|end_file_name|><|fim▁begin|>#include "GlobalSystems.h"
namespace globalSystem {
WindowManagerGL window;
TimeData time;
MouseData mouse;
KeyPressData keys;
TextureManager textures;
ModelManager models;
DynamicFloatMap runtimeData;
RandomNumberG... | } |
<|file_name|>switch_subdesign.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""
import sys
import popupcad
import qt.QtCore as qc
import qt.QtGui as qg
if __name__=='__main__':
app = qg.... | |
<|file_name|>Tracer.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2012 - 2020 Splice Machine, Inc.
*
* This file is part of Splice Machine.
* Splice Machine is free software: you can redistribute it and/or modify it under the terms of the
* GNU Affero General Public License as published by the Free Software... | }
|
<|file_name|>BenchmarkTest05767.java<|end_file_name|><|fim▁begin|>/**
* OWASP Benchmark Project v1.1
*
* This file is part of the Open Web Application Security Project (OWASP)
* Benchmark Project. For details, please see
* <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>... | doPost(request, response);
}
|
<|file_name|>guestimateIBUTests.rs<|end_file_name|><|fim▁begin|>use functions::commonFunctions::imperialOrMetric;
use functions::guestimateIBU::{guestimateIBUData, totalIBUMaths, totalIBUFormatting};
#[test]
fn totalBUMathsImperialGBTest() {
let allInputs: guestimateIBUData = guestimateIBUData {
preBoilBri... | fn totalBUMathsImperialUSTest() {
let allInputs: guestimateIBUData = guestimateIBUData {
preBoilBrix: 20.0, |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from cl.api import views
from cl.audio import api_views as audio_views
from cl.people_db import api_views as judge_views
from cl.search import api_views as search_views
from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
router =... | name='deprecated_api'), |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var ErrorHandler = require('./error').errorHandler;
module.exports = exports = function(app) {
// The main page of the blog
app.get('/', function(req, res, next){
return res.render('index', {
title: 'Editor homepage'
});
}... | app.post('/newcomment', contentHandler.handleNewComment);
app.get("/post_not_found", contentHandler.displayPostNotFound);
|
<|file_name|>background.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2011 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.
var numPings = 0;
chrome.extension.onRequest.addListener(function(data) {
if (data != "ping"... | chrome.test.getConfig(function(config) {
var test_file_url = "http://localhost:PORT/files/extensions/test_file.html"
.replace(/PORT/, config.testServer.port);
|
<|file_name|>agents.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# 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.
"""
Image Grounded Conversations (IGC) Task.
See https://www.aclweb.... | 'text': text,
'image_id': image_id, |
<|file_name|>OpenstackSubnetWebResource.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015 Open Networking Laboratory
*
* 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://... |
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.POST; |
<|file_name|>dependency-plugin.js<|end_file_name|><|fim▁begin|>/**
* @plugin.js
* @App Options Dependency Manager Plugin JS
*
* @License: http://www.siteeditor.org/license
* @Contributing: http://www.siteeditor.org/contributing
*/
/*global siteEditor:true */
(function( exports, $ ){
var api = sedAp... | dependencyRender : function( id , fieldType , group ){
fieldType = _.isUndefined( fieldType ) || _.isEmpty( fieldType ) ? "control" : fieldType;
|
<|file_name|>firewalld.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Adam Miller (maxamillion@fedoraproject.org)
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publish... | is_enabled = get_rich_rule_enabled(zone, rich_rule)
msgs.append('Non-permanent operation')
if desired_state == "enabled": |
<|file_name|>OffsetDateTimeConverterTest.java<|end_file_name|><|fim▁begin|>/*
* MIT License
*
* Copyright 2017-2018 Sabre GLBL Inc.
*
* 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 wi... | boolean applicable = offsetDateTimeConverter.isApplicable(type, emptyMap()); |
<|file_name|>graphml.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2006 Tiago de Paula Peixoto <tiago@forked.de>
// Copyright (C) 2004,2009 The Trustees of Indiana University.
//
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt ... | BOOST_FOREACH(const ptree::value_type& attr, node.second) {
if (attr.first != "data") continue; |
<|file_name|>boss_moam.cpp<|end_file_name|><|fim▁begin|>/*
* This file is part of the OregonCore Project. See AUTHORS file for Copyright information
*
* 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... | |
<|file_name|>flag.go<|end_file_name|><|fim▁begin|>package cli
import (
"flag"
"fmt"
"io/ioutil"
"reflect"
"runtime"
"strconv"
"strings"
"syscall"
)
const defaultPlaceholder = "value"
// BashCompletionFlag enables bash-completion for all commands and subcommands
var BashCompletionFlag Flag = BoolFlag{
Name: ... | Hidden: true,
}
// VersionFlag prints the version for the application |
<|file_name|>clean_geoindex.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from ..extensions import celery, redis_store
from ..models.taxis import Taxi
import time
from flask import current_app
@celery.task
def clean_geoindex():
keys_to_clean = []
cursor = 0
taxi_id = set()
cursor = None
while cursor ... | |
<|file_name|>simplelevel.py<|end_file_name|><|fim▁begin|>from levels import AbstractLevel, LevelsFactory, check
import bomblevel
def allBombed(self, player):
""" Check, is all players units are bombed """
return player.units.count('default_unit') == self.fieldSize()
class Level(AbstractLevel):
def fieldSi... | def isGameOver(self, player):
return False |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*-
import argparse
import numpy as np
parser = argparse.ArgumentParser(description='Configuration file')
arg_lists = []
def add_argument_group(name):
arg = parser.add_argument_group(name)
arg_lists.append(arg)
return arg
def str2bool(v):... | print('* Restored model:',config.restore_model)
print('* Actor hidden_dim (embed / num neurons):',config.hidden_dim)
print('* Actor tan clipping:',config.C) |
<|file_name|>test_provider_config.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.