prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>logger.ts<|end_file_name|><|fim▁begin|>import * as os from 'os'; import * as winston from 'winston'; import * as util from 'util'; import * as fs from 'fs'; import { Tail } from 'tail'; const MY_CONSOLE = console; export interface IClientLog { logLines: string[]; osInfo: IClientOSInfo; } export interf...
c.warn = this.warn.bind(this); c.error = this.error.bind(this);
<|file_name|>plan.py<|end_file_name|><|fim▁begin|>import json from chargebee.model import Model from chargebee import request from chargebee import APIError class Plan(Model): class Tier(Model): fields = ["starting_unit", "ending_unit", "price", "starting_unit_in_decimal", "ending_unit_in_decimal", "price_in...
fields = ["id", "name", "invoice_name", "description", "price", "currency_code", "period", \
<|file_name|>buffer_queue.rs<|end_file_name|><|fim▁begin|>use pool_crate::Reset; use std::io::{self,Write}; use std::cmp::{min,max}; use std::{fmt,str}; use pool::{Pool,Checkout}; #[derive(Debug,PartialEq,Clone)] pub enum InputElement { /// length in the stream Slice(usize), Splice(usize), // x bytes copied in k...
}
<|file_name|>AbstractProctorLoader.java<|end_file_name|><|fim▁begin|>package com.indeed.proctor.common; import com.google.common.base.Preconditions; import com.google.common.base.Supplier; import com.indeed.util.core.DataLoadingTimerTask; import com.indeed.util.varexport.Export; import com.indeed.proctor.common.model....
public abstract class AbstractProctorLoader extends DataLoadingTimerTask implements Supplier<Proctor> {
<|file_name|>read_file.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2005 Steven L. Scott This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either<|fim▁hole|> This library is distri...
version 2.1 of the License, or (at your option) any later version.
<|file_name|>htmltablerowelement.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 cssparser::RGBA; use dom::bindings::codegen::...
<|file_name|>related-assets-spec.js<|end_file_name|><|fim▁begin|>describe("Related Assets", function(){ let project = require('../fixture')<|fim▁hole|> }) it("provides a related data summary", function(){ subject.relatedData.should.have.property('nested') subject.relatedData.nested.should.have.property('d...
let subject = project.documents.at('assets/data-source-spec') it("relates assets across different content collections", function(){ subject.related.data_sources.length.should.equal(2)
<|file_name|>test-zk.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "time" "flag" // "os/exec" "log" // "bytes" // "os" // "syscall" "github.com/samuel/go-zookeeper/zk" "crypto/sha256" "encoding/base64" "strings" "github.com/satori/go.uuid" ) func zkConnect() *zk.Conn { zks := []string{"wz-zk-1...
msg, err := zk_c.Create(zk_path_uuid, []byte{}, int32(zk.FlagEphemeral + zk.FlagSequence), acl) if err != nil { log.Fatal(err); return err } log.Print(msg)
<|file_name|>24.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { Fragile24 as default } from "../../";
<|file_name|>MergeDocumentWithOrcid.java<|end_file_name|><|fim▁begin|>/* * This file is part of CoAnSys project. * Copyright (c) 2012-2015 ICM-UW * * CoAnSys 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 F...
<|file_name|>item.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Licens...
Column("raceID", Integer), Column("factionID", Integer),
<|file_name|>immutableRenderDecorator.ts<|end_file_name|><|fim▁begin|>import * as React from 'react' let whiteList = [ '[IndexPage]' ] export default function immutableRenderDecorator(Target: React.ComponentClass<any>): any { class ImmutableRenderDecorator extends Target { shallowEqualImmutable(preObj...
} const preKey = Object.keys(preObj)
<|file_name|>test_serializer.py<|end_file_name|><|fim▁begin|>import sqlite3<|fim▁hole|>import numpy import scipy.sparse from django.test import SimpleTestCase from matrixstore.serializer import serialize, serialize_compressed, deserialize class TestSerializer(SimpleTestCase): def test_simple_serialisation(self)...
<|file_name|>CharHashFunction.java<|end_file_name|><|fim▁begin|>/** * Copyright 2010 David Froehlich <david.froehlich@businesssoftware.at>, * Samuel Kogler <samuel.kogler@gmail.com>, * Stephan Stiboller <stistc06@htlkaindorf.at> * * This file is part of Codesearch. * * Codesea...
*/ package com.uwyn.jhighlight.pcj.hash;
<|file_name|>cisco_wlc_ssh.py<|end_file_name|><|fim▁begin|>from __future__ import print_function from __future__ import unicode_literals import time<|fim▁hole|>from netmiko.ssh_exception import NetMikoTimeoutException, NetMikoAuthenticationException import paramiko import socket class CiscoWlcSSH(BaseSSHConnection): ...
from netmiko.ssh_connection import BaseSSHConnection from netmiko.netmiko_globals import MAX_BUFFER
<|file_name|>player.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2015 Rodrigo Silva (MestreLion) <linux@rodrigosilva.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free So...
return "" # All fine :)
<|file_name|>gh_post_style_patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # Copyright (C) 2018-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
You can run `gitlab-runner exec docker style` afterwards to check if your \ changes worked out properly. Please note that there are often multiple ways to correctly format code. \
<|file_name|>comment.js<|end_file_name|><|fim▁begin|>Template.comment.helpers({ submittedText: function() { var date = new Date(this.submitted); console.log("vote =====>", this); var d=date.getDate(); var m=date.getMonth()+1; var y=date.getFullYear(); return m + " - " + d + " - ...
'click .downvotable': function(e) { e.preventDefault(); console.log("e =====>", e); var postID = this.postID;
<|file_name|>sensor_test.py<|end_file_name|><|fim▁begin|># Copyright (C) 2020 OpenMotics BV # # This program 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 Foundation, either version 3 of the # License, or (at you...
unit='celcius', name='bar', room=10)
<|file_name|>NetworkDispatcher.java<|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:/...
// 为请求添加一个 "network-parse-complete" MarkLog
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2011-2015 SEOmoz, Moz # # 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, includin...
except ImportError: from distutils.core import setup
<|file_name|>do_generator.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 生成器表达式----一边循环一边计算 # 列表元素可以在循环的过程中不断推算出后续的元素 # 这样就不必创建完整的list,从而节省大量的空间 from collections import Iterable import array # 第一种方法:将列表生成式最外面的[] 改成() # 列表生成式 list_comp = [x * x for x in range(10)] # 生成器表达式 list_gene =...
<|file_name|>EscapedInterpolationVariableTest.java<|end_file_name|><|fim▁begin|>/* * Hibernate Validator, declare and validate application constraints * * License: Apache License, Version 2.0 * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. */ package org.hibernate....
new ResourceBundleLocator() { @Override public ResourceBundle getResourceBundle(Locale locale) { return new ResourceBundle() {
<|file_name|>_pattern.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class PatternValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="pattern", parent_name="volume.surface", **kwargs): super(PatternValidator, self).__init__( plotly_na...
parent_name=parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "odd", "even"]),
<|file_name|>SimpleTask.cpp<|end_file_name|><|fim▁begin|>#include <bits/stdc++.h> template<typename T> T gcd(T a, T b) {<|fim▁hole|>} template<typename T> T lcm(T a, T b) { return a * b / gcd(a, b); } template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; } template<typename T> void chmax(T& a, T b) { ...
if(!b) return a; return gcd(b, a % b);
<|file_name|>ToHoudiniCurvesConverter.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2010-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permit...
def curveSop( self, order=2, periodic=False, parent=None, coordIndex=0 ) :
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for jsreport-core 2.0 // Project: http://jsreport.net // Definitions by: taoqf <https://github.com/taoqf> // pofider <https://github.com/pofider> // Keith Kikta <https://github.com/newbish> // Definitions: https://g...
engine: Engine | string; /** javascript helper functions used by templating engines */
<|file_name|>csdn.py<|end_file_name|><|fim▁begin|># coding: utf-8 from common import base class Plugin(base.BASE): __name__ = 'csdn' __title__ = 'CSDN' __url__ = 'http://www.csdn.net/' def register(self, target): self.information = { 'email': { 'url': 'http://pas...
'result': { 'type': 'str', 'value': 'false' }
<|file_name|>array.rs<|end_file_name|><|fim▁begin|>use array_ext; use arrayvec; use smallvec; pub trait Array:<|fim▁hole|> arrayvec::Array + smallvec::Array<Item = <Self as arrayvec::Array>::Item> + array_ext::Array<<Self as arrayvec::Array>::Item> { } pub trait ReplaceItemType<U>: Array { type Type: Array + a...
<|file_name|>splaytree.java<|end_file_name|><|fim▁begin|>/****************************************************************************************** * Data Structures in C++ * ISBN: 7-302-33064-6 & 7-302-33065-3 & 7-302-29652-2 & 7-302-26883-3 * Junhui DENG, deng@tsinghua.edu.cn * Computer Science & Technology,...
<|file_name|>save-frame.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import sys import logging import numpy as np from aravis import Camera if __name__ == "__main__": #cam = ar.get_camera("Prosilica-02-2130A-06106") #cam = Camera("AT-Automation Technology GmbH-20805103") cam = Camera(loglevel=logging.DEBU...
<|file_name|>PublishedLayersTab.js<|end_file_name|><|fim▁begin|>/** * @class Oskari.mapframework.bundle.layerselector2.view.PublishedLayersTab * */ Oskari.clazz.define("Oskari.mapframework.bundle.layerselector2.view.PublishedLayersTab", /** * @method create called automatically on construction * @stat...
group.layerListPanel = groupPanel;
<|file_name|>TextUnix.cpp<|end_file_name|><|fim▁begin|>#include <Gosu/Text.hpp> #include <Gosu/Bitmap.hpp> #include <Gosu/Utility.hpp> #include <pango/pango.h> #include <pango/pangoft2.h> #include <glib.h> #include <SDL/SDL_ttf.h> #include <string> #include <cstring> #include <stdexcept> std::wstring Gosu::defaultFo...
}
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>const webpack = require('atool-build/lib/webpack'); module.exports = function (webpackConfig, env) { webpackConfig.babel.plugins.push('transform-runtime'); webpackConfig.babel.plugins.push(['import', { libraryName: 'antd', style: 'css' // if true...
webpackConfig.devtool = '#eval'; webpackConfig.babel.plugins.push('dva-hmr');
<|file_name|>rgb_led.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """ This is an example that demonstrates how to use an<|fim▁hole|>RGB led wired up with red on pin 10, green on pin 9, and blue on pin 8. """ from BreakfastSerial import RGBLed, Arduino from time import sleep board = Arduino() led = RGBLed(boa...
RGB led with BreakfastSerial. It assumes you have an
<|file_name|>two_sum_iii_data_structure_design.js<|end_file_name|><|fim▁begin|>/** * @constructor */ var TwoSum = function() { this.dict = {}; }; /** * @param {number} input<|fim▁hole|> */ TwoSum.prototype.add = function(input) { // no need to bigger that 2 this.dict[input] = this.dict[input] ? 2 : 1; }; /**...
* @returns {void}
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>def mysql_read(): mysql_info = {} with open('/etc/openstack.cfg', 'r') as f: for i in f.readlines(): if i.split('=', 1)[0] in ('DASHBOARD_HOST', 'DASHBOARD_PASS', 'D...
'DASHBOARD_USER',
<|file_name|>returnTypeInNewNumpyDocString_after.py<|end_file_name|><|fim▁begin|>def f(x):<|fim▁hole|> ------- object """ return 42<|fim▁end|>
""" Returns
<|file_name|>test_backend.py<|end_file_name|><|fim▁begin|>from corrdb.common.core import setup_app<|fim▁hole|> def create_app(self): try: browser = twill.get_browser() browser.go("http://localhost:5200/") app = setup_app(__name__, 'corrdb.tests.integrate') app...
from flask.ext.testing import LiveServerTestCase import twill class DatabaseTest(LiveServerTestCase):
<|file_name|>loader.tsx<|end_file_name|><|fim▁begin|>import MyComponent from "./src/components/MyComponent/MyComponent";<|fim▁hole|><|fim▁end|>
export default MyComponent;
<|file_name|>zaragwa.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
showWord(["","Wayòm ki te nan pati Sidwès peyi Ispayola. Se Boyekyo ki te chèf endyen nan wayòm sa a. Kapital wayòm sa a te Lagwana, kounye a yo rele l Leogàn." ])
<|file_name|>hook_configuration.rs<|end_file_name|><|fim▁begin|>#[derive(Clone)] #[derive(RustcDecodable)] pub struct HookConfiguration { pub hooks: Vec<HookConfig>, pub slack: Option<SlackConfiguration>, } #[derive(Clone)] #[derive(RustcDecodable)] pub struct SlackConfiguration { pub webhook_url: String, ...
<|file_name|>operators.hpp<|end_file_name|><|fim▁begin|>/* util/operators.hpp * * Copyright (C) 2007 Antonio Di Monaco * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #ifndef __OPERATORS_HPP__ <|fim▁hole|>struct EqualComparable...
#define __OPERATORS_HPP__ template< typename T >
<|file_name|>plot_cluster_stats_spatio_temporal_2samp.py<|end_file_name|><|fim▁begin|>""" .. _tut_stats_cluster_source_2samp: ========================================================================= 2 samples permutation test on source data with spatio-temporal clustering =============================================...
<|file_name|>math.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # pylint: disable=invalid-name from __future__ import absolute_import from math import acos, cos, pi, radians, sin, sqrt import auttitude as at import numpy as np def normalized_cross(a, b): """ Returns the normalized ...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>' __...
@property def user_agent(self): # Pass in an index to random_user_agent() to test with a particular
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Lumina User Guide documentation build configuration file. # All configuration values have a default; values that are commented out # serve to show the default. import os import six import string import sys import time # If extensions (or modu...
node += accel_node textnode = nodes.Text(span[1:]) node += textnode
<|file_name|>suspend.py<|end_file_name|><|fim▁begin|>from verbs.baseforms import forms class SuspendForm(forms.VerbForm): name = "Suspend" slug = "suspend"<|fim▁hole|> duration_min_time = forms.IntegerField()<|fim▁end|>
<|file_name|>OperatorOnBackpressureBufferTest.java<|end_file_name|><|fim▁begin|>/** * Copyright 2014 Netflix, 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.apac...
import static org.junit.Assert.assertEquals;
<|file_name|>readOnly.ts<|end_file_name|><|fim▁begin|>import mustBeString from '../checks/mustBeString';<|fim▁hole|> * @param name * @returns */ export function readOnly(name: string): LocalizableMessage { mustBeString('name', name); const message: LocalizableMessage = { get message(): string { ...
import { LocalizableMessage } from '../i18n/LocalizableMessage'; /** * @hidden
<|file_name|>module.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 {ENTER} from '@angular/cdk/keycodes'; import {CommonModule...
import {
<|file_name|>role-schema.component.ts<|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 requi...
| Public Variables |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ public role: Role;
<|file_name|>logging-separate-lines.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or<|fim▁hole|>/...
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from . import settings from django.contrib.auth import get_user_model def get_website_user(): """Get a generic 'website' user. Can be used to specify the required user when ther...
if created: user.set_unusable_password() user.is_active = False
<|file_name|>runbot_build.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2010 - 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # ...
@custom_build def checkout(self, cr, uid, ids, context=None): """Checkout in custom build directories if they are specified Do same as superclass except for git_export path.
<|file_name|>slicer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from . import memfbf from numpy import append import os import logging from glob import glob LOG = logging.getLogger(__name__) class SlicerFrame(dict): pass class FBFSlicer(object): """Given a workspace directory of flat binary fil...
<|file_name|>Notification.js<|end_file_name|><|fim▁begin|>/** * Notification.js * * Released under LGPL License. * Copyright (c) 1999-2015 Ephox Corp. All rights reserved *<|fim▁hole|>/** * Creates a notification instance. * * @-x-less Notification.less * @class tinymce.ui.Notification * @extends tinymce.ui.C...
* License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */
<|file_name|>MyCxfCustomerConverter.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 ...
<|file_name|>UserDataProperty.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2009-2010 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions o...
import java.util.logging.Logger; import org.openide.nodes.PropertySupport; import org.openide.util.Exceptions;
<|file_name|>theme.ts<|end_file_name|><|fim▁begin|>import {Directive} from 'angular2/angular2'; <|fim▁hole|> color: string; constructor() { this.color = 'sky-blue' } }<|fim▁end|>
@Directive({selector: '[md-theme]'}) export class MdTheme {
<|file_name|>test_invalid_services.py<|end_file_name|><|fim▁begin|>from typing import Any import pytest from run_test_service_helper import start_service def test_invalid_filename(monkeypatch: Any, capsys: Any, loop: Any) -> None: with pytest.raises(SystemExit): services, future = start_service("tests/s...
def test_import_error(monkeypatch: Any, capsys: Any, loop: Any) -> None:
<|file_name|>base.py<|end_file_name|><|fim▁begin|>class Requirement(object): """ Requirements are the basis for Dominion. They define what needs to exist on a host/role, or perhaps what *mustn't* exist. Requirements are defined on Roles. """ creation_counter = 0 "The base class for require...
if self.ensure == "removed": self.required = False
<|file_name|>BitArray.py<|end_file_name|><|fim▁begin|>#BitArray #Yu.Yang # class bitarray(): def __init__(self,length,defaultValue=False): if (length < 0): raise Exception("Length param error") self.array=[] self.length=length fillValue=defaultValue for i in rang...
def __len__(self): return self.length
<|file_name|>rebase-choose-branch-dialog.tsx<|end_file_name|><|fim▁begin|>import React from 'react' import { Branch } from '../../../models/branch' import { ComputedAction } from '../../../models/computed-action' import { RebasePreview } from '../../../models/rebase' import { ActionStatusIcon } from '../../lib/action-s...
<|file_name|>Raycaster.js<|end_file_name|><|fim▁begin|>/** * @author mrdoob / http://mrdoob.com/ * @author bhouston / http://exocortex.com/ */ ( function ( THREE ) { THREE.Raycaster = function ( origin, direction, near, far ) { this.ray = new THREE.Ray( origin, direction ); // normalized ray.direction requi...
// THREE.Raycaster.prototype.precision = 0.0001;
<|file_name|>repeat-async-until-tests.js<|end_file_name|><|fim▁begin|>"use strict"; const tester = require("./framework");<|fim▁hole|> let executionsCount = 0; const λ = async () => ++executionsCount; const predicate = async () => executionsCount === 2; await repeatAs...
const repeatAsyncUntil = require("../source/regularly"); module.exports = tester.run([ tester.make("repeatAsyncUntil() should repeat calls to λ while predicate returns false", async () => {
<|file_name|>issue-20803.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...
<|file_name|>property.py<|end_file_name|><|fim▁begin|># Status: ported, except for tests and --abbreviate-paths. # Base revision: 64070 # # Copyright 2001, 2002, 2003 Dave Abrahams # Copyright 2006 Rene Rivera # Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus # Distributed under the Boost Software License...
best = sequence.select_highest_ranked (matches, match_ranks) if not best:
<|file_name|>pull_v2.go<|end_file_name|><|fim▁begin|>package distribution import ( "encoding/json" "fmt" "io" "io/ioutil" "net/url" "os" "runtime" "github.com/docker/distribution" "github.com/docker/distribution/manifest/manifestlist" "github.com/docker/distribution/manifest/schema1" "github.com/docker/dis...
<|file_name|>time_stepping.py<|end_file_name|><|fim▁begin|># Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
<|file_name|>window.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 app_units::Au; use base64; use bluetooth_traits::Bluetooth...
return MarginStyleResponse::empty(); } self.layout_rpc.margin_style()
<|file_name|>text.cpp<|end_file_name|><|fim▁begin|>// $Id: text.cpp 1016 2004-05-07 00:20:29Z rmcruz $ // // SuperTux // Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de> // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as pu...
string_list_add_item(&names,"in your SuperTux distribution."); }
<|file_name|>ParseQuery.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2015-present, Parse, LLC. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in th...
<|file_name|>googlemanager.py<|end_file_name|><|fim▁begin|># coding=utf-8 #https://developers.google.com/drive/v3/web/quickstart/python from __future__ import print_function import httplib2 import os import io from apiclient import discovery import oauth2client from oauth2client import client from oauth2client import t...
print("[GOOGLE MANAGER] File with name {} uploaded to Google Drive".format(nameToUpload))
<|file_name|>rdt.py<|end_file_name|><|fim▁begin|># Copyright (C) 2008 David Bern # # 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 option) any...
header.cont = rmff_cont_t(title, author,
<|file_name|>extraction_functions.py<|end_file_name|><|fim▁begin|>import logging from functools import reduce import nanoget.utils as ut import pandas as pd import sys import pysam import re from Bio import SeqIO import concurrent.futures as cfutures from itertools import repeat def process_summary(summaryfile, **kwa...
"""Combine metrics extracted from a fastq file.""" logging.info("Nanoget: Starting to collect statistics from plain fastq file.") inputfastq = handle_compressed_input(fastq)
<|file_name|>bitcoin_eu_ES.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="eu_ES" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Bitcoin</sourc...
<|file_name|>e.cpp<|end_file_name|><|fim▁begin|>#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> ii; typedef vector<int> vi; typedef vector<ii> vii; int pd[110][110] = {}; int choose(int a, int b) { if(pd[a][b]) return pd[a][b]; if(a==b) return 1; if(a<b) return 0; i...
char s[255]; scanf("%s", s);
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>import os from unittest.mock import patch from django.contrib.auth.models import User from django.core.management import call_command from django.test import TestCase from experiments_manager.models import ChosenExperimentSteps, Experiment from git_manager.models imp...
github_url='https://github.com/jlmdegoede/Workbench-Acceptance-Experiment.git')
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for expense_tracker project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https...
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * @namespace export */ module.exports = {<|fim▁hole|> renderer: require('./renderer/index.js'), transformer: require('./transformer/index.js') };<|fim▁end|>
CmConfiguration: require('./CmConfiguration.js').CmConfiguration, CmExporter: require('./CmExporter.js').CmExporter, CmRenderer: require('./CmRenderer.js').CmRenderer, CmTransformer: require('./CmTransformer.js').CmTransformer,
<|file_name|>workouts.client.config.js<|end_file_name|><|fim▁begin|>'use strict'; // Configuring the Workouts module angular.module('workouts').run(['Menus', function(Menus) { // Add the workouts dropdown item Menus.addMenuItem('topbar', { title: 'Workouts', state: 'workouts',<|fim▁hole|> po...
type: 'dropdown',
<|file_name|>text.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%h...
text_decoration_thickness: unwrap_or_initial!(text_decoration_thickness, thickness),
<|file_name|>TestPostWater.java<|end_file_name|><|fim▁begin|>package clockworktest.water; import com.clockwork.app.SimpleApplication; import com.clockwork.audio.AudioNode; import com.clockwork.audio.LowPassFilter; import com.clockwork.effect.ParticleEmitter; import com.clockwork.effect.ParticleMesh;<|fim▁hole|>import ...
import com.clockwork.input.KeyInput; import com.clockwork.input.controls.ActionListener; import com.clockwork.input.controls.KeyTrigger; import com.clockwork.light.DirectionalLight;
<|file_name|>bomber.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "io"<|fim▁hole|> "github.com/jessevdk/go-flags" "bom" ) func addBom(r io.Reader, w io.Writer, target bom.BOM) { buf := make([]byte, 1024) c, _ := r.Read(buf) if c == 0 { return } b := bom.GetBom(buf) if b == bom.NOTBOM { ...
"os"
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/* * @license Apache-2.0 * * Copyright (c) 2021 The Stdlib 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.apac...
* Unless required by applicable law or agreed to in writing, software
<|file_name|>comboboxes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Customized combobox widgets""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable...
self.setSizeAdjustPolicy(QComboBox.AdjustToContents) else: self.setSizeAdjustPolicy(QComboBox.AdjustToMinimumContentsLength)
<|file_name|>test_model.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-----------...
<|file_name|>remote.logout.js<|end_file_name|><|fim▁begin|>/*! * Module dependencies. */ var Command = require('./util/command'), phonegapbuild = require('./util/phonegap-build'), util = require('util'); /*! * Command setup. */ module.exports = { create: function(phonegap) { return new Remote...
* * Options: * * - `options` {Object} is unused and should be `{}`.
<|file_name|>solution.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import re a = [[0 for x in range(25)] for y in range(13)] f=open("../distrib/spiral.txt","r") s=f.readline().strip() dx, dy = [0, 1, 0, -1], [1, 0, -1, 0] x, y, c = 0, -1, 1 l=0 for i in range(13+13-1): if i%2==0: for j in range((2...
c += 1
<|file_name|>ProjectsRouter.ts<|end_file_name|><|fim▁begin|>'use strict'; import ProjectsController from '../controllers/ProjectsServerController'; import ProjectsPolicy from '../policies/ProjectsPolicy'; class ProjectsRouter { public static getInstance() { return this.instance || (this.instance = new this()); } ...
app.route('/api/projects/for/program/:programId').get(ProjectsController.getProjectForPrograms);
<|file_name|>mysql_001.py<|end_file_name|><|fim▁begin|>""" Installs and configures MySQL """ import uuid import logging from packstack.installer import validators from packstack.installer import utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
elif config['CONFIG_NOVA_INSTALL'] != 'n': #In that remote case that we have lot's of nova hosts
<|file_name|>actions.spec.js<|end_file_name|><|fim▁begin|>import test from 'tape' import { forEach, get, isArray, isMatch, isNumber, omit } from 'lodash' import { entityDel, ENTITY_DEL, entityPut, ENTITY_PUT, entityPutAll, ENTITY_PUTALL, entityUpdate, ENTITY_UPDATE, pickTypeId, tripleDel, TRIPLE_DEL, triplePut, TRI...
<|file_name|>0004_migrate_data_20190508.py<|end_file_name|><|fim▁begin|>import re from django.db import migrations def add_project_member(apps, schema_editor): # Using historical versions as recommended for RunPython PublicDataAccess = apps.get_model("public_data", "PublicDataAccess") DataRequestProjectM...
PublicDataAccess = apps.get_model("public_data", "PublicDataAccess") db_alias = schema_editor.connection.alias for pda in PublicDataAccess.objects.using(db_alias).filter(data_source=None):
<|file_name|>friend_joined_email.py<|end_file_name|><|fim▁begin|>import datetime import logging import time from django.conf import settings from django.contrib.sites.models import Site from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.db.models...
<|file_name|>gltf_mesh.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************/ /* gltf_mesh.cpp */ /*************************************************************************/ /* This file i...
/* the following conditions: */
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![allow(non_upper_case_globals)] use actionable_events::ActionDispatcher; use std::{collections::BTreeMap, env, fs, io}; use tokio::sync::mpsc::{channel, Sender}; use utils::total_stats; #[macro_use] mod player_output; #[macro_use] mod serializable_flags; #[macro_use...
<|file_name|>bootstrap_node.go<|end_file_name|><|fim▁begin|>package start import ( "crypto/tls" "crypto/x509/pkix" "fmt" "io/ioutil" "os" "path/filepath" "time" "github.com/golang/glog" kapi "k8s.io/kubernetes/pkg/api" kerrors "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/apis/certificates" k...
glog.V(2).Infof("Bootstrap signing rejected (%s): %s", deny.Reason, deny.Message) return false, fmt.Errorf("certificate signing request rejected (%s): %s", deny.Reason, deny.Message) } if approved := hasCSRCondition(csr.Status.Conditions, certificates.CertificateApproved); approved != nil {
<|file_name|>recordsmodel.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import typing as t from PyQt5.QtCore import ( Qt, QObject, QSortFilterProxyModel, QAbstractTableModel, QModelIndex, QVariant, ) from . import utils from . import settings COLUMN_DATE = 0 COLUMN_DURATION = 1 ...
The model using TinyDB for storing records.
<|file_name|>htmlinputelement.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 caseless::compatibility_caseless_match_str; use ...
&atom!("password") => InputType::InputPassword, _ => InputType::InputText, };