prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>BuilderHistoryDataSource.js<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012 Google Inc. All rights reserved. * Copyright (C) 2012 Zan Dobersek <zandobersek@gmail.com> * Copyright (C) 2015 University of Washington. * * Redistribution and use in source and binary forms, with or without * modificat...
var data = objectTrie[part];
<|file_name|>share_ledger.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import frappe from frappe import _ def execute(filters=None): if not filters: filters = {} if not filters.get("date"): frappe.throw(_(...
columns = [
<|file_name|>motion.rs<|end_file_name|><|fim▁begin|>use Scalar; use maths::Vec3D; // TODO move this into physics module #[derive(Clone, Debug)] pub struct Motion { pub velocity: Vec3D, pub angular_velocity: Vec3D, } impl Motion { pub fn new(velocity: Vec3D, angular_velocity: Vec3D) -> Motion { Mot...
<|file_name|>capstone_archs_impl.rs<|end_file_name|><|fim▁begin|>use core::convert::From; impl From<u32> for arm_insn { fn from(id: u32) -> Self { match id { 0 => arm_insn::ARM_INS_INVALID, 1 => arm_insn::ARM_INS_ADC, 2 => arm_insn::ARM_INS_ADD, 3 => arm_insn:...
534 => x86_insn::X86_INS_PFRSQRT,
<|file_name|>render.py<|end_file_name|><|fim▁begin|>import os import chardet from humanfriendly import format_size import pygments import pygments.lexers import pygments.lexers.special import pygments.formatters from pygments.util import ClassNotFound from mako.lookup import TemplateLookup from mfr.core import extens...
<|file_name|>limitrange_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 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.apache...
<|file_name|>cancel_data_labeling_job_sample.py<|end_file_name|><|fim▁begin|># Copyright 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 # # https://www.apache.org/license...
# [START aiplatform_cancel_data_labeling_job_sample] from google.cloud import aiplatform
<|file_name|>mongodb.py<|end_file_name|><|fim▁begin|>""" The MIT License (MIT) Copyright (c) 2015 Ricardo Yorky 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, including with...
<|file_name|>raft_update.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Google Research 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...
z = tf.math.sigmoid(self.convz2(pad_hx))
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from flask.ext.wtf import Form from wtforms import TextField<|fim▁hole|>from wtforms.validators import Required class NameForm(Form): name = TextField('What is your name?', validators = [ Required() ])<|fim▁end|>
<|file_name|>shortcuts.test.js<|end_file_name|><|fim▁begin|>import actions from './shortcuts'; class MockClientStore { update(cb) { this.updateCallback = cb; } } describe('manager.shortcuts.actions.shortcuts', () => { describe('setOptions', () => { test('should update options', () => { const clien...
}); }); test('should warn about deprecated option names', () => {
<|file_name|>admindashboard.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import logging import ckan.logic as logic import ckan.model as model import ckan.lib.dictization.model_dictize as model_dictize import ckan.lib.dictization as dictization from sqlalchemy import func, text, or_, and_ from ...
model.Revision.author != user_not) if only_privatized:
<|file_name|>training-fas-sif-5.py<|end_file_name|><|fim▁begin|># training.py # This is the training script which will be presented to the participant before they sleep # or remain awake # # TODO # Libraries - these seem fine and should not need altering. from psychopy import visual, event, core, misc, data, gu...
metronome(cvc_faster_rate) metronome(cvc_faster_rate) # Variables
<|file_name|>ProjectRepositoryImpl.ts<|end_file_name|><|fim▁begin|>module data.impl { var uuid:UUID = require("uuid"); export class ProjectRepositoryImpl implements ProjectRepository { private _database:any; constructor(database:any) { this._database = database; } ...
public getProject(name:string):Q.IPromise<model.db.Project> { return this._database.selectOne("Projects", { name: name });
<|file_name|>test_v3_oauth2.py<|end_file_name|><|fim▁begin|># Copyright 2013 OpenStack 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.org/licenses/LICEN...
'redirect_uri':self.DEFAULT_REDIRECT_URIS[0] } }
<|file_name|>db.js<|end_file_name|><|fim▁begin|>odoo.define('point_of_sale.DB', function (require) { "use strict"; var core = require('web.core'); var utils = require('web.utils'); /* The PosDB holds reference to data that is either * - static: does not change between pos reloads * - persistent : must stay between r...
<|file_name|>e159.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectif...
<|file_name|>OperationsBean.java<|end_file_name|><|fim▁begin|>// Copyright 2004 The Apache Software 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...
assembly.newLine("WHERE "); assembly.add("PERSON_ID = ");
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup setup(name='antk', version=0.3, description='Automated Neural-graph Toolkit: A Tensorflow wrapper for ' 'common deep learning t...
'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Artificial Intelligence',
<|file_name|>Status.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010-2013 The SINA WEIBO 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://ww...
public int mlevel; /** * 微博的可见性及指定可见分组信息。该 object 中 type 取值, * 0:普通微博,1:私密微博,3:指定分组微博,4:密友微博;
<|file_name|>midi.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # pylint: disable=too-many-lines,too-complex,too-many-branches # pylint: disable=too-many-statements,arguments-differ # needs refactoring, but I don't have the energy for anything # more than a superficial cleanup. #------------------------------...
shift_scalar = cents / float(cent_range) shift = int(round(shift_scalar * top_span))
<|file_name|>requests.go<|end_file_name|><|fim▁begin|>package networks import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/pagination"<|fim▁hole|> // List returns a Pager that allows you to iterate over a collection of Network. func List(client *gophercloud.ServiceClient) pagination.Pag...
)
<|file_name|>3.py<|end_file_name|><|fim▁begin|># http://www.pythonchallenge.com/pc/def/equality.html import re file_ob = open("3.dat", 'r') ob_read = file_ob.read()<|fim▁hole|>read_arr = list(ob_read) word = [] def for_loop(): # Loops through array to find solution for i in range(len(read_arr)): if (i + 8) > le...
<|file_name|>GtByteArray.cpp<|end_file_name|><|fim▁begin|>/* ** This file is part of the Hpc Template Library (Htl or HTL). ** It is based on a merger of QT, STL, and SigSlots along with development of new classes. ** License information is in the HtlLicense.h file ** This software was merged and developed by: *...
<|file_name|>_error.component.ts<|end_file_name|><|fim▁begin|><%# Copyright 2013-2017 the original author or authors from the StackStack project. This file is part of the StackStack project, see http://www.jhipster.tech/ for more information. Licensed under the Apache License, Version 2.0 (the "License"); you ma...
ngOnInit() { this.route.data.subscribe((routeData) => { if (routeData.error403) { this.error403 = routeData.error403;
<|file_name|>ScriptStopwatch.cpp<|end_file_name|><|fim▁begin|>//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2022 Ryo Suzuki // Copyright (c) 2016-2022 OpenSiv3D Project // // Licensed under the MIT License. // //---------------------------------...
if (e == other) { return 0; }
<|file_name|>startup_ip.py<|end_file_name|><|fim▁begin|>import subprocess import smtplib import socket from email.mime.text import MIMEText import datetime # Change to your own account information to = 'rk.ryan.king@gmail.com' gmail_user = 'rk.ryan.king@gmail.com' gmail_password = 'nzwaahcmdzjchxsz' smtpserver = smtpli...
smtpserver.sendmail(gmail_user, [to], msg.as_string())
<|file_name|>DefaultPackageScanClassResolverTest.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses...
try { savedClassLoader = Thread.currentThread().getContextClassLoader();
<|file_name|>compareintervalplot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # plot interval CSV output from perf/toplev # perf stat -I1000 -x, -o file ... # toplev -I1000 -x, -o file ... # intervalplotcompare.py file (or stdin) # delimeter must be , # this is for data that is not normalized # TODO: move legend s...
for r in rc: if config.burst:
<|file_name|>addClasses.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import MySQLdb as mdb import uuid, pprint def generate(data): gdata = [] for grade in range(1,4): for clazz in range(1,10): if grade != data['grade_number'] and clazz != data['class_number']: gdata.append("i...
<|file_name|>test_backend_sql.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 # # ...
<|file_name|>running-with-no-runtime.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...
}
<|file_name|>squid.py<|end_file_name|><|fim▁begin|>from Queue import Empty from multiprocessing import Process, Queue import numpy as np import matplotlib.pyplot as plt from matplotlib import widgets from scipy import interpolate from labrad.units import Unit V, mV, us, GHz, rad = [Unit(s) for s in ('V', 'mV', 'us', ...
params = [{'name':'mpa'+str(state), 'val': float(qubit[keynames[state-1]]), 'range': (min(mpas),max(mpas)), 'axis': 'x', 'color': colors[state-1]} for state in states[1:]] result = adjust(params, traces)
<|file_name|>_base.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 required by applicable law or a...
<|file_name|>mustbeofsamezoneexception.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- from ...errors.httpbadrequestexception import HttpBadRequestException import saklient # module saklient.cloud.errors.mustbeofsamezoneexception class MustBeOfSameZoneException(HttpBadRequestException): ## 不適切な要求です。参照するリソ...
## @param {int} status # @param {str} code=None # @param {str} message=""
<|file_name|>CompleXChange.java<|end_file_name|><|fim▁begin|>package standalone_tools; import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Set; import framework.DataQuery; import framework.DiffComplexDetector; import framework.DiffComplexDetector.SPEnrichment; import framework.DiffSe...
if (group1 == null || group1.isEmpty())
<|file_name|>PlayerMovementMapper.java<|end_file_name|><|fim▁begin|>package us.myles.ViaVersion.protocols.protocol1_9to1_8;<|fim▁hole|>import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.MovementTracker; public class PlayerMovementMapper extends PacketHandler { @Override public void handle(PacketWrap...
import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.remapper.PacketHandler; import us.myles.ViaVersion.api.type.Type;
<|file_name|>imgui_impl_dx11.cpp<|end_file_name|><|fim▁begin|>// ImGui Win32 + DirectX11 binding // Implemented features: // [X] User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. // You can copy and use unmodified imgui_impl_* files in your project. Se...
float2 uv : TEXCOORD0;\
<|file_name|>timer.rs<|end_file_name|><|fim▁begin|>use libc::{uint32_t, uint64_t, c_void, c_int}; //SDL_timer.h pub type SDL_TimerCallback = ::std::option::Option<extern "C" fn(arg1: uint32_t, arg2: *const c_void) -> uint32_t>;<|fim▁hole|>pub type SDL_TimerID = c_int; extern...
<|file_name|>WifiDirectLooper.java<|end_file_name|><|fim▁begin|>package net.ballmerlabs.scatterbrain.network.wifidirect; import android.os.Handler; import android.os.Looper; import android.os.Message; import net.ballmerlabs.scatterbrain.network.GlobalNet; /** * Created by user on 5/29/16. */ @SuppressWarnings({"Fi...
<|file_name|>GetAllGroups.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################### # # GetAllGroups # Retrieve data for all groups in an account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apach...
return GetAllGroupsInputSet()
<|file_name|>be_temporally_matcher.go<|end_file_name|><|fim▁begin|>package matchers import ( "fmt" "github.com/obieq/goar/db/couchbase/Godeps/_workspace/src/github.com/onsi/gomega/format" "time" ) <|fim▁hole|> Threshold []time.Duration } func (matcher *BeTemporallyMatcher) FailureMessage(actual interface{}) (mess...
type BeTemporallyMatcher struct { Comparator string CompareTo time.Time
<|file_name|>splashview.js<|end_file_name|><|fim▁begin|>'use strict'; (function(module) { const splashView = {}; splashView.defaultView = function(){ $('#about').hide(); $('#map').css('z-index', -500); $('form').fadeIn();<|fim▁hole|> $(function(){ $('#home').on('click', function(){ splashView.de...
$('#splash-page').fadeIn(); } module.splashView = splashView; })(window);
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(feature = "unstable", feature(custom_derive, plugin, custom_attribute, time2))] #![cfg_attr(feature = "unstable", plugin(diesel_codegen, dotenv_macros))] extern crate quickcheck; #[macro_use] extern crate diesel; #[cfg(feature = "unstable")] include!("lib.i...
#[cfg(not(feature = "unstable"))] include!(concat!(env!("OUT_DIR"), "/lib.rs"));
<|file_name|>run_server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys, getopt, os, urllib2 import Overc from flask import Flask from flask import jsonify from flask import request from flask_httpauth import HTTPBasicAuth from passlib.context import CryptContext app = Flask(__name__) # Password hash ge...
<|file_name|>FunctionCallOperatorNode.cpp<|end_file_name|><|fim▁begin|>#include "FunctionCallOperatorNode.h" #include "compiler/Parser/Parser.h" #include "compiler/AST/Variables/VariableNode.h" #include <assert.h> namespace Three { FunctionCallOperatorNode* FunctionCallOperatorNode::parse(Parser& parser, ASTNode*...
return node; }
<|file_name|>compile_keymap.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """Compiler for keymap.c files This scrip will generate a keymap.c file from a simple markdown file with a specific layout. Usage: python compile_keymap.py INPUT_PATH [OUTPUT_PATH] """ from __future__ import ...
| | | ! | | .-------+-------+-------! !-------+-------+-------. ! ! | | ! | ! !
<|file_name|>link_previewers.js<|end_file_name|><|fim▁begin|>const St = imports.gi.St; const Lang = imports.lang; const Pango = imports.gi.Pango; const Params = imports.misc.params; const Main = imports.ui.main; const Soup = imports.gi.Soup; const Gio = imports.gi.Gio; const ExtensionUtils = imports.misc.extensionUtils...
});
<|file_name|>ng-wig.js<|end_file_name|><|fim▁begin|>/** * version: 1.1.10 */ angular.module('ngWig', ['ngwig-app-templates']); angular.module('ngWig') .directive('ngWig', function () { return { scope: { content: '=ngWig' }, restrict: 'A', replace: true, templateUrl: 'ng...
" --><li class=\"nw-toolbar__item\">\n" +
<|file_name|>area.reducer.ts<|end_file_name|><|fim▁begin|>import { State } from '@ngrx/store'; import { ActionReducer } from '@ngrx/store'; import * as AreaActions from './../actions/area.actions'; import { AreaState, initialState } from './../states/area.state'; export type Action = AreaActions.All; export const Are...
} } };
<|file_name|>IEDs.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 Emil * * 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 3 of the License, or * (at your opti...
* * @author Emil */ public class IEDs extends Card {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for RFXtrx devices.""" import binascii from collections import OrderedDict import logging import RFXtrx as rfxtrxmod import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, ATTR_STATE, CONF_DEVICE, CONF_...
{vol.Required(CONF_PORT): cv.port, vol.Optional(CONF_HOST): cv.string} ) CONFIG_SCHEMA = vol.Schema(
<|file_name|>Heading.js<|end_file_name|><|fim▁begin|>define([ "dojo/_base/array", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dijit/registry", "dijit/_Contained", "dijit/_Container", "dijit/_Widge...
// label: String // A title text of the heading. If the label is not specified, the
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't ...
# html_use_opensearch = ''
<|file_name|>screenlets.py<|end_file_name|><|fim▁begin|># -*- encoding: UTF-8 -*- import struct from time import localtime import itertools import codecs import gevent from copy import copy from copy import deepcopy import screen from screen import ForegroundColors, BackgroundColors from screen import Align from uti...
self.add(footer(self.routine)) self.add(label(self.routine, Dimension(self.dimension.height / 2, 0, len(self.msg.encode('big5')), 1), self.msg))
<|file_name|>promote.py<|end_file_name|><|fim▁begin|>import re import subprocess import sys def get_promotion_chain(git_directory, git_branch, upstream_name='origin'): """ For a given git repository & branch, determine the promotion chain Following the promotion path defined for pulp figure out what the ...
:type promotion_chain: list of str """
<|file_name|>webgl2renderingcontext.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 https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::...
} /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 fn LinkProgram(&self, program: &WebGLProgram) {
<|file_name|>middleware_urm_auth_test.go<|end_file_name|><|fim▁begin|>package tenant import ( "context" "testing" "github.com/google/go-cmp/cmp" "github.com/influxdata/influxdb/v2" influxdbcontext "github.com/influxdata/influxdb/v2/context" "github.com/influxdata/influxdb/v2/kit/feature" "github.com/influxdata...
<|file_name|>PercentileComputation.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2015 EMBL - European Bioinformatics Institute * * Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in co...
private List<Float> lowerValues; private List<Float> values;
<|file_name|>test_data.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def test_data(): data = get_data() assert all(data.columns == ['Survived', 'Pclass', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare', 'Embarked', 'FamilyTot', 'FamStatus', 'age_group']) assert all([len(data[col]) == 891 for...
from dataworkflow.data import get_data import pandas as pd
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "maiziblog2.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
import os
<|file_name|>train_word2vec_rf.py<|end_file_name|><|fim▁begin|>""" train supervised classifier with what's cooking recipe data objective - determine recipe type categorical value from 20 """ import time from features_bow import * from features_word2vec import * from sklearn.preprocessing import StandardScaler from skle...
n_jobs=n_jobs, random_state=random_state, verbose=verbose) # perform cross validation cv_n_fold = 8 print 'cross validating %s ways...' % cv_n_fold
<|file_name|>replaceShorthandObjectMethod.js<|end_file_name|><|fim▁begin|>import * as t from "babel-types"; import * as util from "./util"; // this function converts a shorthand object generator method into a normal // (non-shorthand) object property which is a generator function expression. for // example, this: // /...
// In either case, though, the caller can count on the fact that the return value // is a Function AST node path. //
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations<|fim▁hole|> dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel...
from django.conf import settings class Migration(migrations.Migration):
<|file_name|>extension_tests.py<|end_file_name|><|fim▁begin|>"""Tests for cement.core.extension.""" from cement.core import exc, backend, extension, handler, output, interface from cement.utils import test class IBogus(interface.Interface): class IMeta: label = 'bogus' class BogusExtensionHandler(exte...
res = 'cement.ext.ext_json' not in ext.get_loaded_extensions() self.ok(res)
<|file_name|>AtomPairs.cpp<|end_file_name|><|fim▁begin|>// $Id$ // // Copyright (C) 2007-2013 Greg Landrum // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit...
typeIdx = nTypes;
<|file_name|>account.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|> templateUrl: 'app/account/login/login.html', controller: 'LoginCtrl' }) .when('/signup', { templateUrl: 'app/account/signup/signup.html', controller: 'SignupCtrl' }) .when('/settings', ...
angular.module('drunkeeperApp') .config(function ($routeProvider) { $routeProvider .when('/login', {
<|file_name|>course-add.component.ts<|end_file_name|><|fim▁begin|>import { Component, ViewEncapsulation, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { NgForm } from '@angular/forms'; import { uniqBy } from 'lodas...
private courseService: CourseService, private loaderService: LoaderService, private authorService: AuthorService,
<|file_name|>extoption_env-too-many-args.rs<|end_file_name|><|fim▁begin|><|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>, at your // option. This file may not be c...
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.
<|file_name|>asm.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/licens...
} Clobbers => {
<|file_name|>cell.ts<|end_file_name|><|fim▁begin|>import { CdkCell, CdkCellDef, CdkColumnDef, CdkHeaderCell, CdkHeaderCellDef } from '@angular/cdk/table'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, ElementRef, HostBinding, Input, OnDestroy, OnInit, Optional, Rendere...
<|file_name|>partitioned.go<|end_file_name|><|fim▁begin|>/* Original work Copyright (c) 2013 zhenjl Modified work Copyright (c) 2015 Tyler Treat 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 wit...
idx := (uint(lower) + uint(upper)*i) % p.s if p.partitions[i].Get(idx) == 0 { member = false
<|file_name|>directives.module.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { HorizontalScrollDirective } from './horizontal.scroll.directive'; import { ClearBoxDirective } from './clearbox.directive'; export const DIRECTIVES_DECLARATIONS: any[] = [ HorizontalScrollDirective, ClearBoxDirective ];<|fim▁en...
<|file_name|>coverage.py<|end_file_name|><|fim▁begin|>from django.template.loader import render_to_string from tasks.const import STATUS_SUCCESS from .base import library @library.register('coverage') def coverage_violation(data): """Coverage violation parser :param data: task data :type data: dict :...
<|file_name|>schema_test.go<|end_file_name|><|fim▁begin|>// Copyright 2018 Istio 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...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import urllib from django.http import HttpResponseRedirect from django.http.response import HttpResponseBadRequest, HttpResponse from django.shortcuts import get_object_or_404, render from django.core.urlresolvers import reverse from rest_framework import viewsets from...
<|file_name|>do_release.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """do_release.py Usage: do_release.py [--force] [CALICO_DOCKER_VERSION CALICO_VERSION LIBCALICO_VERSION LIBNETWORK_VERSION] Options: -h --help Show this screen. """ import subprocess import utils import re from docopt import docop...
(re.compile('calico/node:latest'), 'calico/node:{version}'),
<|file_name|>FontInfo.java<|end_file_name|><|fim▁begin|>/* **************************************************************************** * FontInfo.java * ****************************************************************************/ /* J_LZ_COPYRIGHT_BEGIN ******************************************************* * Copy...
} if (other.multiline != FONTINFO_NULL) { multiline = other.multiline;
<|file_name|>dlg_preferences_ui.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/colin/Projects/OpenCobolIDE/forms/dlg_preferences.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from pyqode.qt ...
self.gridLayout_3.addWidget(self.groupBox_8, 0, 0, 1, 1)
<|file_name|>countdown.js<|end_file_name|><|fim▁begin|>/*! UIkit 3.5.15 | https://www.getuikit.com | (c) 2014 - 2020 YOOtheme | MIT License */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) : typeof define === 'functi...
this.stop();
<|file_name|>gated-quote.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
// FIXME the error message that is current emitted seems pretty bad.
<|file_name|>anita.py<|end_file_name|><|fim▁begin|># # This is the library part of Anita, the Automated NetBSD Installation # and Test Application. # import os import pexpect import re import string import subprocess import sys import time import urllib import urlparse __version__='1.43' # Your preferred NetBSD FTP ...
<|file_name|>serve.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 -B exec(open("../index.py").read())<|fim▁hole|>from waitress import serve serve(application, host='0.0.0.0', port=8080, threads=1, channel_timeout=1)<|fim▁end|>
<|file_name|>step_create_image.go<|end_file_name|><|fim▁begin|>package ecs import ( "context" "fmt" "time" "github.com/hashicorp/packer/common/random" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" "github.com/hashicorp/packer/common/uuid" "github...
<|file_name|>conf_manager.py<|end_file_name|><|fim▁begin|>import sys import yaml import collections Conf = collections.namedtuple( 'Conf', 'links audio_formats show_download_progress overrride_audios' ) class ConfManager(object): DEFAULT_AUDIO_FORMATS = ['mp4', 'mp3', 'webm', 'm4a', 'ogg', 'wma'] @...
)
<|file_name|>accordion.spec.ts<|end_file_name|><|fim▁begin|>import {TestBed, ComponentFixture, inject} from '@angular/core/testing'; import {By} from '@angular/platform-browser'; import {createGenericTestComponent, isBrowserVisible} from '../test/common'; import {Component} from '@angular/core'; import {NgbAccordionM...
const el = fixture.nativeElement;
<|file_name|>MapPartitionITCase.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to ...
} // create expected
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import json def json_pre_process_hook(action, request, *args, **kwargs):<|fim▁hole|> if not json_data: action.ret('002').msg('json_params_required') return False try: param_dict = json.loads(json_data) excep...
json_data = request.body
<|file_name|>AdaptivityAction.C<|end_file_name|><|fim▁begin|>//* This file is part of the MOOSE framework //* https://www.mooseframework.org //* //* All rights reserved, see COPYRIGHT for full restrictions //* https://github.com/idaholab/moose/blob/master/COPYRIGHT //* //* Licensed under LGPL 2.1, please see LICENSE fo...
params.addParam<bool>( "show_initial_progress", true, "Show the progress of the initial adaptivity");
<|file_name|>HairChiang16Tests.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** # Copyright (c) 2015-21, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided...
// Importance sampling failed: NaNs appear in the sampling procedure.
<|file_name|>listSubAccountsTop_jsp.java<|end_file_name|><|fim▁begin|>package com.sapienter.jbilling.client.jspc.user; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import com.sapienter.jbilling.client.util.Constants;; public final class listSubAccountsTop_jsp extends org.apache.jas...
<|file_name|>number.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate criterion; #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; use criterion::Criterion; use nom::number::complete; fn parser(i: &[u8]) -> nom::IResult<&[u8], u64> { complete::be_u64(i) }<|fim▁hole|> let d...
fn number(c: &mut Criterion) {
<|file_name|>special.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django.db import router from .base import Operation class SeparateDatabaseAndState(Operation): """ Takes two lists of operations - ones that will be used for the database, and ones that will be used for the...
def database_forwards(self, app_label, schema_editor, from_state, to_state): if router.allow_migrate(schema_editor.connection.alias, app_label, **self.hints): # We now execute the Python code in a context that contains a 'models'
<|file_name|>ASDistancesTest.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.*; /** * * @author Niklas Wahlén <nwahlen@kth.se> */ public class ASDistancesTest { ASDistances distances = null; public ...
package se.sics.asdistances; import se.sics.asdistances.ASDistances;
<|file_name|>particle.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2011 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # All rights reserved. # # Redistribution and use in source and binary forms, with or w...
'''Particle system engine'''
<|file_name|>WritableResource.java<|end_file_name|><|fim▁begin|>/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at<|fim▁hole|> * * ...
<|file_name|>p2svpngateways.go<|end_file_name|><|fim▁begin|>package network // 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 Licens...
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth", pathParameters),
<|file_name|>id3.py<|end_file_name|><|fim▁begin|>import sys import math import CSVReader import DecisionTree # GLOBALS attributes = list() data = list(list()) pre_prune_tree = True # MATH FUNCTIONS def Entropy( yesNo ): yes = yesNo[0]; no = yesNo[1] if no == 0 or yes == 0: return 0 total = no + yes return ( ...
def extractDecisions( S ): return [ row[-1] for row in S ]
<|file_name|>composition.py<|end_file_name|><|fim▁begin|>from kivy.graphics import Color, Line, Quad from modeful.ui.diagram.relationship import Trigonometry from modeful.ui.diagram.relationship.association import Association class Composition(Association): def __init__(self, *args, **kwargs): su...
self._diamond_bg.points = points self._diamond_line.points = points
<|file_name|>ContactCanvas.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2008 - 2009 Lukas Hetzenecker <LuHe@gmx.at> from PyQt4.QtCore import * from PyQt4.QtGui import * # Matplotlib try: from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotli...