prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>overload5.C<|end_file_name|><|fim▁begin|><|fim▁hole|>
template <class T> void foo(); // { dg-message "" } candidate
void (*bar)() = foo<void>;
void (*baz)() = foo; // { dg-error "" } can't deduce T<|fim▁end|> | // { dg-do assemble } |
<|file_name|>command.rs<|end_file_name|><|fim▁begin|>use std::error;
use clap;
use crate::config;
use super::executer::Executer;
use super::{Arguments, Program};
pub struct Command<'c> {
config: &'c config::command::Config,
program: Program<'c>,
args: Arguments<'c>,
}
impl<'c> Command<'c> {
pub fn ... | };
Command { |
<|file_name|>views.py<|end_file_name|><|fim▁begin|># coding=utf-8
import json
from django.utils.translation import ugettext_lazy as _
from django.http import HttpResponse
import django.views
from django.template import defaultfilters as template_filters
from horizon import tables
from horizon import exceptions
from ... | trends = api.cloudkittyclient(self.request).billings.get_consumer_trends(time_series, |
<|file_name|>asalist.py<|end_file_name|><|fim▁begin|>import collections
class AsaList(object):
@classmethod
def flatten(cls, lst):
"""<|fim▁hole|> yield x
else:
for x in AsaList.flatten(x):
yield x<|fim▁end|> | Returns Generator of non-iterable values
"""
for x in lst:
if not isinstance(x, collections.Iterable): |
<|file_name|>ticket.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
from rest_framework import viewsets
from rest_framework.decorators import action
from rest_framework.exceptions import MethodNotAllowed
from rest_framework.response import Response
from common.const.http import POST, PUT
from common.mixins.... |
__all__ = ['TicketViewSet']
|
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react';
class Main extends Component {
render() {<|fim▁hole|> return (
<main className='Main'>
<h1 className='Main-headline'>Web solutions focused on<br/>Simplicity & Reliability.</h1>
<h2 className='Main-su... | |
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>import sys
<|fim▁hole|> PYVERSION = 3<|fim▁end|> | PYVERSION = 2
if sys.version_info > (3,): |
<|file_name|>transpile.d.ts<|end_file_name|><|fim▁begin|>import { BuildContext, ChangedFile } from './util/interfaces';
import * as ts from 'typescript';
export declare function transpile(context: BuildContext): Promise<void>;
export declare function transpileUpdate(changedFiles: ChangedFile[], context: BuildContext): ... | writeInMemory: boolean;
sourceMaps: boolean; |
<|file_name|>VisualizeHistory.py<|end_file_name|><|fim▁begin|>import matplotlib, os, errno
# IF WE ARE ON SERVER WITH NO DISPLAY, then we use Agg:
#print matplotlib.get_backend()
if not('DISPLAY' in os.environ):
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
def visualize_history(hi, sho... | |
<|file_name|>constants.py<|end_file_name|><|fim▁begin|><|fim▁hole|>KEY_LEFT = "left"
KEY_INSERT = "insert"
KEY_HOME = "home"
KEY_END = "end"
KEY_PAGEUP = "pageup"
KEY_PAGEDOWN = "pagedown"
KEY_BACKSPACE = "backspace"
KEY_DELETE... | KEY_UP = "up"
KEY_DOWN = "down"
KEY_RIGHT = "right" |
<|file_name|>Post.js<|end_file_name|><|fim▁begin|>/**
* Created with JetBrains WebStorm.
* User: yujilong
* Date: 14-2-11
* Time: 上午11:08
* To change this template use File | Settings | File Templates.
*/
define(['jquery', 'util', 'post/PostContent'], function ($, util, PostContent) {
var Post = function (_id... | }
},
initTextContent : function(content){
var text = $('#' + content._id).find('textarea').val(); |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"flag"
"net"
"os"
"os/signal"
"syscall"
// "strings"
log "github.com/Sirupsen/logrus"
"github.com/miekg/dns"
)
var (
debug = flag.Bool("debug", false, "Debug")
listen = flag.String("listen", ":53", "Address to listen to (TCP... | loadAnswers()
watchSignals()
|
<|file_name|>closable_tcp_stream.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The tiny-http Contributors
//
// 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/l... |
impl Read for ClosableTcpStream {
fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> { |
<|file_name|>swarming_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license fo... | |
<|file_name|>Prob2_Part1.py<|end_file_name|><|fim▁begin|># Make sure you name your file with className.py
from hint.hint_class_helpers.find_matches import find_matches
class Prob2_Part1:
"""
Author: Shen Ting Ang
Date: 10/11/2016<|fim▁hole|> """
def check_attempt(self, params):
self.attempt ... | |
<|file_name|>opportunity_kraken.py<|end_file_name|><|fim▁begin|>from exchanges import helpers
from exchanges import kraken
from decimal import Decimal
### Kraken opportunities
#### ARBITRAGE OPPORTUNITY 1
def opportunity_1():
sellLTCbuyEUR = kraken.get_current_bid_LTCEUR()
sellEURbuyXBT = kraken.get_current_ask_XB... | sellEURbuyLTC = kraken.get_current_ask_LTCEUR()
sellLTCbuyXBT = kraken.get_current_ask_XBTLTC() |
<|file_name|>p109.rs<|end_file_name|><|fim▁begin|>//! [Problem 109](https://projecteuler.net/problem=109) solver.
#![warn(
bad_style,
unused,
unused_extern_crates,
unused_import_braces,
unused_qualifications,
unused_results
)]
use polynomial::Polynomial;
fn count_way(score: u32) -> u32 {
... | |
<|file_name|>test_switch.py<|end_file_name|><|fim▁begin|>"""Tests for AVM Fritz!Box switch component."""
from datetime import timedelta
from unittest.mock import Mock
from requests.exceptions import HTTPError
from homeassistant.components.fritzbox.const import (
ATTR_STATE_DEVICE_LOCKED,
ATTR_STATE_LOCKED,
... |
next_update = dt_util.utcnow() + timedelta(seconds=200)
async_fire_time_changed(hass, next_update) |
<|file_name|>Action2005.py<|end_file_name|><|fim▁begin|>"""2005_叫地主接口"""
import clr, sys
from action import *
from lang import Lang
clr.AddReference('ZyGames.Framework.Game')
clr.AddReference('ZyGames.Doudizhu.Lang')
clr.AddReference('ZyGames.Doudizhu.Model')
clr.AddReference('ZyGames.Doudizhu.Bll')
from ZyGam... | def __init__(self):
DataResult.__init__(self)
|
<|file_name|>panicking.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 std::any::Any;
use std::boxed::FnBox;
use std::cell::Re... | /// Set the thread-local panic hook
pub fn set_thread_local_hook(local: Box<FnBox(&Any)>) {
LOCAL_INFO.with(|i| *i.borrow_mut() = Some(PanicHandlerLocal { fail: local })); |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^$', 'blog.views.entry_list', name="entry-list"),
url(r'^archive/(?P<year>\d{4})/$', 'blog.views.entry_archive_year', name="year-archive"),
url(r'^archive/(?P<year>\d{4})/(?P<month>\d... | |
<|file_name|>volume_scanner.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the volume scanner objects."""
import unittest
from dfvfs.lib import errors
from dfvfs.path import fake_path_spec
from dfvfs.path import os_path_spec
from dfvfs.path import qcow_path_spec
from dfvfs.path... | This method can be used to prompt the user to provide VSS store identifiers.
|
<|file_name|>pretty.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>}
#[derive(Clone, Debug)]
pub enum UserIdentifiedItem {
ItemViaNode(ast::NodeId),
ItemViaPath(Vec<String>),
}<|fim▁end|> | use syntax::ast;
pub enum PpMode { |
<|file_name|>issue_4086.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | #[cfg(any())]
extern "C++" {} |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! af-cuda-interop package is to used only when the application intends to mix
//! arrayfire code with raw CUDA code.
use arrayfire::{handle_error_general, AfError};
use cuda_runtime_sys::cudaStream_t;
use libc::c_int;
extern "C" {
fn afcu_get_native_id(native_id:... | pub fn get_device_native_id(id: i32) -> i32 {
unsafe {
let mut temp: i32 = 0; |
<|file_name|>gene_set.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# Author: Francois-Jose Serra
# Creation Date: 2010/08/17 16:46:02
# easy_install fisher/ if not also in extra stats package
try:
from extra_stats.fisher import pvalue
except ImportError:
from fisher import pvalue
# in my extra_sta... | try:
genes1 = set (self.genes[:order_index (dico['thresh'].next())])
except ValueError: |
<|file_name|>switch.py<|end_file_name|><|fim▁begin|>"""Support for Firmata switch output."""
import logging
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_NAME
from homeassistant.core import HomeAssistant
from .const ... | )
from .entity import FirmataPinEntity
from .pin import FirmataBinaryDigitalOutput, FirmataPinUsedException |
<|file_name|>stop.go<|end_file_name|><|fim▁begin|>// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
//
// 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/LI... | |
<|file_name|>hir_id_validator.rs<|end_file_name|><|fim▁begin|>use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::sync::{par_iter, Lock, ParallelIterator};
use rustc_hir as hir;
use rustc_hir::def_id::{LocalDefId, CRATE_DEF_INDEX};
use rustc_hir::intravisit;
use rustc_hir::itemlikevisit::ItemLikeVisito... | }
|
<|file_name|>test_pep8.py<|end_file_name|><|fim▁begin|>from __future__ import with_statement
import unittest
import re
import os
import sys
import cStringIO as StringIO
from distutils.version import LooseVersion
import pep8
PEP8_VERSION = LooseVersion(pep8.__version__)
PEP8_MAX_OLD_VERSION = LooseVersion('1.0.1')
PEP... | relativepath = fullpath[len(ROOT) + 1:]
func_name = 'test_pep8./%s' % relativepath # Surprised invalid identifiers work.
closure.__name__ = func_name
setattr(Pep8TestCase, func_name, closure) |
<|file_name|>test_data.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2013)
#
# This file is part of GWSumm.
#
# GWSumm 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, ... | @empty_globalv_CHANNELS
def test_make_globalv_key(self):
fftparams = utils.get_fftparams(
'L1:TEST-CHANNEL', |
<|file_name|>matchesversiontest.py<|end_file_name|><|fim▁begin|>## begin license ##
#
# "Meresco Distributed" has components for group management based on "Meresco Components."
#
# Copyright (C) 2018, 2021 Seecr (Seek You Too B.V.) https://seecr.nl
# Copyright (C) 2021 Data Archiving and Network Services https://dans.k... | ## end license ## |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>// --------------------------------------------------------------------------------------------------------------------
//
// cloudfront-config.js - config for AWS CloudFront
//
// Copyright (c) 2011 AppsAttic Ltd - http://www.appsattic.com/
// Written by Andrew Chilt... | var data = {
Path : args.Path,
};
if ( args.CallerReference ) { |
<|file_name|>base.ts<|end_file_name|><|fim▁begin|>export default class BaseTitle {
constructor(public element: HTMLElement) { }
public normalizeWhitespace(title: string = ""): string {
return (title || "").trim().replace(/\s/g, " ");
}
get title(): string {
return this.element.title;<... | }
} |
<|file_name|>containers.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 MaidSafe.net limited.
//
// This SAFE Network Software is licensed to you under (1) the MaidSafe.net Commercial License,
// version 1.0 or later, or (2) The General Public License (GPL), version 3, depending on which
// licence you accepted on in... | Ok(ContainersReq {
app: AppExchangeInfo::clone_from_repr_c(&(*repr_c).app)?,
containers: containers_from_repr_c((*repr_c).containers, (*repr_c).containers_len)?, |
<|file_name|>here-now.py<|end_file_name|><|fim▁begin|>## www.pubnub.com - PubNub Real-time push service in the cloud.
# coding=utf8
## PubNub Real-time Push APIs and Notifications Framework
## Copyright (c) 2010 Stephen Blum
## http://www.pubnub.com/
import sys
from pubnub import PubnubTornado as Pubnub
publish_key... | |
<|file_name|>wrapper_traits.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/. */
#![allow(unsafe_code)]
use HTMLCanvasData;
use Layout... | } |
<|file_name|>LoginController.java<|end_file_name|><|fim▁begin|>package fr.pizzeria.admin.web;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServ... | } |
<|file_name|>backup_main_commands_test.py<|end_file_name|><|fim▁begin|>import unittest
import config_test
from backupcmd.commands import backupCommands
class BackupCommandsTestCase(unittest.TestCase):<|fim▁hole|> self.assertEqual(1,1)<|fim▁end|> | """Test commands passed to main script"""
def test_hyphen_r_option(self):
print 'Pending BackupCommandsTestCase' |
<|file_name|>th_logger.py<|end_file_name|><|fim▁begin|>#!C:\Python27\
"""th_logger.py holds logging handler and config for the Regression test"""
import logging
from testProperty import TEST_OUTPUT_PATH<|fim▁hole|>test_logger = logging.getLogger('TEST_HARNESS')
handler = logging.FileHandler(TEST_OUTPUT_PATH + 'runTest... | |
<|file_name|>variant-struct.rs<|end_file_name|><|fim▁begin|>pub enum Foo {<|fim▁hole|><|fim▁end|> | Bar {
qux: (),
}
} |
<|file_name|>TileGenericMachine.java<|end_file_name|><|fim▁begin|>/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (th... | @Override
public void update() { |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>mod fasta {
include!("../../fuzz_targets/_fasta.rs");
}
mod fastq {
include!("../../fuzz_targets/_fastq.rs");<|fim▁hole|>use std::env::args;
use std::fs::File;
use std::io::Read;
fn main() {
let mut data = vec![];
let filename = args().skip(1).next().u... | }
|
<|file_name|>ret_dv.cpp<|end_file_name|><|fim▁begin|># include "stdafx.h"
/***************************************************************************
**
** INVOCATION NAME: RET123DV
**
** PURPOSE: TO RETURN DELIMITED DATA VALUES STORED IN STRUCTURE
**
** INVOCATION METHOD: RET123DV(B_PTR,PRIM_DMS)
**... |
/* SET NXT_VSET OF ROW_DVH TO NEW_DV */
|
<|file_name|>simpleweapon.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright Tom SF Haines
#
# 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/licens... | # Create our gun node - both the gun and the ray used for shooting track this - allows for gun jitter, kick back etc...
parent = xml.find('parent') |
<|file_name|>multitrait.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<|fim▁hole|>// option. This fi... | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
<|file_name|>issue-31702.rs<|end_file_name|><|fim▁begin|>// run-pass
// aux-build:issue-31702-1.rs
// aux-build:issue-31702-2.rs
// this test is actually entirely in the linked library crates
extern crate issue_31702_1;<|fim▁hole|><|fim▁end|> | extern crate issue_31702_2;
fn main() {} |
<|file_name|>threejs_coordinator.ts<|end_file_name|><|fim▁begin|>/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache... | override setDomContainerRect(rect: Rect) { |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>'''
test.backend.svrtools.crypto.__init__
'''
import unittest
from my.backend import Backend
# from my.backend.crypto import is_this_the_correct_dollhouse_password
from my.globals.exceptions import WrongDollhousePasswordError
from my.miscellany import random_alph... | # Test is_this_the_correct_dollhouse_password() with a known-good password
# and then with a known-bad password
# '''
# for pw in (random_alphanum_string(20), '12345678', random_alphanum_string(10), '12345678'): |
<|file_name|>testSceneList.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import sys
sys.path.append("../../")
#import pyRay as ra
import pyRay.scene as scn
# TODO : how to pass arguments from function header?<|fim▁hole|>object2 = ("obj1",("f","f3"),[( "U","sdBox" ,"%s",("2",) ),( "S","sdSphere"... | object1 = ("obj1",(), [( "U","sdBox" ,"%s",((1.0,1.0,1.0),) ),( "S","sdSphere","%s",(1.2,) )]) |
<|file_name|>p052.rs<|end_file_name|><|fim▁begin|>//! [Problem 52](https://projecteuler.net/problem=52) solver.
#![warn(bad_style,
unused, unused_extern_crates, unused_import_braces,<|fim▁hole|>#[macro_use(problem)] extern crate common;
extern crate integer;
use integer::Integer;
fn compute() -> u32 {
le... | unused_qualifications, unused_results)]
|
<|file_name|>names.rs<|end_file_name|><|fim▁begin|>//! This example of boxcars extracts all the player names found in the "PlayerStats" property of the
//! header. This property may be absent in some replays or lack players that drop or join mid-game.
//! A more foolproof approach is to scour the network data for a spe... | |
<|file_name|>stack_sq.go<|end_file_name|><|fim▁begin|>package stack
/*
#include<stdio.h>
*/
import (
"bufio"
"errors"
"fmt"
"os"
)
const (
MAXSIZE int = 100
)
// var (
// stackArray [MAXSIZE]int
// )
type SqStack struct {
base int
top int
StackSize int
stackArray [MAXSIZE]int
}
//Init 初始化一... | |
<|file_name|>unity_impl.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 The Gulden developers
// Authored by: Malcolm MacLeod (mmacleod@gmx.com)
// Distributed under the GULDEN software license, see the accompanying
// file COPYING
//Workaround braindamaged 'hack' in libtool.m4 that defines DLL_EXPORT when buil... | if (fSPV)
{ |
<|file_name|>0003_rover.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-19 07:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('photos', '0002_auto_20160919_0737'),... | ('nasa_id', models.IntegerField(unique=True)),
('name', models.CharField(max_length=30)),
('landing_date', models.DateField()), |
<|file_name|>fixtures.py<|end_file_name|><|fim▁begin|>import logging
import os
import os.path
import shutil<|fim▁hole|>from six.moves import urllib
import uuid
from six.moves.urllib.parse import urlparse # pylint: disable=E0611,F0401
from test.service import ExternalService, SpawnedService
from test.testutil import ge... | import subprocess
import tempfile
import time |
<|file_name|>BoardModule.js<|end_file_name|><|fim▁begin|>var BoardVo = require(_path.src + "/vo/BoardVo.js");
var BoardDao = require(_path.src + "/dao/BoardDao.js");
var RoleDao = require(_path.src + "/dao/RoleDao.js");
module.exports.board = function($, el, param, req, next)
{
var template = this.getTemplate($, el);... | }); |
<|file_name|>moves-based-on-type-no-recursive-stack-closure.rs<|end_file_name|><|fim▁begin|>// Copyright 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-APA... | (f.c)(f, true);
//~^ ERROR: cannot borrow `*f` as mutable because |
<|file_name|>autoinstall.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import sys
import subprocess
class AutoInstall(object):
_loaded = set()
@classmethod
def find_module(cls, name, path, target=None):
if path is None and name not in cls._loaded:
cls._loaded.a... | return None |
<|file_name|>channels_base.py<|end_file_name|><|fim▁begin|>## See "d_bankfull" in update_flow_depth() ######## (2/21/13)
## See "(5/13/10)" for a temporary fix.
#------------------------------------------------------------------------
# Copyright (c) 2001-2014, Scott D. Peckham
#
# Sep 2014. Wrote new update_diver... | 'channel_water_x-section__domain_max_of_mean_depth': 'm',
'channel_water_x-section__domain_min_of_mean_depth': 'm',
'channel_water_x-section__domain_max_of_volume_flow_rate': 'm3 s-1',
'channel_water_x-section__domain_min_of_volume_flow_rate': 'm3 s-1', |
<|file_name|>server.js<|end_file_name|><|fim▁begin|>// server.js
// BASE SETUP
// =============================================================================
// call the packages we need
var express = require('express'); // call express
var app = express(); // define our app using e... | .get(function(req, res) {
// CFSOrg.find(function(err, result) {
// if (err) |
<|file_name|>ObjetoCompuesto.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|> numHijos = 0;
m1 = new GLfloat[16];
}
ObjetoCompuesto:: ~ObjetoCompuesto() {
for(int i =0; i < numHijos; i++) {
delete hijos[i];
}
}
void ObjetoCompuesto:: dibuja() {
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glMultMatrix... | #include "ObjetoCompuesto.h"
ObjetoCompuesto:: ObjetoCompuesto() {
hijos = new Objeto3D*[100000]; |
<|file_name|>pr22404.C<|end_file_name|><|fim▁begin|>/* { dg-do compile } */
/* { dg-options "-O2" } */
/* We were not getting the offset of a in B and a in C::B correct,
causing an abort. */
struct A { A(); };
struct B : A
{
A a;
};
struct C : B { };<|fim▁hole|><|fim▁end|> |
C c; |
<|file_name|>jvm.component.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>
export class JvmController {
tabs: Nav.HawtioTab[];
constructor(workspace: Jmx.Workspace) {
'ngInject';
this.tabs = [new Nav.HawtioTab('Remote', '/jvm/connect')];
if (hasLocalMBean(workspace)) {
this.tabs.push(n... | namespace JVM { |
<|file_name|>transcriptor.js<|end_file_name|><|fim▁begin|>var final_transcript = '';
var recognizing = false;
//var socket = io.connect('http://collab.di.uniba.it:48922');//"http://collab.di.uniba.it/~iaffaldano:48922"
//socket.emit('client_type', {text: "Speaker"});
if ('webkitSpeechRecognition' in window) {
var ... | var one_line = /\n/g; |
<|file_name|>SeverityConfigurationException.java<|end_file_name|><|fim▁begin|>package org.gw4e.eclipse.builder.exception;
/*-
* #%L
* gw4e
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2017 gw4e-project
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and asso... | }
} |
<|file_name|>bookmark_entity.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sync/test/fake_server/bookmark_entity.h"
<|fim▁hole|>#include <string>
#include "b... | |
<|file_name|>MIndustrialQuadRelayImpl.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2010-2016 by the respective copyright holders.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distributi... | * @generated NOT
*/
@Override
public void disable() { |
<|file_name|>parse.js<|end_file_name|><|fim▁begin|>'use strict';
exports.__esModule = true;
const moduleRequire = require('./module-require').default;
const extname = require('path').extname;
const fs = require('fs');
const log = require('debug')('eslint-plugin-import:parse');
function getBabelEslintVisitorKeys(pars... | }
return null; |
<|file_name|>praznici.spec.ts<|end_file_name|><|fim▁begin|>import { PrazniciProvider } from './praznici';
let praznici: PrazniciProvider = null;
describe('PrazniciProvider', () => {
beforeEach(() => {
praznici = new PrazniciProvider();
// spyOn(praznici['storage'], 'set').and.callThrough();
});
it('ret... | }); |
<|file_name|>chip.cc<|end_file_name|><|fim▁begin|>// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/autofill_assistant/browser/chip.h"
#include "components/autofill_assistant/browser/... | |
<|file_name|>test_autoscaler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
This script constructs an Marathon application definition for the stress tester container.
Be sure to deploy the latest stress tester docker image to the registry before running this.
"""
import argparse
import json
import os
import... | parser = argparse.ArgumentParser(description="Stress Tester Deployer") |
<|file_name|>ban.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2014-2016, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code m... | ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,5)));
ASSERT_TRUE(server.unblock_ip(MAKE_IP(1,2,3,4)));
ASSERT_TRUE(server.unblock_ip(MAKE_IP(1,2,3,5)));
|
<|file_name|>headergen.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright (C) 2010-2011 Marcin Kościelnicki <koriakin@0x04.net>
# Copyright (C) 2010 Luca Barbieri <luca@luca-barbieri.com>
# Copyright (C) 2010 Marcin Slusarz <marcin.slusarz@gmail.com>
# All Rights Reserved.
#
# Permission is hereby gran... | printbitfield(bitfield, 0)
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from .pidSVG import *<|fim▁end|> | # simple __init__.py
|
<|file_name|>characterize.py<|end_file_name|><|fim▁begin|>import re<|fim▁hole|>
import mpl_tools
import vtk_tools
def load_pdb(name):
with open(name+'.pdb') as fp:
points = []
conns = []
for line in fp:
if line.startswith('HET'):
pattern = r'(-?\d+.\d\d\d)'
... | import numpy as np
from scipy import ndimage, spatial
import bresenham |
<|file_name|>MessageStreamDecoder.java<|end_file_name|><|fim▁begin|>/*
* Created on Jan 25, 2005
* Created by Alon Rohter
* Copyright (C) 2004-2005 Aelitis, 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 pu... | public int getProtocolBytesDecoded();
/** |
<|file_name|>FurtherBasicBeanPane.java<|end_file_name|><|fim▁begin|>package com.fr.design.beans;
import com.fr.stable.StringUtils;
/**
*
* @author zhou
* @since 2012-5-30下午12:12:42
*/
public abstract class FurtherBasicBeanPane<T> extends BasicBeanPane<T> {
/**
* 是否是指定类型
* @param ob 对象
* @retu... | |
<|file_name|>audioRecorder.js<|end_file_name|><|fim▁begin|>import { AudioEncoder } from './audioEncoder';
const getUserMedia = ((navigator) => {
if (navigator.mediaDevices) {
return navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
}
const legacyGetUserMedia = navigator.getUserMedia
|| navigato... | }
async start(cb) { |
<|file_name|>test_requestor.py<|end_file_name|><|fim▁begin|>import datetime
import unittest2
import urlparse
from mock import Mock, ANY
import svb
from svb.six.moves.urllib import parse
from svb.test.helper import SvbUnitTestCase
VALID_API_METHODS = ('get', 'post', 'delete', 'patch')
class GMT1(datetime.tzinfo):... |
requestor.request('get', self.valid_path, {})
self.check_call('get', headers=APIHeaderMatcher( |
<|file_name|>p11.py<|end_file_name|><|fim▁begin|>import urllib.request
import time
preço = 99.99 #algum valor maior
while preço >= 4.74:
pagina = urllib.request.urlopen(
'http://beans.itcarlow.ie/prices-loyalty.html')
texto = pagina.read().decode('utf8')
onde = texto.find('>$')
início = on... | print ('Comprar! Preço: %5.2f' %preço) |
<|file_name|>jquery.js<|end_file_name|><|fim▁begin|>/*
* jQuery - New Wave Javascript
*
* Copyright (c) 2006 John Resig (jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* $Date: 2006-10-27 23:14:48 -0400 (Fri, 27 Oct 2006) $
* $Rev: 509 $
*/
// G... | |
<|file_name|>test_composer4to5.py<|end_file_name|><|fim▁begin|>from axiom.test.historic.stubloader import StubbedTest
from xquotient.compose import Composer, Drafts
class ComposerUpgradeTestCase(StubbedTest):
"""
Test that the Composer no longer has a 'drafts' attribute, that no Drafts
items have been cr... | def test_upgrade(self):
composer = self.store.findUnique(Composer) |
<|file_name|>events.js<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////////////
////// Events
////////////////////////////////////////////////////////////////////////////////////
'use strict';
// DI
var db,
responseHandler;
/**
*
* @param req the HTTP reques... | * @param req the HTTP requests, contains header and body parameters
* @param res the callback to which send HTTP response
* @param next facilitate restify function chaining |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for bugsnag_demo project.
It exposes the WSGI callable as a module-level variable named ``application``.
<|fim▁hole|>For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault... | |
<|file_name|>comp-2181.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|>script.rs<|end_file_name|><|fim▁begin|>extern crate base64;
extern crate bytes;
extern crate futures;
extern crate sodiumoxide;
extern crate serde_json;
extern crate tokio_core;
extern crate tokio_io;
extern crate tokio_proto;
extern crate tokio_process;
extern crate tokio_service;
use std;
use std::error... | } |
<|file_name|>topictypes.go<|end_file_name|><|fim▁begin|>package eventgrid
// 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 License ... | }
|
<|file_name|>pad.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2019-2020 François Laignel <fengalin@free.fr>
// Copyright (C) 2020 Sebastian Dröge <sebastian@centricular.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License ... | ) -> BoxFuture<'static, Result<FlowSuccess, FlowError>> { |
<|file_name|>BaseModule.ts<|end_file_name|><|fim▁begin|>///<reference path="../../node_modules/grafana-sdk-mocks/app/headers/common.d.ts" />
import angular from 'angular';
import { MetricsPanelCtrl } from 'app/plugins/sdk';
import { BaseParser } from './BaseParser';
abstract class BasePanelCtrl extends MetricsPanelCtr... | };
}
onInitPanelActions(actions) { |
<|file_name|>markdown_checklist.py<|end_file_name|><|fim▁begin|>#Library avaiable here: https://github.com/FND/markdown-checklist
import re
from markdown.extensions import Extension<|fim▁hole|>
def makeExtension(configs=[]):
return ChecklistExtension(configs=configs)
class ChecklistExtension(Extension):
de... | from markdown.preprocessors import Preprocessor
from markdown.postprocessors import Postprocessor
|
<|file_name|>test_scan.py<|end_file_name|><|fim▁begin|># Copyright 2016 Rudrajit Tapadar
#
# 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|># Unless required by applicable l... | #
# http://www.apache.org/licenses/LICENSE-2.0
# |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># """Django Actions Log settings file."""
#
from __future__ import unicode_literals
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
CREATE = 100
SUCCESS = 110
ACTIVATE = 130
AUTH = 150
VIEW = 180
UPDATE = 200
SUSPEND = 250... | (SUCCESS, _("success")),
(ACTIVATE, _("activate")),
(AUTH, _("authorize")),
(VIEW, _("view")), |
<|file_name|>globs.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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/licenses/... | fn g() {
let _: u32 = $i();
let _: () = f();
$j(); |
<|file_name|>go_thrift_gen.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
... | all_sources = list(target.sources_relative_to_buildroot())
if len(all_sources) != 1:
raise TaskError('go_thrift_library only supports a single .thrift source file for {}.', target) |
<|file_name|>contestType.js<|end_file_name|><|fim▁begin|>export default class ContestType {
constructor(options) {
let _id = null;
let _name = null;
let _berryFlavor = null;
let _color = null;
Object.defineProperty(this, 'id', {
enumarable: true,
get() {
return _id;
}
... | enumerable: true,
get() { |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>'use strict';
var Foundationify = (function () {
// Initalize product image gallery function on product pages
function initProductImages() {
// Define the scope
var $productImages = $('#product-images', 'body.product');
// Select the thumbnails
var $thumbs... | $thumbs.on('click', function (e) {
e.preventDefault();
// Skip if thumb matches large |
<|file_name|>object_safety.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.apache.org/l... | //! "Object safety" refers to the ability for a trait to be converted |
<|file_name|>mapslackline.js<|end_file_name|><|fim▁begin|>var map;
var infoWindow;
<|fim▁hole|>// A variável markersData guarda a informação necessária a cada marcador
// Para utilizar este código basta alterar a informação contida nesta variável
var markersData = [
{
lat: -3.741262,
lng: -38.539389,
... | |
<|file_name|>comment.py<|end_file_name|><|fim▁begin|>#
# livef1
#
# f1comment.py - classes to store the live F1 comments
#
# Copyright (c) 2014 Marc Bertens <marc.bertens@pe2mbs.nl>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | self.clock = ""
self.text = ""
return
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.