prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>bucketSort.cpp<|end_file_name|><|fim▁begin|>#include<iostream> using namespace std; int a[]={1,255,8,6,25,47,14,35,58,75,96,158,657}; const int len = sizeof(a)/sizeof(int); int b[10][len+1] = { 0 }; //将b全部置0 void bucketSort(int a[]);//桶排序函数 void distributeElments(int a[],int b[10][len+1],int digits); void...
void zeroBucket(int b[10][len+1]);//将b数组中的全部元素置0
<|file_name|>box.js<|end_file_name|><|fim▁begin|>// closure to avoid namespace collision (function(){ //------- var html_form = '<div id="text_box-form">\ <p class="popup_submit_wrap"><span class="wpp_helper_box"><a onclick="open_win(\'http://www.youtube.com/watch?v=Y_7snOfYato&list=PLI8Gq0WzVWvJ60avoe8rMyfoV5qZr...
//-------
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import unittest import testRObject import testVector import testArray import testDataFrame import testFormula import testFunction import testEnvironment import testRobjects import testMethods import testPackages import testHelp import testLanguage # wrap this nice...
suite_NumpyConversions, suite_Packages,
<|file_name|>sidebar.js<|end_file_name|><|fim▁begin|>export default function() { var links = [ { icon: "fa-sign-in", title: "Login", url: "/login" }, { icon: "fa-dashboard", title: "Dashboard", url: "/" }, ...
url: "/scheduler" } ];
<|file_name|>participant.model.ts<|end_file_name|><|fim▁begin|>import { Converter, json } from './../../helpers'; import { Mastery, Rune } from './../general'; import { MatchSummoner, ParticipantStats, ParticipantTimeline } from './'; import { Tier } from './../../enums'; export class Participant { public participa...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from collections import OrderedDict from django.conf import settings from django.utils.encoding import python_2_unicode_compatible from django.utils.text import slugify from django.db import models from decimal import Decimal ...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
class Exponential (Feature): '''
<|file_name|>btformats.py<|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 3 of the License, or # (at your option) any later version. #<|fim▁hole|># ME...
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>rbprmbuilder.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2014 CNRS # Author: Steve Tonneau # # This file is part of hpp-rbprm-corba. # hpp-rbprm-corba is free software: you can redistribute it # and/or modify it under the terms of the GNU Lesser General Public # License as publish...
# trunk of the robot, and a set of robots describe the range of motion of each limb of the robot. class Builder (object): ## Constructor def __init__ (self, load = True):
<|file_name|>synonyms.py<|end_file_name|><|fim▁begin|>#Synonyms experiment. Pass a string to see its "synonyms" from pyspark.sql import SparkSession, Row from pyspark.ml.feature import Word2Vec, Tokenizer, StopWordsRemover, Word2VecModel import sys; from string import punctuation def strip_punctuation(arr): return...
<|file_name|>aes.rs<|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 License, Ve...
0x5a36366c,0x413f3f7e,0x2f7f7f5,0x4fcccc83,0x5c343468,0xf4a5a551, 0x34e5e5d1,0x8f1f1f9,0x937171e2,0x73d8d8ab,0x53313162,0x3f15152a, 0xc040408,0x52c7c795,0x65232346,0x5ec3c39d,0x28181830,0xa1969637, 0xf05050a,0xb59a9a2f,0x907070e,0x36121224,0x9b80801b,0x3de2e2df,
<|file_name|>db.go<|end_file_name|><|fim▁begin|>package db import ( "hg/messages" "fmt" "gopkg.in/mgo.v2" ) const ( mongoURL = "127.0.0.1:27017" ) func persist(operation string,historyEntry messages.HistoryMessage) { fmt.Println("Do db operation") session, err := mgo.Dial(mongoURL) if err != nil { panic(err...
} defer session.Close()
<|file_name|>iter.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licen...
{
<|file_name|>float_macros.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<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the ...
// http://rust-lang.org/COPYRIGHT. //
<|file_name|>utilities.py<|end_file_name|><|fim▁begin|>""" Utilities for plotting various figures and animations in EEG101. """ <|fim▁hole|>import numpy as np import matplotlib.pylab as plt import collections from scipy import signal def dot_plot(x, labels, step=1, figsize=(12,8)): """ Make a 1D dot plot. ...
# Author: Hubert Banville <hubert@neurotechx.com> # # License: TBD
<|file_name|>generate_label_testvectors.py<|end_file_name|><|fim▁begin|>import numpy as np from scipy.ndimage import label <|fim▁hole|> def bitimage(l): return np.array([[c for c in s] for s in l]) == '1' data = [np.ones((7, 7)), bitimage(["1110111", "1100011", ...
def generate_test_vecs(infile, strelfile, resultfile): "test label with different structuring element neighborhoods"
<|file_name|>DatabaseTest.java<|end_file_name|><|fim▁begin|>package sk.atris.netxms.confrepo.tests.service.database; import org.junit.After; import org.junit.Before; import org.junit.Test; import sk.atris.netxms.confrepo.exceptions.DatabaseException; import sk.atris.netxms.confrepo.service.database.DbConnectionManager...
}
<|file_name|>strategy_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 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 ...
enableNodeDynamicConfig: false, node: makeNode(nil, true, true), oldNode: makeNode(nil, false, true),
<|file_name|>animator.py<|end_file_name|><|fim▁begin|>""" Simple utility code for animations. """ # Author: Prabhu Ramachandran <prabhu at aerodotiitbdotacdotin> # Copyright (c) 2009, Enthought, Inc. # License: BSD Style. import types from functools import wraps try: from decorator import decorator HAS_DECORAT...
from pyface.timer.api import Timer from traits.api import HasTraits, Button, Instance, Range
<|file_name|>test_new_tests.py<|end_file_name|><|fim▁begin|>from cStringIO import StringIO import unittest import unittest2 from unittest2.test.support import resultFactory class TestUnittest(unittest2.TestCase): def assertIsSubclass(self, actual, klass): self.assertTrue(issubclass(actual, klass), "Not...
self.assertEqual(result.testsRun, 1) self.assertEqual(len(result.errors), 0)
<|file_name|>factory_method.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <string> class Shape { public : virtual void draw (void) = 0; static Shape *Create (std::string type); }; class circle : public Shape { public : void draw(void){ std::cout << "circle" << std::endl; } }; class squar...
<|file_name|>health_test.py<|end_file_name|><|fim▁begin|>import mox import time import unittest from zoom.agent.predicate.health import PredicateHealth from zoom.common.types import PlatformType class PredicateHealthTest(unittest.TestCase): def setUp(self): self.mox = mox.Mox() self.interval = 0....
<|file_name|>multi_profile_credentials_filter_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright 2020 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 "chrome/browser/password_manager/multi_profile_credentials...
/*is_new_account=*/true, /*is_sync_signin=*/false, kFormEmail)); MultiProfileCredentialsFilter multi_profile_filter(
<|file_name|>UAsyncIO.hh<|end_file_name|><|fim▁begin|>/****************************************************************************** ******************************************************************************* ******************************************************************************* libferris Copyrig...
typedef GTK_StreamCollector< fh_fstream > GTK_FileStreamCollector;
<|file_name|>SVG.js<|end_file_name|><|fim▁begin|>/* * L.SVG renders vector layers with SVG. All SVG-specific code goes here. */ L.SVG = L.Renderer.extend({ _initContainer: function () { this._container = L.SVG.create('svg'); // makes it possible to click through svg root; we'll reset it back in individual pat...
L.DomUtil.remove(layer._path); layer.removeInteractiveTarget(layer._path);
<|file_name|>fraunhofer_orientdb.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Transport functions for `Fraunhofer's OrientDB <http://graphstore.scai.fraunhofer.de>`_. `Fraunhofer <https://www.scai.fraunhofer.de/en/business-research-areas/bioinformatics.html>`_ hosts an instance of `OrientDB <https://ori...
if count_query is None: count_query = "select count(@rid) from E"
<|file_name|>custom_build.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::fs::{self, File}; use std::io::prelude::*; use std::path::PathBuf; use std::str; use std::sync::Mutex; use core::{Package, Target, PackageId, PackageSet, Profile}; use util::{CargoResult, human, Human}; use util::{interna...
"rustc-flags" => {
<|file_name|>class_reader.go<|end_file_name|><|fim▁begin|>package classfile import "encoding/binary" type ClassReader struct { data []byte } func (self *ClassReader) readUint8() uint8 { val := self.data[0] self.data = self.data[1:] return val } func (self *ClassReader) readUint16() uint16 { val := binary.BigE...
val := binary.BigEndian.Uint32(self.data) self.data = self.data[4:]
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Contains the types and functions to communicate with the MusicBrainz API. use crate::error::{Error, ErrorKind}; use crate::entities::{Mbid, ResourceOld, Resource}; use reqwest_mock::Client as MockClient; use reqwest_mock::GenericClient as HttpClient; use reqwest_mo...
fn past_instant() -> Instant { Instant::now() - Duration::new(1000, 0) }
<|file_name|>region-object-lifetime-5.rs<|end_file_name|><|fim▁begin|>// Various tests related to testing how region inference works // with respect to the object receivers. trait Foo { fn borrowed<'a>(&'a self) -> &'a (); } // Here, the object is bounded by an anonymous lifetime and returned // as `&'static`, so...
fn owned_receiver(x: Box<dyn Foo>) -> &'static () { x.borrowed() //~ ERROR cannot return reference to local data `*x`
<|file_name|>DihedralFieldOfViewDetector.java<|end_file_name|><|fim▁begin|>/* Copyright 2002-2014 CS Systèmes d'Information * Licensed to CS Systèmes d'Information (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright...
<|file_name|>ProductionPanel.java<|end_file_name|><|fim▁begin|>package de.hub.cses.ces.jsf.bean.game.play; /* * #%L * CES-Game * %% * Copyright (C) 2015 Humboldt-Universität zu Berlin, * Department of Computer Science, * Research Group "Computer Science Education / Computer Science and Society" * Sebastian Gros...
private PlayBean gamePlay; @Inject private ComponentUpdateUtil componentUpdateUtil;
<|file_name|>InstantSearch-integration-test.ts<|end_file_name|><|fim▁begin|>/** * @jest-environment jsdom */ import { getByText, fireEvent } from '@testing-library/dom'; import instantsearch from '../../index.es'; import { configure, searchBox } from '../../widgets'; import { connectConfigure } from '../../connector...
expect(error.error).toBeInstanceOf(Error);
<|file_name|>stlc.rs<|end_file_name|><|fim▁begin|>#[phase(plugin)] extern crate peg_syntax_ext; pub use self::peg::sym; <|fim▁hole|> #[pub] sym -> Box<syntax::sym::Sym> = [0-9]+ { box syntax::sym::Con(String::from_str(match_str)) } "#)<|fim▁end|>
peg! peg(r#" use core::lang::stlc::syntax;
<|file_name|>wallet_importmulti.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importmulti RPC. Test importm...
<|file_name|>duration_pb2.py<|end_file_name|><|fim▁begin|># Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/duration.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf ...
<|file_name|>PojoPrefab.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013 MovingBlocks * * 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/LICEN...
import org.terasology.entitySystem.prefab.Prefab;
<|file_name|>LoteRpsConsultaTest.java<|end_file_name|><|fim▁begin|>package com.pablodomingos.classes.rps.servicos; import java.io.IOException; import org.apache.commons.io.IOUtils; import org.junit.Assert; import org.junit.Test; import com.pablodomingos.classes.FabricaDeObjetosFake; public class LoteRps...
<|file_name|>IPostComponentState.ts<|end_file_name|><|fim▁begin|>export interface IPostComponentState { /** * Post text */ text: string /** * It's true if whole the text post is visible */ readMoreState: boolean /** * Handle open comment from parent component *...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::cell::Cell; use std::rt::io::{Reader, Writer, Listener}; use std::rt::io::net::tcp::*; use std::rt::io::net::ip::*; fn allocate_buffer(buffer_size: uint) -> ~[u8] { let mut buffer: ~[u8] = std::vec::with_capacity(buffer_size); unsafe { std::vec::raw::...
}
<|file_name|>tile.rs<|end_file_name|><|fim▁begin|>use ndarray::{ArrayBase, DataMut, NdIndex, IntoDimension}; #[derive(Copy, Clone, Debug)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate") )] pub struct Tile<D: ndarray::Dimension, I: NdIndex<D>> { dim: D, a...
fn raw_dim(&self) -> D { self.dim.clone() }
<|file_name|>random_search.py<|end_file_name|><|fim▁begin|>""" Class for parallelizing RandomizedSearchCV jobs in scikit-learn """ from sklearn.model_selection import ParameterSampler from spark_sklearn.base_search import SparkBaseSearchCV class RandomizedSearchCV(SparkBaseSearchCV): """Randomized search on hype...
'param_gamma': masked_array(data = [-- -- 0.1 0.2], mask = [ True True False False]...),
<|file_name|>test_h7PolarRead.py<|end_file_name|><|fim▁begin|>import time import bluetooth from h7PolarDataPoints import h7PolarDataPoint from h7PolarDataPointReader import h7PolarDataPointReader if __name__ == '__main__': h7PolarDataPointReader = h7PolarDataPointReader() h7PolarDataPointReader.start()<|fim▁h...
while(True): dataPoint = h7PolarDataPointReader.readNextDataPoint() print (dataPoint)
<|file_name|>augmentation_transforms.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2019 The Google UDA Team 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:...
pil_img: Image in PIL object. level: Strength of the operation specified as an Integer from [0, `PARAMETER_MAX`].
<|file_name|>test_unit_store.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest import zipfile import config import store import common from db import db_session, Source import crypto_util # Set environment variable so config.py uses a test environment os.environ['S...
with self.assertRaises(store.PathException): store.verify(config.STORE_DIR + "_backup")
<|file_name|>ListAction.java<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2017 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 the Free ...
private static final String MATCH_ALL = ".*"; private final Languages languages;
<|file_name|>PreviewResponseParserTest.java<|end_file_name|><|fim▁begin|>package com.box.boxjavalibv2.responseparsers; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import junit.framework.Assert; import org.apache.commons.io.IOUtils; import org.apache.http.Header; impor...
BoxPreview parsed = (BoxPreview) object;
<|file_name|>JohnGLRenderer.java<|end_file_name|><|fim▁begin|>package com.johnsoft.library.swing.component.gl; import javax.media.opengl.GL; import javax.media.opengl.GL2; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLEventListener; import javax.media.opengl.fixedfunc.GLMatrixFunc;<|fim▁hole|>p...
import javax.media.opengl.glu.GLU;
<|file_name|>render_from_log.cc<|end_file_name|><|fim▁begin|>#include <sys/time.h> #include <pangomm/init.h> #include "pbd/compose.h" #include "pbd/xml++.h" #include "canvas/group.h" #include "canvas/canvas.h" #include "canvas/root_group.h" #include "canvas/rectangle.h" #include "benchmark.h" using namespace std; usin...
RenderFromLog (string const & session) : Benchmark (session) {} void do_run (ImageCanvas& canvas)
<|file_name|>pyconsole.py<|end_file_name|><|fim▁begin|># # pyconsole.py # # Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu> # Portions of code by Geoffrey French. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public ve...
return '' break return prefix
<|file_name|>bootstrap-modal.js<|end_file_name|><|fim▁begin|>/* =========================================================== * bootstrap-modal.js v2.1 * =========================================================== * Copyright 2012 Jordan Schroter * * Licensed under the Apache License, Version 2.0 (the "License"); *...
.removeClass('animated') .removeClass(this.options.attentionAnimation)
<|file_name|>command.isClean.spec.js<|end_file_name|><|fim▁begin|>'use strict'; var Promise = require('bluebird'), git = require('../index'); describe('isClean command', function() { var command = git.isClean; it('should exists', function(){ expect(command).to.be.a('function'); }); it('should issue...
return command() .tap(function() {
<|file_name|>search.js<|end_file_name|><|fim▁begin|>Search = function(data, input, result) { this.data = data; this.$input = $(input); this.$result = $(result); this.$current = null; this.$view = this.$result.parent(); this.searcher = new Searcher(data.index); this.init(); }; Search.prototype = $.extend...
<|file_name|>resolve.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/license...
modes: modes, err: None,
<|file_name|>sample.py<|end_file_name|><|fim▁begin|>''' Created on 2015年1月19日 @author: Guan-yu Willie Chen ''' # -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.support.select import Select from selenium.webdriver.common.keys import Keys import time #browser = webdrive...
print(n) select = Select(docId) select.select_by_index(1)
<|file_name|>delete_storage_metadata.py<|end_file_name|><|fim▁begin|>from geobricks_data_scripts.dev.utils.data_manager_util import get_data_manager data_manager = get_data_manager() # TODO How to handle the fact that is in storage?<|fim▁hole|><|fim▁end|>
data_manager.delete("mod13a2", True, False, False)
<|file_name|>tweeter.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>extern crate irc; use std::default::Default; use std::thread; use std::time::Duration; use irc::client::prelude::*; fn main() { let config = Config { nickname: Some("pickles".to_owned()), server: Some("irc.fyrechat.net".to_owned()), ...
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate cbindgen; use std::env; fn write_headers() { let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); let config = cbindgen::Config::from_file("cbindgen.toml").unwrap(); cbindgen::generate_with_config(&crate_dir, config) .expect("Una...
<|file_name|>LSMRTreeWithAntiMatterTuplesDataflowHelperFactory.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. Th...
return new LSMRTreeWithAntiMatterTuplesDataflowHelper(opDesc, ctx, partition, virtualBufferCacheProvider.getVirtualBufferCaches(ctx, opDesc.getFileSplitProvider()), btreeComparatorFactories, valueProviderFactories, rtreePolicyType, mergePolicyFactory.createMergePo...
<|file_name|>NettyComponent.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 und...
* limitations under the License.
<|file_name|>sc_tracebox.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Program: $Id: $ # Author: Robert Beverly <rbeverly@nps.edu> # Description: Experimental tracebox warts parser import sys import struct import dpkt from sc_warts import * if dpkt.__version__ == '1.8': print "Upgrade dpkt" ...
fields['IP::Protocol'] = ip.p fields['IP::Checksum'] = hex(ip.sum) fields['IP::SourceAddr'] = socket.inet_ntoa(ip.src)
<|file_name|>je_ss_smcrps_nrmsc_dropoutput.py<|end_file_name|><|fim▁begin|>"""Single slice vgg with normalised scale. """ import functools import lasagne as nn import numpy as np import theano import theano.tensor as T import data_loader import deep_learning_layers import layers import preprocess import postprocess i...
<|file_name|>RandVar.java<|end_file_name|><|fim▁begin|>package aima.core.probability.util; import java.util.HashSet; import java.util.Map; import java.util.Set; import aima.core.probability.RandomVariable; import aima.core.probability.domain.Domain; import aima.core.probability.proposition.TermProposition; ...
@Override
<|file_name|>pgwmodal-test.ts<|end_file_name|><|fim▁begin|>/// <reference path="pgwmodal.d.ts" /> var $j: JQueryStatic; var $z: ZeptoStatic; function test_open(): void { var r: boolean = $j.pgwModal({ content: 'Modal Example 1' });<|fim▁hole|> maxWidth: 800 }); $j.pgwModal({ ur...
$j.pgwModal({ target: '#modalContent', title: 'Modal title 2',
<|file_name|>rx-sequence_equal.hpp<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. #pragma once #if !defined(RXCPP_OPERATORS_RX_SEQUENCE_EQUAL_HPP) #define RXCPP_OPERATORS_RX_SEQUENCE_EQUAL_HPP #include ...
mutable std::list<other_source_value_type> other_values;
<|file_name|>test_pep425tags.py<|end_file_name|><|fim▁begin|>import sys from mock import patch from pip import pep425tags class TestPEP425Tags(object): def mock_get_config_var(self, **kwd): """ Patch sysconfig.get_config_var for arbitrary keys. """ import pip.pep425tags g...
Test that the `d` flag is set on a PyDebug, non-Pymalloc ABI tag. """ self.abi_tag_unicode('d', {'Py_DEBUG': True, 'WITH_PYMALLOC': False})
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::fmt; use ::Memory; pub mod opcodes; pub mod opcode; #[derive(Clone, Copy)] pub enum Register8 { A, F, B, C, D, E, H, L, } #[derive(Copy, Clone)] pub enum Register16 { AF, BC, DE, HL, SP, PC, } pub enum F...
self.a = high_byte!(v); self.f = low_byte!(v); }
<|file_name|>generate_docs.py<|end_file_name|><|fim▁begin|>import os import pydoc import sys class DocTree: def __init__(self, src, dest): self.basepath = os.getcwd() sys.path.append(os.path.join(self.basepath, src)) self.src = src self.dest = dest self._make_dest(dest) ...
self._move_docs(dest)
<|file_name|>scratchpad.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Display number of scratchpad windows and urgency hints. Configuration parameters: cache_timeout: refresh interval for i3-msg or swaymsg (default 5) format: display format for this module (default "\u232b [\?color=scratc...
<|file_name|>rtnl-route-event.rs<|end_file_name|><|fim▁begin|>use std::io::Write; use std::mem::size_of; use std::ffi::CStr; extern crate libc; extern crate crslmnl as mnl; use libc::{ c_int, c_char, c_void, socklen_t }; use mnl::linux::netlink as netlink; use mnl::linux::rtnetlink; extern { // const char *inet_...
let _ = attr.parse_nested(data_attr_cb2, &mut tbx);
<|file_name|>FileProcessor.java<|end_file_name|><|fim▁begin|>package com.gaojice.diskviewer.processor; import java.io.File; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import com.gaojice.diskviewer.dao.DiskFileDao; import com.gaojice.diskviewer.entity.DiskFile; public class FileProcesso...
private DiskFile p; private org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor; public FileProcessor(DiskFileDao diskFileDao, File root, DiskFile p, ThreadPoolTaskExecutor taskExecutor) {
<|file_name|>priorityrep.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 Rackspace // // 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/LICEN...
func doMoveParts(args []string, cnf srv.ConfigLoader) int {
<|file_name|>root.rs<|end_file_name|><|fim▁begin|>use alloc::arc::Arc; use alloc::boxed::Box; use collections::BTreeMap; use core::sync::atomic::{AtomicUsize, Ordering}; use spin::RwLock; use context; use syscall::error::*; use syscall::scheme::Scheme;<|fim▁hole|> scheme_ns: SchemeNamespace, scheme_id: SchemeId...
use scheme::{self, SchemeNamespace, SchemeId}; use scheme::user::{UserInner, UserScheme}; pub struct RootScheme {
<|file_name|>websiteServing.js<|end_file_name|><|fim▁begin|>/** * findRoutingRule - find applicable routing rule from bucket metadata * @param {RoutingRule []} routingRules - array of routingRule objects * @param {string} key - object key * @param {number} [errCode] - error code to match if applicable * @return {o...
// no key match, move on continue;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> import subprocess import datetime import os def get_version(version=None): """Derives a PEP386-compliant version number from VERSION.""" if version is None: version = VERSION assert len(version) == 5 assert version[3] in ('alph...
NAME = 'django-adminactions' VERSION = __version__ = (0, 4, 0, 'final', 0) __author__ = 'sax'
<|file_name|>WTSpec4MEditorAdvisor.java<|end_file_name|><|fim▁begin|>/** */ package WTSpec4M.presentation; import org.eclipse.emf.common.ui.URIEditorInput; import org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.edit.ui.action.LoadResource...
<|file_name|>cursor.js<|end_file_name|><|fim▁begin|>/** * Baobab Cursors * =============== * * Cursors created by selecting some data within a Baobab tree. */ import Emitter from 'emmett'; import {Monkey} from './monkey'; import type from './type'; import { Archive, arrayFrom, before, coercePath, deepClo...
*
<|file_name|>app.js<|end_file_name|><|fim▁begin|>//Create Tab Group var tabGroup = Titanium.UI.createTabGroup(); // Variables var Teas = ['#F5F5DC', '#FFE4B5', '#FFE4C4', '#D2B48C', '#C3b091', '#c3b091', '#926F5B', '#804000', '#654321', '#3D2B1F']; allRows = []; var theColours = Ti.UI.createTableView({}); f...
// Tab 1 var winTea = Titanium.UI.createWindow({
<|file_name|>steps.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 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/LICENSE-2.0 # # Unless ...
33: Keys.PAGE_UP, 34: Keys.PAGE_DOWN, 35: Keys.END, 36: Keys.HOME,
<|file_name|>DXImageTransform.Microsoft.CrBlinds.1.js<|end_file_name|><|fim▁begin|>class dximagetransform_microsoft_crblinds_1 { constructor() { // short bands () {get} {set} this.bands = undefined; // int Capabilities () {get} this.Capabilities = undefined; // string Direc...
<|file_name|>graphite_tcp.go<|end_file_name|><|fim▁begin|>package graphite import ( "bufio" "log" "net" "os" "strings" "sync" "github.com/influxdb/influxdb" ) // TCPServer processes Graphite data received over TCP connections. type TCPServer struct { writer SeriesWriter parser *Parser database string ...
if err != nil { return }
<|file_name|>task_2_8.py<|end_file_name|><|fim▁begin|># Задача 2. Вариант 8. #Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Лао-Цзы. Не забудьте о том, что автор должен быть упомянут на отдельной строке. # Ionova A. K. #30.04.2016<|fim▁hole|>...
<|file_name|>dockableMirrorMapPlugin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ /*************************************************************************** Name : Dockable MirrorMap Description : Creates a dockable map canvas Date : February 1, 2011 copyright...
if len(parts) >= 2: dockwidget.move( int(parts[0]), int(parts[1]) )
<|file_name|>0014_auto_20150413_1639.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0013_merge'), ] operations = [ migrations.Alter...
field=models.BooleanField(default=True, help_text=b'Determines whether or not your profile is open to the public'), preserve_default=True, ),
<|file_name|>Arbitrary.hpp<|end_file_name|><|fim▁begin|>#pragma once namespace rc { namespace gen { namespace detail { template <typename T> struct DefaultArbitrary; } // namespace detail template <typename T> decltype(Arbitrary<T>::arbitrary()) arbitrary() { static const auto instance = rc::Arbitrary<T>::arbitra...
}; } // namespace rc
<|file_name|>movie_making.py<|end_file_name|><|fim▁begin|>""" Python module defining a class for creating movies of matplotlib figures. This code and information is provided 'as is' without warranty of any kind, either express or implied, including, but not limited to, the implied warranties of non-infringement, merch...
if self.inverted: try: import ImageOps except ImportError:
<|file_name|>IntegerHelper.java<|end_file_name|><|fim▁begin|>/* * The MIT License (MIT) * * Copyright (c) 2015 Lachlan Dowding * * 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...
<|file_name|>verifytree.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -tt # 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 later ver...
return retval if __name__ == "__main__":
<|file_name|>mm.client.duck.js<|end_file_name|><|fim▁begin|>/*globals document, setTimeout, clearTimeout, Audio, navigator */ var MallardMayhem = MallardMayhem || {}; (function () { "use strict"; MallardMayhem.Duck = function (options) { var self = this; this.currentTimeout = null; ...
self.currentLocation[0] = self.currentLocation[0] - (self.currentLocation[0] - coords[0]); } else { self.currentLocation[0] = self.currentLocation[0] - MallardMayhem.animationStep;
<|file_name|>protocollayer.js<|end_file_name|><|fim▁begin|>/* Copyright 2012 Mozilla Foundation * * 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/LICE...
AllowSMIMESoftCerts: 0x0E32,
<|file_name|>XMIResultFormatter.java<|end_file_name|><|fim▁begin|>/* * XMIResultFormatter.java * * Copyright (c) 2011, Database Research Group, Institute of Computer Science, University of Heidelberg. * All rights reserved. This program and the accompanying materials * are made available under the terms of th...
<|file_name|>stage_results_unittest.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for the stage results.""" from __future__ import print_function imp...
return error def testParallelStages(self):
<|file_name|>ServletContainerTestCase.java<|end_file_name|><|fim▁begin|>package org.jboss.hal.testsuite.test.configuration.undertow; import org.apache.commons.lang.RandomStringUtils; import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.junit.Arquillian; import org.jboss.hal.testsuite.category.Sh...
private static final String SERVLET_CONTAINER = "servlet-container_" + RandomStringUtils.randomAlphanumeric(5);
<|file_name|>not-found.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; @Component({<|fim▁hole|> selector: 'app-not-found', templateUrl: 'not-found.component.html', }) export class NotFoundComponent { }<|fim▁end|>
<|file_name|>serve.js<|end_file_name|><|fim▁begin|>var path = require('path'); var url = require('url'); var closure = require('closure-util'); var nomnom = require('nomnom'); var log = closure.log; var options = nomnom.options({ port: { abbr: 'p', 'default': 4000, help: 'Port for incoming connections'...
} }).parse();
<|file_name|>builtin_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 PingCAP, 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-...
<|file_name|>ComputeVersion.go<|end_file_name|><|fim▁begin|>package models <|fim▁hole|>type ComputeVersion struct { Versions []ComputeVersionValue `json:"versions"` } type ComputeVersionValue struct { Id string `json:"id"` Status string `json:"status"` Updated time.Time `json:"updated"` }<|fim▁end|>
import ( "time" )
<|file_name|>Plugin.ts<|end_file_name|><|fim▁begin|>import PluginManager from 'tinymce/core/api/PluginManager'; import * as Commands from './api/Commands'; import * as Options from './api/Options'; import * as FilterContent from './core/FilterContent'; import * as ResolveName from './core/ResolveName'; import * as But...
ResolveName.setup(editor);
<|file_name|>testold.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import numpy as np import sys import time import scipy.interpolate as ip infile = sys.argv[1] indata = np.load(infile) spec = indata[0] samp_rate = indata[1] fftsize = indata[2] center_freq = 1419.4 # MHz halffft = int(0.5*fftsize) f...
#plt.plot(convfreqs,convspec) #plt.xlabel('relative to center [Mhz]') plt.show()
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This code is part of Qiskit. #<|fim▁hole|># # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/...
# (C) Copyright IBM 2018.