prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # shablona documentation build configuration file, created by # sphinx-quickstart on Tue Apr 14 10:29:06 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all pos...
<|file_name|>CookieRewriteEngine.java<|end_file_name|><|fim▁begin|>package m.c.m.proxyma.rewrite; import java.net.URL;<|fim▁hole|>import javax.servlet.http.Cookie; import m.c.m.proxyma.context.ProxyFolderBean; import m.c.m.proxyma.context.ProxymaContext; import m.c.m.proxyma.resource.ProxymaResource; /** * <p> * Th...
import java.util.logging.Logger;
<|file_name|>htmltabledatacellelement.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 dom::bindings::codegen::Bindings::HTMLTa...
}
<|file_name|>sbcsgroupprober.py<|end_file_name|><|fim▁begin|>######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial De...
SingleByteCharSetProber(Latin5CyrillicModel), SingleByteCharSetProber(MacCyrillicModel),
<|file_name|>valve_acl.py<|end_file_name|><|fim▁begin|>"""Compose ACLs on ports.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--...
output_actions.extend(vlan_actions)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod tank;<|fim▁hole|><|fim▁end|>
pub mod terrain;
<|file_name|>linereport_test.js<|end_file_name|><|fim▁begin|>if (typeof process !== "undefined") { require("amd-loader"); require("../../test/setup_paths"); } define(function(require, exports, module) { var assert = require("assert"); var report = require("./linereport_base"); module.exports = { "te...
"test parse two lines" : function(next) {
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import pypm, sys, time DEV_NAME = 'nanoPAD2 MIDI 1' OUT_NAME = 'fs' #OUT_NAME = 'MIDI IN' #OUT_NAME = 'Synth input port (20116:0)' FIRST_NOTE = 24 + 4 # E, not C SECOND_NOTE = FIRST_NOTE + 5 PADS1 = range(51, 35, -2) PADS2 = range(50, 34, -2) shorte...
midi_out.Write([[[0xe0+0, 0, 0x40 + note1 * 0x4, c], pypm.Time()]]) midi_out.Write([[[0xe0+1, 0, 0x40 + note2 * 0x4, c], pypm.Time()]]) #print [i if p else 0 for i, p in zip(range(1, 8+2), pads1_pressed)]
<|file_name|>linalg.py<|end_file_name|><|fim▁begin|>"""Lite version of scipy.linalg. Notes ----- This module is a lite version of the linalg.py module in SciPy which contains high-level Python interface to the LAPACK library. The lite version only accesses the following LAPACK functions: dgesv, zgesv, dgeev, zgeev, d...
satisfies ``U.H = inv(U)``.
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { NgModule, ErrorHandler } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; import { MyApp } from './app.component'; import { ScanPage } from '../page...
export class AppModule {}
<|file_name|>route.rs<|end_file_name|><|fim▁begin|>use router::criterion::*; use hyper::method::{Method as hyperMethod}; use hyper::server::{Request, Response}; <|fim▁hole|> criteria: Vec<Criterion>, handler: BoxedHandler } impl Route { pub fn new(handler: BoxedHandler) -> Self { return Route{criteria: Vec::new(),...
pub type BoxedHandler = Box<for <'a> Fn(Request, Response) + Send + Sync>; pub struct Route {
<|file_name|>APropertyTable.java<|end_file_name|><|fim▁begin|>package com.canoo.ant.table; import com.canoo.ant.filter.AllEqualsFilter; import com.canoo.ant.filter.AllFilter; import com.canoo.ant.filter.ITableFilter; import org.apache.log4j.Logger; import java.io.File; import java.io.IOException; import java.util.*; ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># Mostly from http://peterdowns.com/posts/first-time-with-pypi.html from distutils.core import setup setup( name = 'pmdp',<|fim▁hole|> version = '0.3', description = 'A poor man\'s data pipeline', author = 'Dan Goldin', author_email = 'dangoldin@gmail.com', ...
packages = ['pmdp'],
<|file_name|>log.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ celery.utils.log ~~~~~~~~~~~~~~~~ Logging utilities. """ from __future__ import absolute_import, print_function import logging import numbers import os import sys import threading import traceback from contextlib import context...
<|file_name|>test_progressbar.py<|end_file_name|><|fim▁begin|>import os.path as op import numpy as np from numpy.testing import assert_array_equal import pytest from mne.parallel import parallel_func from mne.utils import ProgressBar, array_split_idx, use_log_level def test_progressbar(): """Test progressbar cl...
pbar = ProgressBar(a) assert a is pbar.iterable assert pbar.max_value == 10
<|file_name|>handler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """signal handlers registered by the imager_profile app""" from __future__ import unicode_literals from django.conf import settings from django.db.models.signals import post_save from django.db.models.signals import pre_delete from django.disp...
"ImagerProfile instance not deleted for {}. " "Perhaps it does not exist?"
<|file_name|>experimentHandler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Demo of class data.ExperimentHandler """ from psychopy import data, logging from numpy import random logging.console.setLevel(logging.DEBUG) exp = data.ExperimentHandler(name='testExp', ve...
for trial in training: training.addData('training.rt', random.random() * 0.5 + 0.5)
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>// Copyright 2021 The Grin Developers // // 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-...
/// Eliminate some of the boilerplate of serialization (package ser) by /// passing directly pairs of writer function and data to write. /// Example before:
<|file_name|>daq_device_info.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, print_function from builtins import * # @UnusedWildImport from mcculw import ul from mcculw.ul import ULError from mcculw.enums import (BoardInfo, InfoType, ErrorCode, EventType, Ex...
return self._dio_info
<|file_name|>versions_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" "k8s.io/kubernetes/pkg/util/version"
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-03-18 10:05 from __future__ import unicode_literals import datetime from django.db import migrations, models import django.db.models.deletion import modelcluster.contrib.taggit import modelcluster.fie...
migrations.AddField( model_name='blogpagetag', name='tag',
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|># Copyright 2012 Big Switch Networks, 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...
def _get_all_data(self, get_ports=True, get_floating_ips=True, get_routers=True):
<|file_name|>backend.py<|end_file_name|><|fim▁begin|># gcp xml backend # Copyright (C) 2012 Jesse van den Kieboom <jessevdk@gnome.org> # # 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 v...
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>specialerrors.py<|end_file_name|><|fim▁begin|>import sys from remoteserver import DirectResultRemoteServer class SpecialErrors(object): def continuable(self, message, traceback): return self._special_error(message, traceback, continuable=True) def fatal(self, message, traceback): ...
return {'status': 'FAIL', 'error': message, 'traceback': traceback, 'continuable': continuable, 'fatal': fatal}
<|file_name|>Production5628.java<|end_file_name|><|fim▁begin|>package org.gradle.test.performance.mediummonolithicjavaproject.p281; public class Production5628 { private String property0; public String getProperty0() { return property0; } public void setProperty0(String value) { ...
private String property2;
<|file_name|>analyzeBundle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os bundleFilesDir = 'tmp/bundleSizeDownloads' yarnLockFile = 'yarn.lock' packagesFile = 'package.json' def isDividerLine(line): # At least 80 chars, all slashes except the last (which is newline). The number is inconsistent f...
<|file_name|>struct-literal-in-if.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apach...
struct Foo { x: int,
<|file_name|>bitcoin_fa.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Babylonian</source> ...
<location line="+3"/>
<|file_name|>TillDeaf.java<|end_file_name|><|fim▁begin|>package org.bitspilani.pearl; import android.app.Activity; import android.os.Bundle; import android.view.Window; import android.widget.TextView; public class TillDeaf extends Activity { protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generat...
tv1.setText(R.string.tilldeaf_ds); } }
<|file_name|>platform.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. *---------...
let _isWeb = false; let _locale: string | undefined = undefined;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Trait Resolution. See the [rustc-dev-guide] for more information on how this works. //! //! [rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html mod engine; pub mod error_reporting; mod project; mod structural_impls; pub mod util; use rus...
pub fn misc( span: Span,
<|file_name|>comp-1119.component.spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { async, ComponentFixture, TestBed } fr...
<|file_name|>zelos.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * @fileoverview Zelos theme. */ 'use strict'; /** * Zelos theme. * @namespace Blockly.Themes.Zelos */ goog.module('Blockly.Themes.Zelos'); const {Theme} = goog.require('...
'colourSecondary': '#0DA57A', 'colourTertiary': '#0B8E69', },
<|file_name|>s3.py<|end_file_name|><|fim▁begin|>import os import mimetypes import warnings try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.co...
IS_GZIPPED = getattr(settings, 'AWS_IS_GZIPPED', False) GZIP_CONTENT_TYPES = getattr(settings, 'GZIP_CONTENT_TYPES', (
<|file_name|>ClipboardTest.js<|end_file_name|><|fim▁begin|>asynctest( 'browser.tinymce.plugins.table.ClipboardTest', [ 'ephox.agar.api.Pipeline', 'ephox.mcagar.api.LegacyUnit', 'ephox.mcagar.api.TinyLoader', 'tinymce.core.util.Tools', 'tinymce.plugins.table.Plugin', 'tinymce.themes.modern.Th...
cleanTableHtml(editor.getContent()),
<|file_name|>ovirt_quota_facts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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 published by # the ...
# You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. #
<|file_name|>sale_order.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import timedelta from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError class SaleOrder(models.Model): ...
order_lines = [(5, 0, 0)] for line in template.sale_order_template_line_ids: data = self._compute_line_data_for_template_change(line)
<|file_name|>MeshBuilder.cpp<|end_file_name|><|fim▁begin|>/** @file MeshBuilder.cpp @maintainer Morgan McGuire, matrix@graphics3d.com @created 2002-02-27 @edited 2005-02-24 */ #include "G3D/MeshBuilder.h" #include "G3D/MeshAlg.h" namespace G3D { void MeshBuilder::setName(const std::string& n) { name ...
if (_twoSided) { triList.append(c, b, a); } }
<|file_name|>polishNotation.py<|end_file_name|><|fim▁begin|>#The new version is in polishNotation2.py. Use that version instead of using this version. #To do: #Find out how to split a string using matches of a regular expression as the separator. #Test everything in polyglotCodeGenerator.py #Use re.match(expr...
[["<<item>> is in <<array>>", "<<array>> contains <<item>>"], "(<<item>> in <<array>>)", "final"], #If it ends in "final", then the output string is directly returned. [["not <<x>>", "! <<x>>"], "Not(<<x>>)", "final"], [["replace each <<contained>> in <<container>> with <<replacement>>", "replace every <<contained>> in...
<|file_name|>bdgbroadcall_cmd.py<|end_file_name|><|fim▁begin|># Time-stamp: <2019-09-25 10:04:48 taoliu> """Description: Fine-tuning script to call broad peaks from a single bedGraph track for scores. This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file...
bf = open ( os.path.join( options.outdir, "%s_c%.1f_C%.2f_l%d_g%d_G%d_broad.bed12" % (options.oprefix,options.cutoffpeak,options.cutofflink,options.minlen,options.lvl1maxgap,options.lvl2maxgap)), "w" ) bpeaks.write_to_gappedPeak(bf, name_prefix=(options.oprefix+"_broadRegion").encode(), score_column="score"...
<|file_name|>calc2.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 Pierre Talbot (IRCAM) // 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|>test_smtplib.py<|end_file_name|><|fim▁begin|>import asyncore import email.mime.text from email.message import EmailMessage from email.base64mime import body_encode as encode_base64 import email.utils import socket import smtpd import smtplib import io import re import sys import time import select import e...
<|file_name|>solutions.py<|end_file_name|><|fim▁begin|>__problem_title__ = "Comfortable distance" __problem_url___ = "https://projecteuler.net/problem=364" __problem_description__ = "There are seats in a row. people come after each other to fill the " \ "seats according to the following rules:...
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>import bleach from django.db.models.fields import TextField from django.utils.encoding import smart_text from .widgets import RichTextareaWidget class RichTextarea(TextField): """ """<|fim▁hole|> """ """ if value: html = ...
def to_python(self, value):
<|file_name|>ISpiritHealer.java<|end_file_name|><|fim▁begin|>package li.cryx.minecraft.death; import java.util.logging.Logger; import li.cryx.minecraft.death.i18n.ITranslator; import li.cryx.minecraft.death.persist.AbstractPersistManager; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.enti...
ITranslator getTranslator();
<|file_name|>start.ts<|end_file_name|><|fim▁begin|>import { navigator, window } from 'global'; import addons, { DecorateStoryFunction, Channel } from '@storybook/addons'; import createChannel from '@storybook/channel-postmessage'; import { ClientApi, ConfigApi, StoryStore } from '@storybook/client-api'; import Events ...
// Handle keyboard shortcuts
<|file_name|>conferencing.py<|end_file_name|><|fim▁begin|>"Conferencing code" # XXX A relatively simple enhancement to this would be to store the # volumes for each source in the conference, and use an exponential # decay type algorithm to determine the "loudest". from shtoom.doug.source import Source from twisted....
def getAudioForRoom(self):
<|file_name|>ring.py<|end_file_name|><|fim▁begin|>from bisect import bisect from uhashring.ring_ketama import KetamaRing from uhashring.ring_meta import MetaRing class HashRing: """Implement a consistent hashing ring.""" def __init__(self, nodes=[], **kwargs): """Create a new HashRing given the impl...
self.runtime._nodes[nodename] = conf return conf_changed
<|file_name|>0011_drop_old_slug.py<|end_file_name|><|fim▁begin|>from south.db import db from django.db import models from albums.models import * class Migration: def forwards(self, orm): # Deleting field 'AlbumItem.slug' db.delete_column('albums_albumitem', 'slug') ...
<|file_name|>root.py<|end_file_name|><|fim▁begin|>''' Puck: FreeBSD virtualization guest configuration server Copyright (C) 2011 The Hotel Communication Network inc. This program 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 Fre...
user = Users.first(username=post['user.username'], password=hash_password)
<|file_name|>pm.js<|end_file_name|><|fim▁begin|>/* Copyright 2019-2022 Michael Pozhidaev <msp@luwrain.org> This file is part of LUWRAIN. <|fim▁hole|> 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...
LUWRAIN is free software; you can redistribute it and/or
<|file_name|>rpcbind_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test for -rpcbind, as well as -rpcallowip and -...
assert_equal(set(get_bind_addrs(pid)), set(expected)) finally:
<|file_name|>registry_init.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Load all flows so that they are visible in the registry.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals # pylint: disable=unused-import # These imports populate the Flo...
from grr_response_server.flows.general import network
<|file_name|>loadbalancerloadbalancingrules.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 co...
}
<|file_name|>mesh.py<|end_file_name|><|fim▁begin|>#import matplotlib.pyplot as plt import numpy as np from collections import deque import numbers """ Created on Jun 29, 2016 @author: hans-werner """ def convert_to_array(x, dim=None, return_is_singleton=False): """ Convert point or list of points to a numpy ...
<|file_name|>test_docs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Doctest runner for 'birdhousebuilder.recipe.adagucserver'. """ __docformat__ = 'restructuredtext' import os import sys import unittest import zc.buildout.tests import zc.buildout.testing <|fim▁hole|> doctest.NORMALIZE_WHI...
from zope.testing import doctest, renormalizing optionflags = (doctest.ELLIPSIS |
<|file_name|>make.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import subprocess import os class MakeException(Exception): pass def swapExt(path, current, replacement): path, ext = os.path.splitext(path) if ext == current: path += replacement return path else: raise M...
<|file_name|>LookupPool.java<|end_file_name|><|fim▁begin|>package com.openthinks.libs.utilities.lookup; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Optional; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLo...
* * @throws CheckerNoPassException when not found implementation SPI
<|file_name|>scatter.py<|end_file_name|><|fim▁begin|>""" Generic, configurable scatterplot """ import collections import warnings import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd import seaborn as sns class PlottingAttribute(object): __slots__ = 'groupby', 'title',...
<|file_name|>test_server.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010-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 # # http://www.apache.org/licenses/LICENS...
self.assertEquals(int(response.headers['x-container-object-count']), 0) req2 = Request.blank( '/sda1/p/a/c/o', environ={ 'REQUEST_METHOD': 'PUT',
<|file_name|>de.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'flash', 'de', { access: 'Skriptzugriff', accessAlways: 'Immer', accessNever: 'Nie', accessSameDoma...
alignTextTop: 'Text oben', bgcolor: 'Hintergrundfarbe',
<|file_name|>event_listeners.js<|end_file_name|><|fim▁begin|>var AWS = require('./core'); var SequentialExecutor = require('./sequential_executor'); /** * The namespace used to register global event listeners for request building * and sending. */ AWS.EventListeners = { /** * @!attribute VALIDATE_CREDENTIALS ...
this.service.endpoint, this.service.region );
<|file_name|>exception.py<|end_file_name|><|fim▁begin|># # exception.py - general exception formatting and saving # # Copyright (C) 2000-2013 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
"_intf._currentAction._spokes[\"CustomPartitioningSpoke\"]._storage_playground",
<|file_name|>hr_academic.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This prog...
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License
<|file_name|>gae_test.go<|end_file_name|><|fim▁begin|>// Copyright 2021 The LUCI 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...
marshal := func(m proto.Message) []byte { b, err := proto.Marshal(m) if err != nil {
<|file_name|>GetVgroupsAddonsStaffResponse.java<|end_file_name|><|fim▁begin|>package ru.lanbilling.webservice.wsdl; import java.util.ArrayList; import java.util.List; import javax.annotation.Generated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.b...
<|file_name|>WebCLGLVertexFragmentProgram.class.js<|end_file_name|><|fim▁begin|>/** * WebCLGLVertexFragmentProgram Object * @class * @constructor */ WebCLGLVertexFragmentProgram = function(gl, vertexSource, vertexHeader, fragmentSource, fragmentHeader) { this.gl = gl; var highPrecisionSupport = this.gl.getShaderPre...
'vec2 get_global_id() {\n'+ 'return vec2(0.0, 0.0);\n'+ '}\n'+
<|file_name|>bitfield.hh<|end_file_name|><|fim▁begin|>#pragma once #include <type_traits> #include <limits> #include <utility> namespace sio { template<typename T> struct is_bit_enum: public std::false_type {}; template<typename Enum, std::enable_if_t<std::is_enum<Enum>{}, int> = 0> class bitfield { public: ...
constexpr bool operator!=(bitfield rhs) const noexcept { return bits != rhs.bits; }
<|file_name|>simulated.rs<|end_file_name|><|fim▁begin|>use std::collections::VecDeque; use std::io; use std::io::{Read, Write}; use std_streams::StdStreams; /// Simulated handles for the standard input streams of a process. /// /// Simulated input can be provided using /// [`write_input()`](std_streams/struct.Simulate...
<|file_name|>synchronizing_consumer.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com> * * This file is part of CasparCG (www.casparcg.com). * * CasparCG is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as pub...
<|file_name|>combat.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Tuxemon # Copyright (C) 2014, William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon. # # Tuxemon is free software: you can redistribute it and/...
<|file_name|>Transformer.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2006 - 2012 Vienna University of Technology, * Department of Software Technology and Interactive Systems, IFS * * Licensed under the Apache License, Version ...
******************************************************************************/ package eu.scape_project.planning.model.transform;
<|file_name|>MissionPlanner.java<|end_file_name|><|fim▁begin|>/* * Kerbal Space App * * Copyright (C) 2014 Jim Pekarek (Amagi82) * * 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,...
long itemId = mAdapter.getItemId(position); mItemIdTopMap.put(itemId, child.getTop()); } }
<|file_name|>bank.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 Alex Nitz, Josh Willis, Andrew Miller # # 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, o...
tempoutplus[0:self.filter_length],
<|file_name|>programming_interface.hpp<|end_file_name|><|fim▁begin|>/* * Nana GUI Programming Interface Implementation * Nana C++ Library(http://www.nanapro.org) * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_...
static_assert(std::is_convertible<Widget, ::nana::widget>::value, "enum_widgets<Widget>: The specified Widget is not a widget type."); typedef ::nana::detail::basic_window core_window_t; auto & brock = ::nana::detail::bedrock::instance();
<|file_name|>test_CVE_2017_17724.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import system_tests class TestFuzzedPoC(metaclass=system_tests.CaseMeta): url = [ "https://github.com/Exiv2/exiv2/issues/210", "https://github.com/Exiv2/exiv2/issues/209" ] filename = system_tests.p...
"$exiv2 -pS $filename", "$exiv2 $filename"
<|file_name|>application_gateway_http_listener_py3.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license i...
<|file_name|>Utils.java<|end_file_name|><|fim▁begin|>package com.kromracing.runningroute.client; import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.CheckBox; import com.google.gwt.user.client.ui.Widget; final public class Utils { private Utils() {...
} }
<|file_name|>exchange_errors.py<|end_file_name|><|fim▁begin|>import sys import traceback from catalyst.errors import ZiplineError def silent_except_hook(exctype, excvalue, exctraceback): if exctype in [PricingDataBeforeTradingError, PricingDataNotLoadedError, SymbolNotFoundOnExchange, NoDataAv...
class PricingDataNotLoadedError(ZiplineError): msg = ('Missing data for {exchange} {symbols} in date range ' '[{start_dt} - {end_dt}]'
<|file_name|>jquery.bxslider.js<|end_file_name|><|fim▁begin|>/** * BxSlider v4.1.2 - Fully loaded, responsive content slider * http://bxslider.com * * Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com * Written while drinking Belgian ales and listening to jazz * * Released und...
slider.controls.prev.bind('click', clickPrevBind); // if nextSlector was supplied, populate it if(slider.settings.nextSelector){
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google # # 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/licenses/LICENSE-2.0 # # Unless requi...
return f'{n_shots // 1000}k' return str(n_shots) def _abbrev_grid_qubit(qubit: cirq.GridQubit) -> str:
<|file_name|>ComplianceStatus.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at *...
} // namespace Model } // namespace SecurityHub } // namespace Aws
<|file_name|>read_test.py<|end_file_name|><|fim▁begin|>from tests.api import auth_for from tests.data import add_fixtures, clubs, users def test_lva(db_session, client): lva = clubs.lva(owner=users.john()) add_fixtures(db_session, lva) res = client.get("/clubs/{id}".format(id=lva.id)) assert res.stat...
res = client.get("/clubs/{id}".format(id=sfn.id))
<|file_name|>0048_ramp.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-17 19:24 from __future__ import unicode_literals import c3nav.mapdata.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dep...
<|file_name|>Stack.cpp<|end_file_name|><|fim▁begin|>#include "logger/Stack.hpp" using namespace logger; /////////////////////////////////////// <|fim▁hole|>{ if (stack.empty()) return ioOut; std::deque<std::string>::const_iterator dequeIt; for(dequeIt = stack.begin(); dequeIt != stack.end(); ++dequeIt) { ...
std::ostream& operator<<(std::ostream& ioOut, const Stack& stack)
<|file_name|>minters.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2016 CERN. # # Zenodo 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 versio...
# You should have received a copy of the GNU General Public License # along with Zenodo; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
<|file_name|>cotizacion_item_recursos_humanos.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2015, Daniel and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe<|fim▁hole|>class CotizacionItemRecursosHumanos(Document): pass<|fi...
from frappe.model.document import Document
<|file_name|>match-disc-bot.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
// error-pattern:quux fn f() -> ! { panic!("quux") }
<|file_name|>pinned_events.rs<|end_file_name|><|fim▁begin|>//! Types for the [`m.room.pinned_events`] event. //! //! [`m.room.pinned_events`]: https://spec.matrix.org/v1.2/client-server-api/#mroompinned_events use ruma_macros::EventContent; use serde::{Deserialize, Serialize}; use crate::EventId; /// The content of ...
} }
<|file_name|>main.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 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 required by ap...
exit.Return(1) }
<|file_name|>CStaticGeometry.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************** * * PROJECT: Open Faction * LICENSE: See LICENSE in the top level directory * FILE: shared/CStaticGeometry.cpp * PURPOSE: Loading of static geometry in leve...
CString strFilename = Stream.ReadString2();
<|file_name|>test_repeatable.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import pytest from parglare import Parser, Grammar from parglare.exceptions import GrammarError, ParseError, RRConflicts def test_repeatable_zero_or_more(): """ Tests zero or more repeatable operator. """ grammar = "...
assert 'Expected: b' in str(e.value)
<|file_name|>batch.rs<|end_file_name|><|fim▁begin|>//! Module providing write batches use leveldb_sys::*; use libc::{c_char, size_t, c_void}; use std::slice; use options::{WriteOptions, c_writeoptions}; use super::error::Error; use std::ptr; use super::Database; #[allow(missing_docs)] struct RawWritebatch { ptr: ...
unsafe {
<|file_name|>manager.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2016 Canonical Ltd # # 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/LIC...
return False
<|file_name|>issue-84268.rs<|end_file_name|><|fim▁begin|>// compile-flags: -O --crate-type=rlib #![feature(platform_intrinsics, repr_simd)] extern "platform-intrinsic" { fn simd_fabs<T>(x: T) -> T; fn simd_eq<T, U>(x: T, y: T) -> U; } #[repr(simd)] pub struct V([f32; 4]); <|fim▁hole|>pub struct M([i32; 4]); ...
#[repr(simd)]
<|file_name|>public_api.ts<|end_file_name|><|fim▁begin|>export {FormlyJigsawHeaderModule} from './header.module';<|fim▁hole|><|fim▁end|>
export {FormlyFieldHeader} from './header.type';
<|file_name|>user.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Mirantis 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 re...
<|file_name|>brush.rs<|end_file_name|><|fim▁begin|>use crate::prelude::*; /// A `Brush` defines the fill pattern of shapes. /// The syntax allows to express fill patterns in several ways: /// /// * solid colors /// * colors with alpha channel /// * gradients of colors /// * gradients with directions /// * gradients wi...
<|file_name|>kendo.culture.kok.js<|end_file_name|><|fim▁begin|>/* * Kendo UI v2015.1.408 (http://www.telerik.com/kendo-ui)<|fim▁hole|>* Copyright 2015 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do no...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import<|fim▁hole|><|fim▁end|>
from .validates import *