prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>environment.js<|end_file_name|><|fim▁begin|>module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { EXTEND_PROTOTYPES: false, FEATURES: {<|fim▁hole|> } }, APP: { ...
// Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true
<|file_name|>PollResultIndexingStrategyIndex.java<|end_file_name|><|fim▁begin|>/************************************************************************************** * Copyright (C) 2008 EsperTech, Inc. All rights reserved. * * http://esper.codehaus.org ...
public String toQueryPlan() { return this.getClass().getSimpleName() + " properties " + Arrays.toString(propertyNames); }
<|file_name|>broker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright...
<|file_name|>demoSensorController.js<|end_file_name|><|fim▁begin|>'use strict'; // Load the application's configuration const config = require('../server/config'); const url = config.express_host + '/api'; // Required modules const async = require('async'); const colors = require('colors'); const request = requir...
async.waterfall([ // Create a new User function(callback) {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from bitfinex.client import Client, TradeClient
<|file_name|>multi_rpc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # Copyright (c) 2015 The Aureus Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test mulitple rpc user config option rpcauth # from...
conn = httplib.HTTPConnection(url.hostname, url.port) conn.connect()
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/bin/python2 import os, gzip, StringIO, time, csv, datetime from flask import Flask, request, redirect, url_for, render_template from werkzeug.utils import secure_filename from wtforms import Form, DecimalField, validators class UpdateForm(Form): weight = Decimal...
app = Flask(__name__)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from chainer.iterators import multiprocess_iterator from chainer.iterators import serial_iterator <|fim▁hole|>SerialIterator = serial_iterator.SerialIterator<|fim▁end|>
MultiprocessIterator = multiprocess_iterator.MultiprocessIterator
<|file_name|>images.go<|end_file_name|><|fim▁begin|>package client import ( "encoding/json" "fmt" "net/url" "text/tabwriter" "time" "github.com/docker/docker/api/types" Cli "github.com/docker/docker/cli" "github.com/docker/docker/opts" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/...
ID = stringid.TruncateID(ID)
<|file_name|>cnf.py<|end_file_name|><|fim▁begin|># Homework 2 solution, part 1: cnf.py # Andrew Gordon # Feb 18, 2015 # Revised June 19, 2015 for better input/output and implies->if import sys import fileinput def biconditionalElimination(s): if type(s) is str: return s elif type(s) is list and s[0] =...
s = doubleNegationElimination(s)
<|file_name|>test_gluon.py<|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 you under the Apac...
] for layer in layers2d: check_layer_forward(layer, (1, 4, 20, 20))
<|file_name|>RegurgitatorConfiguration.java<|end_file_name|><|fim▁begin|>package no.api.regurgitator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import io.dropwizard.Configuration; import javax.validation.Valid; import javax.validation.constrain...
} }
<|file_name|>LineType.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <string> namespace pyconv { namespace language { namespace types{ namespace line { using std::string; class LineType { public: typedef int line_t; static const line_t BLANK = 0; static const line_t CLOSE_BRACE = 1; static...
protected:
<|file_name|>utils.rs<|end_file_name|><|fim▁begin|>use std::ops::{Add, Sub, Div, Mul}; use scene::ScreenPoint; use super::Pixel; pub fn to_uniform(resolution: Pixel, point: ScreenPoint) -> ScreenPoint { let resolution = ScreenPoint::from(resolution); let result = (point * 2.0 - resolution + ScreenPoint::new(1...
<|file_name|>parsers.py<|end_file_name|><|fim▁begin|>""" The MIT License (MIT) Copyright (c) 2015-2021 Kim Blomqvist Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including...
<|file_name|>openEyes.js<|end_file_name|><|fim▁begin|>/** * Open the Eyes Instance */ import {getBrowserFor} from './utils' module.exports = ( person, page, done ) => { console.log("(openEyes) Opening the Eyes for: " + person) getBrowserFor(person).EyesOpen(page); global.eyesIsOpen = true<|fim▁hole|>};<|...
done()
<|file_name|>app_usart_stm32l1.rs<|end_file_name|><|fim▁begin|>#![feature(plugin, no_std, core)] #![crate_type="staticlib"] #![no_std] #![plugin(macro_platformtree)] extern crate core; extern crate zinc; #[no_mangle] pub unsafe fn main() { use zinc::drivers::chario::CharIO; use zinc::hal; use zinc::hal::pin::Gp...
loop {}
<|file_name|>TimelineDataGrid.js<|end_file_name|><|fim▁begin|>var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _...
_iteratorError2 = err; } finally { try {
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of the jabber.at homepage (https://github.com/jabber-at/hp). # # This project 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 F...
<|file_name|>feature_fee_estimation.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2009-2019 The Bitcoin Core developers # Copyright (c) 2014-2019 The DigiByte Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/...
self.nodes[0].generate(1) reps += 1 self.log.info("Finished splitting")
<|file_name|>musashi.rs<|end_file_name|><|fim▁begin|>// Integration with Musashi extern crate libc; // Register enum copied from Musashi's m68k_register_t enum #[repr(C)] #[derive(Copy, Clone, Debug, PartialEq)] #[allow(dead_code)] pub enum Register { /* Real registers */ D0, /* Data registers */ D...
<|file_name|>test_sklearn_wrapper.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd import pytest from sklearn.ensemble import ExtraTreesClassifier from sklearn.impute import SimpleImputer from sklearn.model_selection import GridSearchCV, cross_val_score from sklearn.pipeline import Pipeline from s...
def es(): es = load_mock_customer(n_customers=15, n_products=15,
<|file_name|>test_library_content.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Basic unit tests for LibraryContentBlock Higher-level tests are in `cms/djangoapps/contentstore/tests/test_libraries.py`. """ import six from bson.objectid import ObjectId from fs.memoryfs import MemoryFS from lxml import e...
# but some js initialization should happen
<|file_name|>problem016.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
#!/usr/bin/env python3 print(sum(map(int, str(2**1000))))
<|file_name|>template.py<|end_file_name|><|fim▁begin|># (c) 2015, Michael DeHaan <michael.dehaan@gmail.com> # # 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 Free Software Foundation, either v...
# Expand any user home dir specification dest = self._remote_expand_user(dest, tmp)
<|file_name|>Character.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import fr.lelouet.rpg.model.character.CharStats; public class Character extends CharStats { public Character(RPGGame system) { super(system); } /** * * @return true if this character is an avatar */ public boolean isPlayer() { return ...
package fr.lelouet.rpg.model;
<|file_name|>functions.py<|end_file_name|><|fim▁begin|>""" Some useful utility functions missing from numpy/scipy. Copyright 2016 Deepak Subburam 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, eith...
"""
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// // SOS: the Stupid Operating System // by Eliza Weisman (eliza@elizas.website) // // Copyright (c) 2015-2017 Eliza Weisman // Released under the terms of the MIT license. See `LICENSE` in the root // directory of this repository for more information. // //! Archi...
//!
<|file_name|>impact_function.py<|end_file_name|><|fim▁begin|># coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Flood Vector Impact on Buildings using QGIS. Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of th...
raise GetDataError(message)
<|file_name|>mobile.09c351.js<|end_file_name|><|fim▁begin|>/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(i...
if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object
<|file_name|>test_create_programs.py<|end_file_name|><|fim▁begin|># Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import json import os<|fim▁hole|>from dataflow.core.utterance_tokenizer import UtteranceTokenizer from dataflow.multiwoz.create_programs import create_programs_for_trade_dialogue ...
from typing import Any, Dict, Iterator, List
<|file_name|>expansion-panel.d.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<|fim▁hole|>import { CdkAccordionItem } from '@angular/cdk/a...
*/ import { AnimationEvent } from '@angular/animations';
<|file_name|>scope.go<|end_file_name|><|fim▁begin|>// Copyright (C) 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 ...
Parameters map[*semantic.Parameter]*codegen.Value // The identifier of the currently executing thread.
<|file_name|>boilerplate.rs<|end_file_name|><|fim▁begin|>#![allow(clippy::single_match)] use vangers::{ config::{settings::Terrain, Settings}, render::{ScreenTargets, DEPTH_FORMAT}, }; use futures::executor::{LocalPool, LocalSpawner}; use log::info; use winit::{ event, event_loop::{ControlFlow, EventLo...
color: &view, depth: &depth_target, }; let render_command_buffer = app.draw(&device, targets, &spawner);
<|file_name|>Interactable.cpp<|end_file_name|><|fim▁begin|>#include "Chapter7.h" #include "Interactable.h" bool IInteractable::CanInteract_Implementation() { return true;<|fim▁hole|> }<|fim▁end|>
} void IInteractable::PerformInteract_Implementation() {
<|file_name|>cookie-debug.js<|end_file_name|><|fim▁begin|>define("jquery-plugin/cookie/1.3/cookie", ["$"], function (require, exports, module) {<|fim▁hole|> * * Copyright 2011, Klaus Hartl * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php ...
var jQuery = require('$'); /*! * jQuery Cookie Plugin v1.3 * https://github.com/carhartl/jquery-cookie
<|file_name|>running_mpi_executables.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python __copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu" __license__ = "MIT" import sys import radical.pilot as rp # READ: The RADICAL-Pilot documentation: # http://radicalpilot.readthedocs.org/en/latest # # Try ...
# PilotManager. This will trigger the selected scheduler to start # assigning ComputeUnits to the ComputePilots. units = umgr.submit_units(cud_list)
<|file_name|>cpp.rs<|end_file_name|><|fim▁begin|>//! Enables the generation of header and source files for using intercom //! libraries from C++ projects. extern crate std; use std::borrow::Cow; use std::io::Write; use super::GeneratorError; use super::{pascal_case, LibraryContext, ModelOptions, TypeSystemOptions}; ...
fn try_from(lib: TypeLib, opts: &ModelOptions) -> Result<Self, GeneratorError> {
<|file_name|>ProvisioningValidatorTest.java<|end_file_name|><|fim▁begin|>/* * #%L * wcm.io * %% * Copyright (C) 2015 wcm.io * %% * 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 * * ...
underTest = new PluginManagerImpl().get(ProvisioningValidator.NAME, ValidatorPlugin.class);
<|file_name|>Log.java<|end_file_name|><|fim▁begin|>package com.glory.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity public class Log { @Id @GeneratedValue private Long id; private Long transactionId; private String message; ...
}
<|file_name|>pollers_test.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 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. import json import os import tempfile import unittest import mock import requests from infra_...
<|file_name|>unboxed-closures-infer-fnonce-call-twice.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...
fn main() { let mut counter: Vec<i32> = Vec::new();
<|file_name|>DataTypeTest.java<|end_file_name|><|fim▁begin|>package com.github.gv2011.util.bytes; import static com.github.gv2011.testutil.Assert.assertThat; import static com.github.gv2011.testutil.Matchers.is; import org.junit.Test; import com.github.gv2011.util.BeanUtils; <|fim▁hole|>public class DataTypeT...
import com.github.gv2011.util.icol.ICollections; import com.github.gv2011.util.json.JsonUtils;
<|file_name|>opaque_node.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 gfx::display_list::OpaqueNode...
}
<|file_name|>cluster_size_autoscaling.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/LI...
<|file_name|>my_trip.js<|end_file_name|><|fim▁begin|>var express = require('express'); var router = express.Router(); /* ** www.g-trotter.eu/my-trip */ router.route('/') .get(function(req, res) { res.json({ path: 'www.g-trotter.eu/my-trip'<|fim▁hole|><|fim▁end|>
}) }) module.exports = router;
<|file_name|>data_source_obmcs_core_route_table.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. package main import ( "time" "github.com/MustWin/baremetal-sdk-go" "github.com/hashicorp/terraform/helper/schema" "github.com/oracle/terraform-provider-baremet...
<|file_name|>constify-module-enums-types.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] pub mod foo { pub type Type = ::std::os::raw::c_uint; pub const THIS: Type = 0; pub const SHOULD_BE: Type = 1; pub const A_CONSTA...
assert_eq!( unsafe { &(*(::std::ptr::null::<bar>())).member7 as *const _ as usize },
<|file_name|>mozmap.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/. */ //! The `MozMap` (open-ended dictionary) type. use crate::dom...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""goto_cloud URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/<|fim▁hole|>Examples: Function views 1. Add an import: from my_app import views 2. Add a U...
<|file_name|>netutil.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2011 Facebook # # 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/L...
self.executor = executor or dummy_executor
<|file_name|>auth0.py<|end_file_name|><|fim▁begin|>import cis_profile import cis_publisher import boto3 import botocore import os import logging import json import time from auth0.v3.authentication import GetToken from auth0.v3.management import Auth0 from auth0.v3.exceptions import Auth0Error from datetime import date...
self.all_cis_user_ids += publisher.known_cis_users_by_user_id.keys()
<|file_name|>blockgen.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package rpctest import ( "errors" "math" "math/big" "runtime" "time" "github.com/ltcsuite/ltcd/blockchain" "git...
// specified blockversion and timestamp. If the timestamp passed is zero (not // initialized), then the timestamp of the previous block will be used plus 1 // second is used. Passing nil for the previous block results in a block that
<|file_name|>JBoss5JMX.py<|end_file_name|><|fim▁begin|>from src.platform.jboss.interfaces import JMXInterface <|fim▁hole|> super(FPrint, self).__init__() self.version = "5.0"<|fim▁end|>
class FPrint(JMXInterface): def __init__(self):
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn main() { let a = 1; println!("{}", greet()); // place holder for didChange test. } fn greet() -> i32 { 42 } // place holder for didChange test. mod libs; use libs::yo;<|fim▁hole|>} #[cfg(feature = "f42")] fn conditional_fn() -> i32 { 42 }<|fi...
fn ref_in_main() -> i32 { yo() + 1
<|file_name|>rss.py<|end_file_name|><|fim▁begin|>import sys import urllib2 import HTMLParser import xml.etree.ElementTree as ET from logging import getLogger class Rss(object): """A class for handling RSS feeds""" def __init__(self,url=None): if not url: self.url = '' self.articl...
root = ET.fromstring(self.xml) for item in root.findall(".//item"):
<|file_name|>utils.xml.js<|end_file_name|><|fim▁begin|>var xml = require('xmlbuilder'); var fs = require('fs'); /** * Function is used to create plis file which is required for downloading ios app. * @param {string} name app name * @param {string} path path to application * @param {string} title ...
//generate unique file path:) use this for now. var filePath = './processing/file' + new Date().getMilliseconds() + '.plist'; fs.writeFile(filePath, d, function(err){
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" Django settings for dfiid project. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ import os BASE_DIR = os.pa...
<|file_name|>rStarTree.go<|end_file_name|><|fim▁begin|>package storage /* An implementation of a 2-dimentional R*-Tree used for storing <lat,long> coordinates of boats. See references [0] and [9] for description of the datastructure (haven't followed the instructions 100%) Notes: - MBR - Minimum Bounding Rectangl...
} for i, e := range n.entries { if i < RTree_m-1+k { group1 = append(group1, e)
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from django.conf import settings PIPELINE = getattr(settings, 'PIPELINE', not settings.DEBUG) PIPELINE_ROOT = getattr(settings, 'PIPELINE_ROOT', settings.STATIC_ROOT) PIPELINE_URL = getattr(settings, 'PIPELINE_URL', settings.STATIC_URL) PIPELINE_STORAGE = getattr(...
PIPELINE_SASS_BINARY = getattr(settings, 'PIPELINE_SASS_BINARY', '/usr/bin/env sass') PIPELINE_SASS_ARGUMENTS = getattr(settings, 'PIPELINE_SASS_ARGUMENTS', '')
<|file_name|>alife.rs<|end_file_name|><|fim▁begin|>use super::*; use app::constants::*; use backend::messagebus::Outbox; use backend::obj; use backend::obj::Identified; use backend::obj::Transformable; use backend::world; use backend::world::agent; use backend::world::alert; use backend::world::gen; use backend::world:...
&world.agents(agent::AgentType::Minion), &world.agents(agent::AgentType::Resource),
<|file_name|>SimpleUnitCell.js<|end_file_name|><|fim▁begin|>Clazz.declarePackage ("J.util"); Clazz.load (null, "J.util.SimpleUnitCell", ["java.lang.Float", "J.util.ArrayUtil", "$.Matrix4f", "$.V3"], function () { c$ = Clazz.decorateAsClass (function () { this.notionalUnitcell = null; this.matrixCartesianToFractiona...
return this.gamma; case 6: return this.dimension; }
<|file_name|>Panel.js<|end_file_name|><|fim▁begin|>/** * @aside guide tabs * @aside video tabs-toolbars * @aside example tabs * @aside example tabs-bottom * * Tab Panels are a great way to allow the user to switch between several pages that are all full screen. Each * Component in the Tab Panel gets its own Tab,...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2014 The 6502-rs Developers // 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 must retai...
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>//! # Keystore files (UTC / JSON) module errors use super::core; use std::{error, fmt}; /// Keystore file errors #[derive(Debug)] pub enum Error { /// An unsupported cipher UnsupportedCipher(String), /// An unsupported key derivation function Unsuppo...
<|file_name|>select2_locale_it-e45548dc93d14ad49b80a69023ecfd28.js<|end_file_name|><|fim▁begin|>/** * Select2 Italian translation */ (function ($) {<|fim▁hole|> $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Nessuna corrispondenza trovata"; }, formatInputTooShort: functi...
"use strict";
<|file_name|>pr14814.C<|end_file_name|><|fim▁begin|>/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-forwprop2" } */ /* LLVM LOCAL test not applicable */ /* { dg-require-fdump "" } */ class YY { public: YY(const YY &v) { e[0] = v.e[0]; e[1] = v.e[1]; e[2] = v.e[2]; } double &y() { return e[1]; } double e...
YY direction() const { return v; } YY v; };
<|file_name|>smart_truncate_chars.py<|end_file_name|><|fim▁begin|>from django import template from djangopress.core.util import smart_truncate_chars as _smart_truncate_chars register = template.Library() <|fim▁hole|># truncate chars but leaving last word complete @register.filter(name='smarttruncatechars') def smart...
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from django.http import HttpRequest from django.conf import settings from django.utils.translation import ugettext_lazy as _ try: from allauth.account import app_settings as allauth_settings from allauth.utils import (email_address_exists, ...
<|file_name|>exceptions.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/licen...
class NoPackageForClassFound(Exception): def __init__(self, name):
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import time import logging import string import requests import unicodedata import base64 try: import cPickle as pickle except: import pickle import datetime from django.utils import timezone import json from pprint import pprint ...
<|file_name|>DirectoryMetadata.py<|end_file_name|><|fim▁begin|>""" DIRAC FileCatalog mix-in class to manage directory metadata """ # pylint: disable=protected-access import six import os from DIRAC import S_OK, S_ERROR from DIRAC.Core.Utilities.Time import queryTime class DirectoryMetadata(object): def __init__(s...
<|file_name|>0010_remove_unneeded_objects.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): # Deleting field id db.delete_column('layers_...
u'actstream.action': {
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
context = {'styleguide': styleguide} index_path = "%s/index.html" % STYLEGUIDE_DIR_NAME return render(request, index_path, context)
<|file_name|>poxliff.py<|end_file_name|><|fim▁begin|># # Copyright 2006-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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 Founda...
else:
<|file_name|>tifffile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2014, Christoph Gohlke # Copyright (c) 2008-2014, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistri...
0x10000017: "zoom_y", 0x10000018: "zoom_z", 0x10000019: "sample_0x", 0x1000001a: "sample_0y",
<|file_name|>traits.rs<|end_file_name|><|fim▁begin|>use image::{imageops, DynamicImage, GenericImageView, GrayImage, ImageBuffer, Pixel}; use std::borrow::Cow; use std::ops; /// Interface for types used for storing hash data. /// /// This is implemented for `Vec<u8>`, `Box<[u8]>` and arrays that are multiples/combina...
///
<|file_name|>ipy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*-<|fim▁hole|># © 2016 Chris Ferrie (csferrie@gmail.com) and # Christopher E. Granade (cgranade@gmail.com) # # This file is a part of the Qinfer project. # Licensed under the AGPL version 3. ## # This program is free sof...
## # ipy.py: Interaction with IPython and Jupyter. ##
<|file_name|>Production5650.java<|end_file_name|><|fim▁begin|>package org.gradle.test.performance.mediummonolithicjavaproject.p282; public class Production5650 { private String property0; public String getProperty0() { return property0; } public void setProperty0(String value) { ...
public void setProperty4(String value) {
<|file_name|>whitelist_parser.go<|end_file_name|><|fim▁begin|>package sanitize import( "os" "encoding/json"<|fim▁hole|>func WhitelistFromFile(filepath string) (*Whitelist, error) { bytes, err := readFileToBytes(filepath) if err != nil { return nil, err } whitelist, err := NewWhitelist(bytes) return whitelist...
) // Load a new whitelist from a JSON file
<|file_name|>.eslintrc.client.js<|end_file_name|><|fim▁begin|>module.exports = { 'extends': ['google', 'plugin:react/recommended'], 'parserOptions': { 'ecmaVersion': 6, 'sourceType': 'module',<|fim▁hole|> 'env': { 'browser': true, }, 'plugins': [ 'react' ] };<|fim▁end|>
'ecmaFeatures': { 'jsx': true } },
<|file_name|>cancel-orders.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys import btceapi # This sample shows use of a KeyHandler. For each API key in the file # passed in as the first argument, all pending orders for the specified # pair and type will be canceled. if len(sys.argv) < 4: print "Usag...
# Get a list of orders for the given pair, and cancel the ones
<|file_name|>throwIfEmpty-spec.ts<|end_file_name|><|fim▁begin|>/** @prettier */ import { expect } from 'chai'; import { EMPTY, of, EmptyError, defer, throwError, Observable } from 'rxjs'; import { throwIfEmpty, mergeMap, retry, take } from 'rxjs/operators'; import { TestScheduler } from 'rxjs/testing'; import { observa...
const result = source.pipe(throwIfEmpty(() => new Error('test')));
<|file_name|>EditUserTest.java<|end_file_name|><|fim▁begin|>package userstoreauth.servlets; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import userstoreauth.model.UserVer2; import userstoreauth.service.UserStoreMb; import javax.servlet.ServletException; import javax.servlet.http.HttpSe...
<|file_name|>streaming.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
ssc = dstream._ssc ctx = ssc._sc gw = ctx._gateway
<|file_name|>mutatingwebhookconfiguration.go<|end_file_name|><|fim▁begin|>/* Copyright 2021 The Knative 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/LI...
<|file_name|>test_contact_compare.py<|end_file_name|><|fim▁begin|>__author__ = 'Keiran' from model.contact import Contact import pytest def test_contact_compare(app, orm): with pytest.allure.step('Given a sorted contact list from DB'): contacts_from_db = orm.get_contact_list() sorted_contacts_from...
with pytest.allure.step('Then I compare this lists'): for index in range(len(sorted_contacts_from_db)): assert sorted_contacts_from_db[index] == sorted_contacts_from_home_page[index]
<|file_name|>SensorConstants.java<|end_file_name|><|fim▁begin|>// This code is part of the CPCC-NG project. // // Copyright (c) 2009-2016 Clemens Krainer <clemens.krainer@gmail.com> // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as publ...
*/ public static List<SensorDefinition> byType(SensorType... type)
<|file_name|>test_marshal.py<|end_file_name|><|fim▁begin|>from ..base import BaseTopazTest class TestMarshal(BaseTopazTest): def test_version_constants(self, space): w_res = space.execute("return Marshal::MAJOR_VERSION") assert space.int_w(w_res) == 4 w_res = space.execute("return Marshal...
<|file_name|>types.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Thomas Scholtes. # # 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 w...
<|file_name|>systemhost_mock.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011 Google Inc. 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 of source code must retain t...
self.stdin = StringIO() self.stdout = StringIO()
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export * from './home.component'; export * from './overview/overview.component'; export * from './profile/profile.component';<|fim▁hole|><|fim▁end|>
export * from './accounts/accounts.component'; export * from './categorization/categorization.component';
<|file_name|>rosteritemexchange.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0"> <context> <name>ExchangeApproveDialog</name> <message> <location filename="../../plugins/rosteritemexchange/exchangeapprovedialog.cpp" line="24"/> <source>Roster Modification - ...
<|file_name|>generate-graphics.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys import re import subprocess from jinja2 import Template import replacements TEMPLATENAME = "base.svg.template" # modifiers for layers in order as in keymap MODIFIERS = [ [], ["SHIFT"], ["MOD3"], ...
<|file_name|>gist_trees.py<|end_file_name|><|fim▁begin|>""" Derivation and Elementary Trees live here. """ from __future__ import print_function from baal.structures import Entry, ConstituencyTree, consts from baal.semantics import Predicate, Expression from collections import deque from copy import copy, deepcopy fro...
""" ThisClass = self.__class__ op_tree = operative.elem_tree op = op_tree.tree_operation
<|file_name|>dissimilaroriginwindow.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::Dissimil...
global_to_clone_from.resource_threads().clone(),
<|file_name|>BenchmarkTest08513.java<|end_file_name|><|fim▁begin|>/** * OWASP Benchmark Project v1.1 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>...
} } // end doPost
<|file_name|>postupgrade.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 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 Un...
// BackupAPIServerCertIfNeeded rotates the kube-apiserver certificate if older than 180 days func BackupAPIServerCertIfNeeded(cfg *kubeadmapi.InitConfiguration, dryRun bool) error { certAndKeyDir := kubeadmapiv1beta1.DefaultCertificatesDir
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># -*- coding: utf-8 -*- from . import project<|fim▁end|>
<|file_name|>pypi_cache_server.py<|end_file_name|><|fim▁begin|>''' Pypi cache server Original author: Victor-mortal ''' import os import httplib import urlparse import logging import locale import json import hashlib import webob import gevent from gevent import wsgi as wsgi_fast, pywsgi as wsgi, monkey CACHE_DIR = '...