prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>LSIdent.cpp<|end_file_name|><|fim▁begin|>#include "VCL.h" #include "Unit1.h" #include "GridMap.h" #include "defines.h" #include "matrix_utils.h" #include "bat_run.h" #include "LoadData.h" #include <cstdio> #include <ctime> #include <cstring> #include <cmath> // special LSM mode with "-1 distance" = no agg...
}
<|file_name|>mock_engine.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0. use super::Result; use crate::storage::kv::{Callback, ExtCallback, Modify, SnapContext, WriteData}; use crate::storage::{Engine, RocksEngine}; use kvproto::kvrpcpb::Context; use std::collections:...
/// the callback used, and other aspects during interaction with the engine
<|file_name|>htmltableelement.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::attr::{Attr, AttrHelpers, AttrValue}; use d...
fn get_background_color(&self) -> Option<RGBA>; fn get_border(&self) -> Option<u32>;
<|file_name|>test_multi.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et # $Id: test_multi.py,v 1.10 2005/03/11 13:24:45 kjetilja Exp $ import pycurl m = pycurl.CurlMulti() m.handles = [] c1 = pycurl.Curl() c2 = pycurl.Curl() c1.setopt(c1.URL, 'http://curl.haxx.se') c2....
num_handles = len(m.handles)
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Categor...
<|file_name|>main.js<|end_file_name|><|fim▁begin|>window.nomer=sl(1,4);<|fim▁hole|><|fim▁end|>
window.comment='Элементарные бытовые задачи.';
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages import os import cms <|fim▁hole|> 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD ...
CLASSIFIERS = [
<|file_name|>Sc-code-points.js<|end_file_name|><|fim▁begin|>// All code points in the `Sc` category as per Unicode v6.3.0: [ 0x24, 0xA2, 0xA3, 0xA4, 0xA5, 0x58F, 0x60B, 0x9F2, 0x9F3, 0x9FB, 0xAF1, 0xBF9, 0xE3F, 0x17DB, 0x20A0, 0x20A1, 0x20A2, 0x20A3, 0x20A4, 0x20A5, 0x20A6, 0x20A7, 0x20A8, 0x20A...
0xFFE6 ];
<|file_name|>power_set_for_set_of_characters.go<|end_file_name|><|fim▁begin|>/* #Date of creation : 9 Jan 2016. #Aim of program : To print power set of a set of characters. #Coded by : Rishikesh Agrawani. */ package main import "fmt" func main() { var n, r, i, j uint fmt.Print("Enter the number o...
- - r s -
<|file_name|>Equality.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under ...
<|file_name|>socket_event.rs<|end_file_name|><|fim▁begin|>use td_rp::Buffer; #[derive(Debug)] pub struct SocketEvent { socket_fd: i32, cookie: u32, client_ip: String, server_port: u16, buffer: Buffer, out_cache: Buffer, online: bool, websocket: bool, } impl SocketEvent { pub fn new...
}
<|file_name|>authoring_spec.js<|end_file_name|><|fim▁begin|>/* eslint-disable newline-per-chained-call */ var monitoring = require('./helpers/monitoring'), authoring = require('./helpers/authoring'), ctrlKey = require('./helpers/utils').ctrlKey, commandKey = require('./helpers/utils').commandKey, ctrl...
authoring.writeText('some is a sentence word, but words come after an abbrev. few are not'); browser.sleep(200);
<|file_name|>calc.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2014, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free ...
should be an array-like of floats. :param poes: Value(s) on which to interpolate a hazard map from the input ``curves``. Can be an array-like or scalar value (for a single PoE).
<|file_name|>cfg-attr-syntax-validation.rs<|end_file_name|><|fim▁begin|>#[cfg] //~ ERROR `cfg` is not followed by parentheses<|fim▁hole|>struct S1; #[cfg = 10] //~ ERROR `cfg` is not followed by parentheses struct S2; #[cfg()] //~ ERROR `cfg` predicate is not specified struct S3; #[cfg(a, b)] //~ ERROR multiple `cfg...
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # 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/. from __future__ import absolute_import from da...
headers = { 'Authorization': hawk.request_header,
<|file_name|>raw_volume.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*- /* * Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Found...
<|file_name|>Player.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package us.aaronweiss.pixalia.core; import us.aaronweiss.pixalia.tools.Vector; public class Player extends Pixal { public Player(String hostname) { super(hostname); } public void setColor(Vector color) { this.color = color; } }<|fim▁end|>
<|file_name|>book.py<|end_file_name|><|fim▁begin|>#: one x = 1<|fim▁hole|>time.sleep(10) #: two #x = 2 print(x)<|fim▁end|>
print(x) import time
<|file_name|>chrome_proxy_benchmark.py<|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. from integration_tests import chrome_proxy_measurements as measurements from integration_...
def Name(cls): return ('chrome_proxy_benchmark.http_to_direct_fallback.' 'http_to_direct_fallback')
<|file_name|>MyMethod.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * A function wrapping interface. * @author John DeNero */ public interface MyMethod<I, O> { public O call(I obj); }<|fim▁end|>
package org.canova.api.berkeley; /**
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># pylint: disable-msg=W0614,W0401,W0611,W0622 __docformat__ = 'restructuredtext' from datetime import datetime <|fim▁hole|> from pandas.core.api import * from pandas.io.parsers import parseCSV, parseText, parseExcel from pandas.stats.api import * from numpy.testi...
import numpy as np from pandas.version import version as __version__ from pandas.info import __doc__
<|file_name|>Image.js<|end_file_name|><|fim▁begin|>/* Image.js * * copyright (c) 2010-2017, Christian Mayer and the CometVisu contributers. * * 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 Foundat...
var data = cv.parser.WidgetParser.parseElement(this, xml, path, flavour, pageType, this.getAttributeToPropertyMappings()); cv.parser.WidgetParser.parseRefresh(xml, path); return data;
<|file_name|>app-load.module.ts<|end_file_name|><|fim▁begin|>import { NgModule, APP_INITIALIZER } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { AppLoadService } from './app-load.service'; import { RpcConnectionService } from '../rpc/rpc-connection.service'; export function ini...
} export function get_rpc(rpcService: RpcConnectionService): any {
<|file_name|>MulExpr.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved * * This file is part of Resin(R) Open Source * * Each copy or derived work must preserve the copyright notice and this * notice unmodified. * * Resin Open Source is free software; you ca...
super(_left, _right); }
<|file_name|>filter.js<|end_file_name|><|fim▁begin|>/** * Filtering sensitive information */ const _ = require('lodash'); /** * reset option * @param {string|object|array} opt filter option * @param {array} filterKeys filter keys * @param {string|function} replaceChat replace chat or function * @param {boolea...
/** * filter log message by option
<|file_name|>proto_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
<|file_name|>AlmSettingsSupport.java<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2022 SonarSource SA * mailto:info AT sonarsource DOT com * * 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 t...
*
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup import sslserver setup(name="django-sslserver", version=sslserver.__version__, author="Ted Dziuba", author_email="tjdziuba@gmail.com", description="An SSL-enabled development server for Django", url="https...
install_requires=["setuptools",
<|file_name|>asin.hpp<|end_file_name|><|fim▁begin|>#ifndef STAN_MATH_REV_FUN_ASIN_HPP #define STAN_MATH_REV_FUN_ASIN_HPP #include <stan/math/prim/fun/asin.hpp> #include <stan/math/prim/fun/abs.hpp> #include <stan/math/rev/core.hpp> #include <stan/math/rev/meta.hpp> #include <stan/math/rev/fun/abs.hpp> #include <stan/m...
<|file_name|>sleep.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 Apache Licen...
time.sleep(secs*scale)
<|file_name|>imports_config.py<|end_file_name|><|fim▁begin|># Example import configuration. import_templates = [{<|fim▁hole|> ('itt', '1'), ('mr', '1'), ('impstp', '1'), ('asa', '1'), ('impjun', '0'), ('dtd', '5'), { 'id': 'dr', 'label': 'D...
'id': 'my_import', 'label': 'My Import (Trident)', 'defaults': [ ('ds', '16607027920896001'),
<|file_name|>formatagesource0.rs<|end_file_name|><|fim▁begin|>use std::fmt::{self, Formatter, Display}; struct City { name: &'static str, // Latitude lat: f32, // Longitude lon: f32, } impl Display for City { // `f` est un tampon, cette méthode écrit la chaîne de caractères // formattée à ...
red: u8, green: u8,
<|file_name|>test_true.rs<|end_file_name|><|fim▁begin|>use common::util::*; #[test] fn test_exit_code() { new_ucmd!().succeeds();<|fim▁hole|><|fim▁end|>
}
<|file_name|>macrocontainer.controller.js<|end_file_name|><|fim▁begin|>//DO NOT DELETE THIS, this is in use... angular.module('umbraco') .controller("Umbraco.PropertyEditors.MacroContainerController", function($scope, dialogService, entityResource, macroService){ $scope.renderModel = []; $scope.allowOpenButton...
<|file_name|>shipping_container.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # © 2016 Comunitea - Kiko Sanchez <kiko@comunitea.com> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0. from odoo import api, fields, models, _ import odoo.addons.decimal_precision as dp class ShippingContainerType(mode...
self.volume = self.length * self.height * self.width
<|file_name|>shard_runner.rs<|end_file_name|><|fim▁begin|>use gateway::{InterMessage, ReconnectType, Shard, ShardAction}; use internal::prelude::*; use internal::ws_impl::{ReceiverExt, SenderExt}; use model::event::{Event, GatewayEvent}; use parking_lot::Mutex; use serde::Deserialize; use std::sync::{ mpsc::{ ...
<|file_name|>response.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com from ggrc import db from gg...
'response_type', ]
<|file_name|>better_conv_net.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import sys sys.path.insert(0, '../data_loader/') import load from theano.tensor.nnet.conv import conv2d from theano.tensor.signal.downsample import max_pool_2d # load data x_train, t_train, x_test, t_test = load.cifar10(dtype=theano.config.float...
import theano import theano.tensor as T import numpy as np
<|file_name|>styles.js<|end_file_name|><|fim▁begin|>export default {<|fim▁hole|> content: { width: '100%', padding: 10, marginRight: 20, }, header: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', }, };<|fim▁end|>
<|file_name|>test_vision.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 A...
constructed_name=template_p_name, label="Product", id_label="product_id",
<|file_name|>test5.py<|end_file_name|><|fim▁begin|>import os import CTK UPLOAD_DIR = "/tmp" def ok (filename, target_dir, target_file, params): txt = "<h1>It worked!</h1>" txt += "<pre>%s</pre>" %(os.popen("ls -l '%s'" %(os.path.join(target_dir, target_file))).read()) txt += "<p>Params: %s</p>" %(str(par...
CTK.publish ('', default) CTK.run (port=8000)
<|file_name|>ApplicationException.ts<|end_file_name|><|fim▁begin|>export default class ApplicationException extends Error { constructor(message?: string) { super(message); Object.setPrototypeOf(this, ApplicationException.prototype); }<|fim▁hole|>}<|fim▁end|>
<|file_name|>stringify-mark.js<|end_file_name|><|fim▁begin|>const test = require('tape'); const Mark = require('./../mark.js'); function stringArrayBuffer(str) { var buffer = new ArrayBuffer(str.length); var bytes = new Uint8Array(buffer); str.split('').forEach(function(str, i) { bytes[i] = st...
// stringify base64 data assert.equal(Mark.stringify(stringArrayBuffer('Hello')), '[#SGVsbG8=]', "Stringify binary data 'hello'"); assert.equal(Mark.stringify(stringArrayBuffer('Hello worlds!')), '[#SGVsbG8gd29ybGRzIQ==]', "Stringify binary data 'Hello worlds!'");
<|file_name|>FullscreenBtn.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import * as fullscreen from 'src/singletons/fullscreen'; interface Props { target:HTMLElement; } interface State { isFullscreen:boolean; } export default class FullscreenBtn extends React.Component<Props, State> { ...
<button className="fullscreen-toggle" onClick={(e) => {
<|file_name|>disambiguation_fire.js<|end_file_name|><|fim▁begin|>var d = require('../dtrace-provider'); var dtp = d.createDTraceProvider('test'); dtp.addProbe('probe1', 'int', 'int'); dtp.addProbe('probe2', 'int', 'int'); dtp.enable(); var dtp2 = d.createDTraceProvider('test'); dtp2.addProbe('probe3', 'int', ...
<|file_name|>marginalia-strings.js<|end_file_name|><|fim▁begin|>/* * Languages for annotation Javascript */ /* * Fetch a localized string * This is a function so that it can be replaced with another source of strings if desired * (e.g. in a database). The application uses short English-language strings as keys, ...
'quote too long' : 'The passage you have attempted to highlight is too long. It may not exceed 1000 characters.', 'zero length quote' : 'You must select some text to annotate.',
<|file_name|>day01.py<|end_file_name|><|fim▁begin|>from __future__ import print_function f = open('inputs/input_01.txt') contents = f.read() print("Floor:", contents.count('(') - contents.count(')')) # Part Two change = {'(': 1, ')': -1}<|fim▁hole|>floor = 0 position = 1 for c in contents: if c in change: ...
<|file_name|>loaders.py<|end_file_name|><|fim▁begin|>import os import logging from superdesk import get_resource_service from jinja2.loaders import FileSystemLoader, ModuleLoader, ChoiceLoader, DictLoader, PrefixLoader from liveblog.mongo_util import decode as mongodecode __all__ = ['ThemeTemplateLoader', 'CompiledThe...
if parent_theme: parent_dirname = themes.get_theme_path(parent_theme) self.searchpath.append(os.path.join(parent_dirname, 'templates'))
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use fixture_tests::Fixture; use graphql_test_helpers::apply_transform_for_test; us...
pub fn transform_fixture(fixture: &Fixture<'_>) -> Result<String, String> {
<|file_name|>test_endpoints_tmdb.py<|end_file_name|><|fim▁begin|># coding=utf-8 """Unit tests for mapi/endpoints/tmdb.py.""" import pytest from mapi.endpoints import tmdb_find, tmdb_movies, tmdb_search_movies from mapi.exceptions import MapiNotFoundException, MapiProviderException from tests import JUNK_TEXT GOONIE...
@pytest.mark.usefixtures("tmdb_api_key") def test_tmdb_search_movies__bad_title(tmdb_api_key): with pytest.raises(MapiNotFoundException):
<|file_name|>hdr_encoder.rs<|end_file_name|><|fim▁begin|>use color::Rgb; use hdr::{rgbe8, RGBE8Pixel, SIGNATURE}; use std::io::{Result, Write}; /// Radiance HDR encoder pub struct HDREncoder<W: Write> { w: W, } impl<W: Write> HDREncoder<W> { /// Creates encoder pub fn new(w: W) -> HDREncoder<W> { ...
match self.prev.take() { Some(Run(c, len)) => {
<|file_name|>TestGoto.java<|end_file_name|><|fim▁begin|>package brennus.asm; import static brennus.model.ExistingType.VOID; import static brennus.model.ExistingType.existing; import static brennus.model.Protection.PUBLIC; import static junit.framework.Assert.assertEquals; import java.util.ArrayList; import java.util....
.startClass("brennus.asm.TestGoto$TestClass", existing(FSA.class)) .startMethod(PUBLIC, VOID, "exec")
<|file_name|>multiple_files.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/...
for _ in 0..30 {
<|file_name|>unilateral.rs<|end_file_name|><|fim▁begin|>use crate::{ algo::TarjanScc, core::{ property::{ proxy_remove_edge_where_weight, proxy_remove_vertex, HasVertexGraph, RemoveEdge, RemoveVertex, Subgraph, Weak, }, Directed, Ensure, Graph, GraphDerefMut, }, }; use std::borrow::Borrow; /// A marker ...
f, ) }
<|file_name|>bounds.rs<|end_file_name|><|fim▁begin|>// 这个 trait 实现了打印标记:`{:?}`。 use std::fmt::Debug; trait HasArea { fn area(&self) -> f64; } impl HasArea for Rectangle { fn area(&self) -> f64 { self.length * self.height } } #[derive(Debug)] struct Rectangle { length: f64, height: f64 } #[allow(dead_code)] s...
println!("Area: {}", area(&rectangle)); //print_debug(&_triangle); //println!("Area: {}", area(&_triangle));
<|file_name|>test_middleware.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (th...
"""Sends a test request to see if key is locked out.""" req = webob.Request.blank('/?AWSAccessKeyId=%s' % access_key) return (req.get_response(self.lockout).status_int == 403)
<|file_name|>TabBarIcon.js<|end_file_name|><|fim▁begin|>import React, { PureComponent } from 'react'; import { Animated, View, StyleSheet } from 'react-native'; var babelPluginFlowReactPropTypes_proptype_Style = require('../../TypeDefinition').babelPluginFlowReactPropTypes_proptype_Style || require('prop-types').any; ...
<|file_name|>0009_simple_multiplication_with_stdin.rs<|end_file_name|><|fim▁begin|>// Compute product of two numbers while accepting value from standard input. use std::io; // imports io library from standard library fn main() { let mut a = String::new(); //creates new, empty String let mut b = String::new();...
<|file_name|>rxncon2boolnet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import logging import os import sys import click import click_log import colorama from typing import Optional from rxncon.input.excel_book.excel_book import ExcelBook from rxncon.simulation.boolean.boolean_model import SmoothingStrategy, ...
colorama.init() LOGGER = logging.getLogger(__name__)
<|file_name|>register_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 The btcsuite developers // Copyright (c) 2015-2020 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package dcrjson import ( "errors" "reflect" "sort" "testing" ...
return (*test)(nil) }, err: ErrNonOptionalField, },
<|file_name|>eval_assignment.rs<|end_file_name|><|fim▁begin|>use crate::helpers::{values::*, *}; use ostrov::errors::RuntimeError::*; #[test] fn returns_expression() { assert_eval_val( "(define x 0) (set! x (+ x 1))", unspecified(), ); } #[test] fn overwrites_variables() {<|fim▁hole|>...
assert_eval( "(define x 0) (set! x (+ x 1))
<|file_name|>flowtime.js<|end_file_name|><|fim▁begin|>/*! * Flowtime.js * http://marcolago.com/flowtime-js/ * MIT licensed * * Copyright (C) 2012-2013 Marco Lago, http://marcolago.com */ var Flowtime = (function () { /** * test if the device is touch enbled */ var isTouchDevice = 'ontouchstart' in documen...
nextFragment: _nextPage, prevFragment: _prevPage,
<|file_name|>x_testsuite_test.go<|end_file_name|><|fim▁begin|>package servo_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "testing" "github.com/fgrosse/servo" "fmt" ) func TestServo(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Servo Test Suite") } type TestBundle struct {} fu...
return nil
<|file_name|>AboutActivity.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2017 SamuelGjk <samuel.alva@outlook.com> * * This file is part of DiyCode * * DiyCode 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 ...
<|file_name|>pnacl_coordinator.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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 "native_client/src/trusted/plugin/pnacl_coordinator.h" #include <utility> #in...
// Try to delete the partially written not-yet-committed cache file before // returning. We pass the current pp_error along so that it can be reported
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! The future site of an IRC server library. //! The server module is currently unimplimented. Visit<|fim▁hole|>//! https://github.com/aatxe/irc/issues/22 to contribute!<|fim▁end|>
<|file_name|>test_state.py<|end_file_name|><|fim▁begin|>from fastpm.state import StateVector, Matter, Baryon, CDM, NCDM from runtests.mpi import MPITest from nbodykit.cosmology import Planck15 as cosmo import numpy BoxSize = 100. Q = numpy.zeros((100, 3)) @MPITest([1, 4]) def test_create(comm): matter = Matter(...
state.a['S'] = 1.0 state.a['P'] = 1.0
<|file_name|>BitArray.cpp<|end_file_name|><|fim▁begin|>#include "BitArray.h" namespace Rapid { void BitArrayT::append(char const * Bytes, std::size_t Size)<|fim▁hole|>std::size_t BitArrayT::size() const { return mBytes.size() * 8; } bool BitArrayT::operator[](std::size_t Index) const { auto ByteIndex = Index / 8; ...
{ mBytes.append(Bytes, Size); }
<|file_name|>auth.go<|end_file_name|><|fim▁begin|>// Copyright 2015 go-dockerclient authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package docker import ( "bytes" "encoding/base64" "encoding/json" "errors" "fmt" "io" "io/iou...
<|file_name|>test_site_yearly_aggregator.py<|end_file_name|><|fim▁begin|>__author__ = 'Bohdan Mushkevych' import unittest from settings import enable_test_mode enable_test_mode() from db.model.raw_data import DOMAIN_NAME, TIMEPERIOD from constants import PROCESS_SITE_YEARLY from tests import monthly_fixtures<|fim▁hol...
<|file_name|>decoder.py<|end_file_name|><|fim▁begin|>import logging import os import subprocess import threading import util logger = logging.getLogger('rt.decoder') class Decoder: def close(self, force=False): if not force: self.lock.acquire() self.decoder.stdin.close() self...
raise Exception('Invalid weights line: {}'.format(w_line))
<|file_name|>TopicAdapter.java<|end_file_name|><|fim▁begin|>package com.example.denizalp.thefirst; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; ...
import android.widget.TextView;
<|file_name|>NonAsciiCharacterFix.java<|end_file_name|><|fim▁begin|>package uk.ac.ebi.embl.api.validation.fixer.entry; import uk.ac.ebi.embl.api.entry.Entry; import uk.ac.ebi.embl.api.entry.Text; import uk.ac.ebi.embl.api.entry.feature.Feature; import uk.ac.ebi.embl.api.entry.qualifier.Qualifier; import uk.ac.ebi.embl...
} } }
<|file_name|>TemplateComponent.js<|end_file_name|><|fim▁begin|>/*! * Copyright 2002 - 2015 Webdetails, a Pentaho company. All rights reserved. * * This software was developed by Webdetails and is provided under the terms * of the Mozilla Public License, Version 2.0, or any later version. You may not use * this fil...
$target.empty().append(htmlResult); this.processAddins($target, data); if(!_.isEmpty(this.events)) {
<|file_name|>test_session.py<|end_file_name|><|fim▁begin|>""" Tests for login and logout. """ import datetime from unittest.mock import patch import responses import quilt3 from .utils import QuiltTestCase class TestSession(QuiltTestCase): @patch('quilt3.session.open_url') @patch('quilt3.session.input', r...
credentials = session.get_credentials()
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2015 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.o...
# Compatibility aliases (need to exist in both V1 and V2). LOCAL.ALL_OBJECTS['ConstantV2'] = initializers_v2.Constant LOCAL.ALL_OBJECTS['GlorotNormalV2'] = initializers_v2.GlorotNormal LOCAL.ALL_OBJECTS['GlorotUniformV2'] = initializers_v2.GlorotUniform
<|file_name|>ASTTypeCast.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the A...
public class ASTTypeCast extends GemFireAST { private static final long serialVersionUID = -6368577668325776355L;
<|file_name|>basic.rs<|end_file_name|><|fim▁begin|>extern crate central; #[macro_use] extern crate log; extern crate env_logger; use central::types::{Storage, Handle}; use std::collections::HashMap; use std::time::Duration; use std::thread; use std::convert::Into; #[derive(Debug)] pub struct Credential { pub user...
} impl Into<String> for Credential { fn into(self) -> String {
<|file_name|>pyminer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers // Copyright (c) 2014 Dyffy, Inc. # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json i...
if 'hashmeter' not in settings: settings['hashmeter'] = 0 if 'scantime' not in settings:
<|file_name|>api_task_status.py<|end_file_name|><|fim▁begin|>from flask_restful import Resource, Api from flask_restful_swagger import swagger from flauthority import app from flauthority import api, app, celery, auth from ModelClasses import AnsibleCommandModel, AnsiblePlaybookModel, AnsibleExtraArgsModel import ...
resp = app.make_response((result, 404)) return resp elif task.state == 'PROGRESS': result_obj = {'Status': "PROGRESS",
<|file_name|>path.py<|end_file_name|><|fim▁begin|># (c) 2012-2014, 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 ...
:arg follow: A boolean to indicate of symlinks should be resolved or not :raises UnicodeDecodeError: If the canonicalized version of the path contains non-utf8 byte sequences. :rtype: A text string (unicode on pyyhon2, str on python3).
<|file_name|>Parser.cpp<|end_file_name|><|fim▁begin|>#include "Parser.h" namespace hiapi { namespace server { Parser::Parser(hiaux::HttpRequestPtr _req): state(READING_SIZE), m_got_request(false) { <|fim▁hole|>void Parser::parse() { while (true) { if (m_cur_token.size() == 0) return; if (state == RE...
}
<|file_name|>ClusterMembership.java<|end_file_name|><|fim▁begin|>/* * 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 2 of the License, or * (at your option) any lat...
}
<|file_name|>timer.rs<|end_file_name|><|fim▁begin|>//! Timers that can invoke a callback on an interval. use widget_prelude::*; use ::callback::Callback; /// A timer that can invoke a callback on a configurable interval. /// /// ##Note: Not a Renderable Widget /// While this type can be dereferenced and converted t...
/// Set the timer interval in milliseconds. pub fn set_interval(self, time: u32) -> Self {
<|file_name|>volume.py<|end_file_name|><|fim▁begin|># Copyright 2011 OpenStack Foundation # (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
if self.tries >= CONF.libvirt.num_iscsi_scan_tries: msg = _("Fibre Channel device not found.") raise exception.NovaException(msg)
<|file_name|>_a4c_pre_configure_source.py<|end_file_name|><|fim▁begin|>from cloudify import ctx from cloudify.exceptions import NonRecoverableError from cloudify.state import ctx_parameters as inputs import subprocess import os import re import sys import time import threading import platform from StringIO import Strin...
<|file_name|>soupselect.py<|end_file_name|><|fim▁begin|>""" soupselect.py - https://code.google.com/p/soupselect/ CSS selector support for BeautifulSoup. soup = BeautifulSoup('<html>...') select(soup, 'div') - returns a list of div elements select(soup, 'div#main ul a') - returns a list of links inside a ul inside d...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate notify; use notify::{RecommendedWatcher, Watcher}; use std::sync::mpsc::channel; use std::env; fn main() { // Create a channel to receive the events. let (tx, rx) = channel(); // Automatically select the best implementation for your platform. // ...
Err(error) =>
<|file_name|>markduplicates.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python from genomon_pipeline.stage_task import * <|fim▁hole|> task_name = "markduplicates" script_template = """ #!/bin/bash # # Set SGE # #$ -S /bin/bash # set shell in UGE #$ -cwd # execute at the submitted d...
class Markduplicates(Stage_task):
<|file_name|>bulk_hash.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ crate_anon/linkage/bulk_hash.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software...
<|file_name|>type_collector.rs<|end_file_name|><|fim▁begin|>//! Collecting type items. use std::collections::BTreeSet; use super::context::{BindgenContext, ItemId}; /// A set of items. pub type ItemSet = BTreeSet<ItemId>; /// Collect all the type items referenced by this item. pub trait TypeCollector { /// If a ...
<|file_name|>commands.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this softwa...
return True
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>SECRET_KEY = 'fake-key' DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } } INSTALLED_APPS = [ "django_nose", "tests", ] TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'<|fim▁hole|>NOSE_ARGS = [ '--with-coverage', '...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>"""The ign_sismologia component."""<|fim▁end|>
<|file_name|>condvar.rs<|end_file_name|><|fim▁begin|>use crate::sys::condvar as imp; use crate::sys::mutex as mutex_imp; use crate::sys_common::mutex::MovableMutex; use crate::time::Duration; mod check; type CondvarCheck = <mutex_imp::MovableMutex as check::CondvarCheck>::Check; /// An OS-based condition variable. p...
<|file_name|>window_update.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 ThetaSinner // // This file is part of Osmium. // Osmium 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 ...
result.push(window_size_increment_first_octet & !WINDOW_SIZE_INCREMENT_BIT_MASK);
<|file_name|>local_settings.docker.py<|end_file_name|><|fim▁begin|># Docker-specific local settings import os DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db', } } # Make this unique, and don't share it with anybody. SECRET_K...
<|file_name|>full.py<|end_file_name|><|fim▁begin|># Copyright 2013 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. DEPS = [ 'git', 'recipe_engine/context', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_...
yield ( api.test('count-objects_with_bad_output') +
<|file_name|>badgesService.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; /** * @ngdoc function * @name app.service:badgesService * @description * # badgesService * Service of the app */ angular .module('badges') .factory('BadgesService', Badges); // Inject your dependencies as .$i...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import os as _os __path__.append(_os.path.join(__path__[0], '..', '..', 'gen', 'ortools', 'algorithms'))<|fim▁hole|>__path__.append(_os.path.join(__path__[0], '..', '..', '..', 'lib'))<|fim▁end|>