prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>Link.java<|end_file_name|><|fim▁begin|>package au.com.mountainpass.hyperstate.core;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import org.eclipse.jdt.annotation.Nullable;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.MediaType;
impo... | Map<String, Object> filteredParameters) {
return address.delete(filteredParameters);
|
<|file_name|>0002_auto_20170727_1504.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-07-27 15:04
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
... | ] |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[cfg_attr(feature="clippy", allow(needless_range_loop))]
fn counting_sort(array: &mut [i32], min: i32, max: i32) {
// nothing to do for arrays shorter than 2
if array.len() < 2 {
return;
}
// we count occurences of values
let size = (max - ... | for e in array.iter() { |
<|file_name|>test.js<|end_file_name|><|fim▁begin|>/* global describe, it, assert, expect */
'use strict';
// TESTS //
describe( 'paddingLeft', function tests() {
var el = document.querySelector( '#fixture' );
it( 'should expose an attribute for specifying the left padding between the canvas edge and the graph are... | next(); |
<|file_name|>Project.py<|end_file_name|><|fim▁begin|>############################ Copyrights and license ############################
# #
# Copyright 2018 bbi-yggy <yossarian@blackbirdinteractive.com> #
# ... | |
<|file_name|>test_multicast.rs<|end_file_name|><|fim▁begin|>// TODO: This doesn't pass on android 64bit CI...
// Figure out why!
#![cfg(not(target_os = "android"))]
use mio::{Events, Poll, PollOpt, Ready, Token};
use mio::net::UdpSocket;
use bytes::{Buf, MutBuf, RingBuf, SliceBuf};
use std::str;
use std::net::IpAddr;
... | }
}
|
<|file_name|>subscriptionusages.go<|end_file_name|><|fim▁begin|>package sql
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the Licens... | |
<|file_name|>alieztv.py<|end_file_name|><|fim▁begin|>import re
from os.path import splitext
from livestreamer.compat import urlparse, unquote
from livestreamer.plugin import Plugin
from livestreamer.plugin.api import http, validate
from livestreamer.stream import HTTPStream, RTMPStream
_url_re = re.compile("""
h... | validate.map(unquote),
[validate.url()]
), |
<|file_name|>os0file.cc<|end_file_name|><|fim▁begin|>/***********************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2012, 2017, MariaDB Corporation. All Rights Reserved.
Portions of th... | #ifndef UNIV_HOTBACKUP
/* Protect the seek / read operation with a mutex */
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES; |
<|file_name|>entail_utils.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "Osman Baskaya"
"""
Some utility functions for entailment project
"""
from collections import defaultdict as dd
from metrics import *
def get_eval_metric(metric_name):
if metric_name == "jaccard":
... | return pairs |
<|file_name|>pipeurlinput.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
pipe2py.modules.pipeurlinput
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://pipes.yahoo.com/pipes/docs?doc=user_inputs#URL
"""
from pipe2py.lib import utils
def pipe_urlinput(context=None, _INPUT=None, ... | |
<|file_name|>0013_atencion_formulario.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-03-07 02:03
from __future__ import unicode_literals
from django.db import migrations, models
<|fim▁hole|>
class Migration(migrations.Migration):
dependencies = [
('medgointran... | |
<|file_name|>Utility.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>std::string prefix;
time_t rawtime ;
std::string return_file_name(const std::string file_name)
{
std::string result_file_name;
if(prefix.length()>0)
result_file_name=prefix+"."+file_name;
else
result_file_name=file_nam... | #include "Utility.hpp"
|
<|file_name|>HemfPlusRecordType.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... | fillRegion(0x4013, UnimplementedHemfPlusRecord.class),
fillPath(0x4014, UnimplementedHemfPlusRecord.class), |
<|file_name|>rigidBodyState.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd ... | Foam::functionObjects::rigidBodyState::~rigidBodyState()
{}
|
<|file_name|>auth.js<|end_file_name|><|fim▁begin|>module.exports = {
'Auth': {<|fim▁hole|> }
}<|fim▁end|> | 'Token': process.env['NODE_AUTH'] || '' |
<|file_name|>PostFile.py<|end_file_name|><|fim▁begin|>from models import db
from models.Post import Post
class PostFile(db.Model):
__tablename__ = 'PostFile'
Id = db.Column(db.Integer, primary_key = True)
Post = db.Column(db.Integer, db.ForeignKey(Post.Id))
FileName = db.Column(db.String(128))
def __init_... |
self.Post = post |
<|file_name|>mixins.py<|end_file_name|><|fim▁begin|># copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of astroid.
#
# astroid is free software: you can redistribute it and/or modify it
# under the terms of the GNU... | def _infer_name(self, frame, name): |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
Base class for ensemble-based estimators.
"""
# Authors: Gilles Louppe
# License: BSD 3 clause
import multiprocessing
import numpy as np
from ..base import clone
from ..base import BaseEstimator
from ..base import MetaEstimatorMixin
class BaseEnsemble(BaseEstima... | --------
>>> from sklearn.utils import _get_n_jobs
>>> _get_n_jobs(4)
4 |
<|file_name|>cloned.rs<|end_file_name|><|fim▁begin|>#![feature(core)]
extern crate core;
#[cfg(test)]
mod tests {
use core::clone::Clone;
// #[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
// #[stable(feature = "rust1", since = "1.0.0")]
// pub enum Option<T> {
// /// No va... | A { value: self.value }
} |
<|file_name|>coord_units.rs<|end_file_name|><|fim▁begin|>//! `userSpaceOnUse` or `objectBoundingBox` values.
use cssparser::Parser;
use crate::error::*;
use crate::parsers::Parse;
/// Defines the units to be used for things that can consider a
/// coordinate system in terms of the current transformation, or in
/// t... | CoordUnits::from(MyUnits(CoordUnits::ObjectBoundingBox)), |
<|file_name|>option_Dock.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
/***************************************************************************
PisteCreatorDockWidget_OptionDock
Option dock for Qgis plugins
Option dock initialize
---------... | "PisteCreator/graphical_visualisation/max_length", 50 |
<|file_name|>FIBTableAction.java<|end_file_name|><|fim▁begin|>/**
*
* Copyright (c) 2013-2014, Openflexo
* Copyright (c) 2011-2012, AgileBirds
*
* This file is part of Gina-core, a component of the software infrastructure
* developed at Openflexo.
*
*
* Openflexo is dual-licensed under the European Union ... | public void setAllowsBatchExecution(boolean allowsBatchExecution);
public static abstract class FIBTableActionImpl extends FIBModelObjectImpl implements FIBTableAction {
|
<|file_name|>XantoI2C.cpp<|end_file_name|><|fim▁begin|>#include "XantoI2C.h"
XantoI2C::XantoI2C(uint8_t clock_pin, uint8_t data_pin, uint16_t delay_time_us):
clock_pin(clock_pin), data_pin(data_pin), delay_time_us(delay_time_us) {
sdaHi();
sclHi();
}
<|fim▁hole|>void XantoI2C::sclHi() {
pinMode(clock_pin, INPU... | void XantoI2C::i2cDelay() {
delayMicroseconds(delay_time_us);
}
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod naive_copying;
mod generational;<|fim▁hole|><|fim▁end|> | pub use self::naive_copying::{GcState, FullGcArgs};
pub const INFO_FRESH_TAG: usize = 0;
pub const INFO_MARKED_TAG: usize = 1; |
<|file_name|>rich.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | //=require rich/base |
<|file_name|>balance.cpp<|end_file_name|><|fim▁begin|>// Binary-search solution for balance.<|fim▁hole|>// David Garcia Soriano.
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;
const int maxn = 50000;
const double eps = 1e-11, infinity = 1e300;
double px[maxn], py[maxn];
int n;
bool poss... | // O(n * log (max coordinate / epsilon)) |
<|file_name|>test-whatwg-url-searchparams-set.js<|end_file_name|><|fim▁begin|>'use strict';
const common = require('../common');
const assert = require('assert');
const URLSearchParams = require('url').URLSearchParams;
const { test, assert_equals, assert_true } = require('../common/wpt');
/* The following tests are c... | assert.throws(() => {
params.set('a'); |
<|file_name|>events.rs<|end_file_name|><|fim▁begin|>//! (De)serializable types for the events in the [Matrix](https://matrix.org) specification.
//! These types are used by other Ruma crates.
//!
//! All data exchanged over Matrix is expressed as an event.
//! Different event types represent different actions, such as ... | //! #[ruma_event(type = "org.example.event", kind = State)]
//! pub struct ExampleContent {
//! field: String,
//! } |
<|file_name|>fuzz_regex_match.rs<|end_file_name|><|fim▁begin|>#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
if data.len() < 2 {
return;
}
let split_point = data[0] as usize;
if let Ok(data) = std::str::from_utf8(&data[1..]) {
use std::cmp::max;
// spli... | re.is_match(input);
}
} |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding:utf-8 -*-
from setuptools import setup
setup(
name='Earo',
version='0.1.0',<|fim▁hole|> author='Everley',
author_email='463785757@qq.com',
description='A microframework based on EDA for business logic development.',
... | url='https://github.com/Everley1993/Laky-Earo',
license='Apache', |
<|file_name|>issue-37139.rs<|end_file_name|><|fim▁begin|>enum TestEnum {
Item(i32),
}
fn test(_: &mut i32) {
}
fn main() {
let mut x = TestEnum::Item(10);
match x {
TestEnum::Item(ref mut x) => {
test(&mut x); //~ ERROR cannot borrow `x` as mutable, as it is not declared as mutable
... | }
}
} |
<|file_name|>AddonManager_nl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="1.1" language="nl" sourcelanguage="en">
<context>
<name>AddonInstaller</name>
<message>
<location filename="addonmanager_workers.py" line="535"/>
<source>Installed locatio... | <source>Configure...</source>
<translation>Configureer...</translation>
</message> |
<|file_name|>metadata.rs<|end_file_name|><|fim▁begin|>use crate::{error::{Error,
Result},
package::PackageIdent};
use serde_derive::Serialize;
use std::{self,
collections::BTreeMap,
env,
fmt,
fs::File,
io::Read,
iter::{FromItera... | }
#[cfg(test)] |
<|file_name|>bluetooth.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 bluetooth_blacklist::{Blacklist, uuid_is_blacklisted};
... | |
<|file_name|>entity.cpp<|end_file_name|><|fim▁begin|>//! @file
//! @copyright See <a href="LICENSE.txt">LICENSE.txt</a>.
#pragma once
#include "entity.hpp"
namespace ql {
//! Makes @p entity_id an entity: a being or object that can exist in the world.
auto make_entity(reg& reg, id entity_id, location location) -> ... | return entity_id;
} |
<|file_name|>variables_b.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var searchData=
[
['own_5faddress',['own_address',['../classRiots__BabyRadio.html#a0e4c8a64bf259ce380431879871bf872',1,'Riots_BabyRadio::own_address()'],['../classRiots__MamaRadio.html#ae1e3a65b5c9768df2a514fb984fe6a8c',1,'Riots_MamaRadio::own_addre... | |
<|file_name|>lib.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 https://mozilla.org/MPL/2.0/. */
#[macro_use]
extern crate log;
pub mod gl_glue;
pub use servo:... | |
<|file_name|>default_type_params_xc.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.apa... | pub struct Heap;
pub struct FakeHeap;
|
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import sys
from os import sep
from PyQt4.QtGui import QApplication
from src import mainwindow
if __name__ == "__main__":
print "los gehts"
app = QApplication(sys.argv)
window = mainwindow.CCMainWindow()<|fim▁hole|><|fim▁end|> | sys.exit(app.exec_()) |
<|file_name|>api.go<|end_file_name|><|fim▁begin|>// github package provides an API client for github.com
//
// Copyright (C) 2014 Yohei Sasaki
//
// 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 th... | // limitations under the License.
//
package github |
<|file_name|>response.py<|end_file_name|><|fim▁begin|>__author__ = 'Joe Linn'
#import pylastica
import pylastica.response
class Response(pylastica.response.Response):
def __init__(self, response_data, action, op_type):
"""
@param response_data:
@type response_data: dict or str
@pa... | """
|
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import Vue from 'vue';
import merge from 'element-ui/src/utils/merge';
import PopupManager from 'element-ui/src/utils/popup/popup-manager';
import getScrollBarWidth from '../scrollbar-width';
let idSeed = 1;
const transitions = [];
const hookTransition = (transition)... | document.body.style.overflow = this.bodyOverflow; |
<|file_name|>msstats_plots_wrapper.py<|end_file_name|><|fim▁begin|>import os, sys, re
import optparse
import shutil
import pandas
import numpy
import gc
import subprocess
#####################################
#This is a script to combine the output reports from
#Skyline, in preparation for MSstats! Let's get started.... | |
<|file_name|>discovery.py<|end_file_name|><|fim▁begin|>import threading
import select
import time
import socket
pyb_present = False
try:
import pybonjour
pyb_present = True
except ImportError:
pyb_present = False
TIMEOUT = 5
discovered_lock = threading.Semaphore()
discovered = []
discovered_event = thre... | # Use TCP for communication, as zeroconf is IP based tech
discovered.append((ss_name, ("TCP", (socket.inet_ntoa(rdata), self.port))))
discovered_lock.release()
discovered_event.set() |
<|file_name|>UpdateNFSFileShareRequest.cpp<|end_file_name|><|fim▁begin|>/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/storagegateway/model/UpdateNFSFileShareRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utili... |
if(m_kMSEncryptedHasBeenSet)
{ |
<|file_name|>lsprotate90.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
def inv(s):
if s[0] == '-':
return s[1:]
elif s[0] == '+':
return '-' + s[1:]
else: # plain number
return '-' + s
if len(sys.argv) != 1:
print 'Usage:', sys.argv[0]
sys.exit(1)
for line in sys.stdin:
linesplit = line.strip()... | #!/usr/bin/env python
import sys |
<|file_name|>share-constraints.js<|end_file_name|><|fim▁begin|>var detect = require('rtc-core/detect');
var extend = require('cog/extend');
var test = require('tape');
var expect = require('./helpers/expect-constraints');
var format = require('./helpers/format');
function mozMediaSource(type) {
return {
mozMedia... | height: { max: 1080 }
} : { |
<|file_name|>Unix.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014 The Netty Project
*
* The Netty Project licenses this file to you 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... |
private Unix() {
}
} |
<|file_name|>common.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.<|fim▁hole|>#
# Unless required by applicable law or agreed to in writing, ... | # You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0 |
<|file_name|>robuffer.rs<|end_file_name|><|fim▁begin|>// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be... | extern "system" {
pub fn RoGetBufferMarshaler( |
<|file_name|>node.d.ts<|end_file_name|><|fim▁begin|>import { ElementType } from "domelementtype";
/**
* This object will be used as the prototype for Nodes when creating a
* DOM-Level-1-compliant structure.
*/
export declare class Node {
type: ElementType;
/** Parent of the node */
parent: NodeWithChildr... | */
export declare function cloneNode<T extends Node>(node: T, recursive?: boolean): T;
export {};
//# sourceMappingURL=node.d.ts.map |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import os
import logging
import tqdm
from urllib.request import urlretrieve, URLError
import multiprocessing as mp
import itertools
import numpy as np
log = logging.getLogger(__name__)
def download_PHOENIX_models(path, ranges=None, parameters=None):
"""
Do... | log.warning(
f"Parameters {p} not found. Double check they are on PHOENIX grid"
)
|
<|file_name|>tcp.go<|end_file_name|><|fim▁begin|>package tcp
import (
"fmt"
"io"
"net"
"os"
"sync"
"github.com/rootless-containers/rootlesskit/pkg/port"
"github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg"
)
func Run(socketPath string, spec port.Spec, stopCh <-chan struct{}, logWriter io.Writer) ... | } |
<|file_name|>compose.go<|end_file_name|><|fim▁begin|>package config
import (
"fmt"
"strconv"
"strings"
"github.com/dnephin/configtf"
pth "github.com/dnephin/configtf/path"
)
// ComposeConfig A **compose** resource runs ``docker-compose`` to create an
// isolated environment. The **compose** resource keeps conta... | // |
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|>{
'name': "Sync POS orders across multiple sessions",
'version': '1.0.0',<|fim▁hole|> 'author': 'Ivan Yelizariev',
'category': 'Point Of Sale',
'website': 'https://yelizariev.github.io',
'depends': ['pos_disable_payment', 'bus'],
'data'... | |
<|file_name|>factory.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/LICENSE-2.0
Unless req... | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and |
<|file_name|>Autostop_Test.py<|end_file_name|><|fim▁begin|>from yandextank.plugins.Aggregator import SecondAggregateData
from yandextank.plugins.Autostop import AutostopPlugin<|fim▁hole|>
class AutostopTestCase(TankTestCase):
def setUp(self):
core = self.get_core()
core.load_configs(['config/autost... | from Tank_Test import TankTestCase
import tempfile
import unittest |
<|file_name|>Reflector.java<|end_file_name|><|fim▁begin|>package com.github.dozzatq.phoenix.advertising;
/**
* Created by Rodion Bartoshik on 04.07.2017.
*/
interface Reflector {
FactoryAd reflection();
int state();<|fim▁hole|><|fim▁end|> | } |
<|file_name|>merchant.py<|end_file_name|><|fim▁begin|>from item import Item
class Merchant:
def __init__(self, markup=1.2, markdown=0.8):
self.inventory = []
self.markup = markup
self.markdown = markdown
def add_item(self, item):
# Adds an item to the merchant's invento... | |
<|file_name|>symbolKlass.cpp<|end_file_name|><|fim▁begin|>/* Copyright 1994, 1995 LongView Technologies L.L.C. $Revision: 1.22 $ */
/* Copyright (c) 2006, Sun Microsystems, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
follow... | }
bool symbolKlass::verify(oop obj) { |
<|file_name|>request.js<|end_file_name|><|fim▁begin|>function noReservedDays(date) {
var m = date.getMonth(), d = date.getDate(), y = date.getFullYear();
for (i = 0; i < reservedDays.length; i++) {
if ($.inArray((m + 1) + '-' + d + '-' + y, reservedDays) !== -1) {
return [false];
... | }
return [true];
|
<|file_name|>scrollbar.js<|end_file_name|><|fim▁begin|>// Copyright 2017 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 {createElementWithClassName} from 'chrome://resources/js/util.m.js';
/**
* Create by |Line... | /** |
<|file_name|>test_index.py<|end_file_name|><|fim▁begin|>from fjord.base.tests import TestCase
from fjord.feedback.models import ResponseDocType
from fjord.feedback.tests import ResponseFactory
from fjord.search.index import chunked
from fjord.search.tests import ElasticTestCase
class ChunkedTests(TestCase):
def t... | |
<|file_name|>comedycentral.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
import re
from .mtv import MTVServicesInfoExtractor
from ..compat import (
compat_str,
compat_urllib_parse,
)
from ..utils import (
ExtractorError,
float_or_none,
unified_strdate,
)
class ComedyCen... | dlNewest = not mobj.group('episode') |
<|file_name|>redis_view.py<|end_file_name|><|fim▁begin|>#
# Hubblemon - Yet another general purpose system monitor
#
# Copyright 2015 NAVER Corp.
#
# 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 ... | redis_cloud_map_tmp = {}
entity_list = common.core.get_entity_list()
for entity in entity_list:
instance_list = common.core.get_table_list_of_entity(entity, 'redis_') |
<|file_name|>monarchDefinition.ts<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*... | composeSuggest: (resource, position, superSuggestions) => {
return TPromise.as(superSuggestions);
}
}; |
<|file_name|>stack.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
class Solution:
# @param {string} s
# @return {boolean}
def isValid(self, s):
slist=' '.join(s).split(' ')
print slist
stack=[]
for item in slist:
if item in ('[','{','('):
stack.append(item)
else:
if len(stack)==0:
re... | |
<|file_name|>stream.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 The Kubernetes 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.org/licenses/... | |
<|file_name|>IOST_AboutDialog.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : Libs/IOST_WAboutDialog/IOST_AboutDialog.py
# Date : Sep 21, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com... | import time
from IOST_Basic import * |
<|file_name|>TestAsin.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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.apac... | *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, |
<|file_name|>Integer.js<|end_file_name|><|fim▁begin|>define( 'type.Integer', {
// class configuration
alias : 'int integer',
extend : __lib__.type.Number,
// public properties
precision : 0,
// public methods<|fim▁hole|> valid : function( v ) {
return this.parent( v, true ) && Math.floor( v ) === v... | |
<|file_name|>android_calls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in co... | |
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import { enableProdMode } from "@angular/core";
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
<|fim▁hole|>import { AppModule } from "./app/app.module";
import { environment } from "./environments/environment";
if (environment.production) {... | |
<|file_name|>modelo_valid.py<|end_file_name|><|fim▁begin|>import numpy as np
import pandas as pd
import xarray as xr
from tikon.central import Módulo, SimulMódulo, Modelo, Exper, Parcela
from tikon.central.res import Resultado
from tikon.datos import Obs
from tikon.utils import EJE_TIEMPO, EJE_PARC<|fim▁hole|>crds = {'... |
f_inic = '2000-01-01'
|
<|file_name|>config.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* Module dependencies.
*/
var debug = require('debug')('swara:config'),
path = require('path'),
_ = require('lodash'),
glob = require('glob');
/**
* Load app configurations
*/
module.exports = _.extend(
require('./env/all'),
require('... | if (_.isArray(globPatterns)) {
globPatterns.forEach(function (globPattern) { |
<|file_name|>complex_number.cpp<|end_file_name|><|fim▁begin|>/*=============================================================================
Copyright (c) 2002-2015 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.o... | |
<|file_name|>sananmuunnos.py<|end_file_name|><|fim▁begin|>#!/usr/bin/envpython
#-*- coding: utf-8 -*-
"""
Sananmuunnos: Transforming Finnish spoonerisms made easy (and systematic).
"""
__author__ = "Tuukka Ojala"
__email__ = "tuukka.ojala@gmail.com"
__version__ = "2015.0918"
__license__ = "MIT"
import re
#Regular ... | |
<|file_name|>egl.rs<|end_file_name|><|fim▁begin|>// Licensed under the Apache License, Version 2.0.
// This file may not be copied, modified, or distributed except according to those terms.
//! Based on https://github.com/tomaka/glutin/blob/1b2d62c0e9/src/api/egl/mod.rs
#![cfg(windows)]
#![allow(unused_variables)]
us... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns,url
from main import views
urlpatterns = patterns('',
url(r'^$',views.index,name='index'),
url(r'^tags/$',views.tags,name='tags'),<|fim▁hole|><|fim▁end|> | url(r'^tags/(?P<tag_name>\w+)/$',views.tag,name='tag'),
url(r'^add_link/$',views.add_link,name='add_link'),
) |
<|file_name|>adminsite.py<|end_file_name|><|fim▁begin|># Copyright 2015 Rémy Lapeyrade <remy at lapeyrade dot net>
# Copyright 2015 LAAS-CNRS
#
#
# This file is part of TouSIX-Manager.
#
# TouSIX-Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | Special admin site, created for display widgets in the main panel.
"""
site_header = "TouIX - Administration de TouSIX" |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from zerver.lib.test_classes import WebhookTestCase
class PagerDutyHookTests(WebhookTestCase):
STREAM_NAME = 'pagerduty'
URL_TEMPLATE = "/api/v1/external/pagerduty?api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = 'pagerduty'
def test_trigger(sel... | self.send_and_test_stream_message('trigger_without_assignee_v2', 'Incident 33', expected_message) |
<|file_name|>kingdf.py<|end_file_name|><|fim▁begin|># Class that represents a King DF
import numpy
from scipy import special, integrate, interpolate
from ..util import conversion
from .df import df
from .sphericaldf import isotropicsphericaldf
_FOURPI= 4.*numpy.pi
_TWOOVERSQRTPI= 2./numpy.sqrt(numpy.pi)
class kingdf(... | # Store central density, r0...
self.rho0= self._scalefree_kdf.rho0*self._density_scale
self.r0= self._scalefree_kdf.r0*self._radius_scale
self.c= self._scalefree_kdf.c # invariant |
<|file_name|>es-BR.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gu... | [
'ene.', 'feb.', 'mar.', 'abr.', 'may.', 'jun.', 'jul.', 'ago.', 'sep.', 'oct.', 'nov.', 'dic.'
],
[ |
<|file_name|>update_ingest.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at h... | |
<|file_name|>NavBar.test.js<|end_file_name|><|fim▁begin|>import React from "react";
import { shallow } from "enzyme";
import { Link } from "react-router";
import { createMockUser } from "../../utilities/tests/test-utils";
import NavBar from "./NavBar";
const notLoggedUser = createMockUser();
const authenticatedUser = ... | ...defaultProps.config,
enableDatasetImport: true, |
<|file_name|>lte-rlc-um.cc<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Gen... | /** |
<|file_name|>SPNewsScraper.java<|end_file_name|><|fim▁begin|>package dk.dmaa0214.controllerLayer;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.xml.bind.DatatypeConverter;
import c... | |
<|file_name|>set.rs<|end_file_name|><|fim▁begin|>use std::io::BufReader;
use std::fs;
use std::rc;
use sym;
use exec::Arg;
use exec::Redir;
use shell::Shell;
fn rd_set(_rd: Redir) -> i32 {
println!("Redirection set is unimplemented");
0
}
fn set_spec(av: &mut Vec<Arg>) -> sym::ScopeSpec {
let mut ret = ... | pub fn set_main() -> rc::Rc<Fn(Vec<Arg>, &mut Shell, Option<BufReader<fs::File>>) -> i32> {
rc::Rc::new(|mut args: Vec<Arg>, sh: &mut Shell, _in: Option<BufReader<fs::File>>| -> i32 {
// rd-set |
<|file_name|>const.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
class Constant:
conf_dir = os.path.join(os.path.expanduser('~'), '.netease-musicbox')
download_dir = conf_dir + "/cached"<|fim▁end|> | # encoding: UTF-8
import os |
<|file_name|>test_serializers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from collections import defaultdict
from nose.tools import eq_, ok_
from rest_framework.serializers import ValidationError
import amo
import amo.tests
import mkt
import mkt.feed.constants as feed
from mkt.feed import serializers
fr... | eq_(data['carrier'], 'telefonica')
eq_(data['region'], 'restofworld')
eq_(data['description']['de'], 'test')
eq_(data['name']['en-US'], 'test') |
<|file_name|>git.go<|end_file_name|><|fim▁begin|>// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.<|fim▁hole|>
import (
"bytes"
"compress/zlib"
"crypto/sha1"
"encoding/git85"
"fmt"
"io"
"os"
)
func gitS... |
package patch |
<|file_name|>newsfetch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# newsfetch.py
#
# kindle-newsfetch is a simple Python script which fetches calibre recipes,<|fim▁hole|># (c) 2011 Stefan Schleifer, see LICENSE-file
import sys, os
import ConfigParser
import subprocess
import glob
from datetime import dat... | # turns them into Kindle newspapers using 'ebook-convert' and sends them to
# the configured Kindle e-mail adress using 'calibre-smtp'.
# |
<|file_name|>layout_task.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 layout task. Performs layout on the DOM, builds d... | |
<|file_name|>cache.go<|end_file_name|><|fim▁begin|>package api
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"strconv"
"strings"
"sync"
"time"
"github.com/meiraka/vv/internal/gzip"
"github.com/meiraka/vv/internal/request"
)
type cache struct {
changed chan struct{}
changedB bool
json ... | func (c *cache) ServeHTTP(w http.ResponseWriter, r *http.Request) {
c.mu.RLock()
b, gz, date := c.json, c.gzjson, c.date |
<|file_name|>xmlcreate.py<|end_file_name|><|fim▁begin|>from xml.etree.ElementTree import ElementTree
from xml.etree.ElementTree import Element
import xml.etree.ElementTree as etree
from xml.dom import minidom
import io
"""
using xml.etree.ElementTree
"""
<|fim▁hole|> rough_string = etree.tostring(elem, 'utf-8')
... | def prettify(elem):
"""Return a pretty-printed XML string for the Element.
""" |
<|file_name|>problem3.rs<|end_file_name|><|fim▁begin|>/* Run tests with;
*
* rustc --test problem3.rs ; ./problem3
*
*/
fn prime_factors(mut n: i64) -> Vec<i64> {
let mut divisor = 2;
let mut factors: Vec<i64> = Vec::new();
while divisor <= (n as f64).sqrt() as i64 {
if n%divisor == 0 {
... | |
<|file_name|>machine.py<|end_file_name|><|fim▁begin|>import argparse
from dvc.command.base import CmdBase, append_doc_link, fix_subparsers
from dvc.command.config import CmdConfig
from dvc.compare import TabularData
from dvc.config import ConfigError
from dvc.exceptions import DvcException
from dvc.types import Dict, ... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(core_intrinsics)]
#![feature(generators, generator_trait)]
pub mod structs;
pub mod traits;
pub mod operators;<|fim▁hole|>pub mod algorithms;
pub mod utils;
pub mod strings;
pub mod IO;
pub mod concurrency;
pub mod low_level;
pub mod macros;
pub mod unsafes;
... | pub mod closures;
pub mod iterators; |
<|file_name|>overlap-permitted-for-annotated-marker-traits.rs<|end_file_name|><|fim▁begin|>// run-pass
// Tests for RFC 1268: we allow overlapping impls of marker traits,
// that is, traits with #[marker]. In this case, a type `T` is
// `MyMarker` if it is either `Debug` or `Display`.
#![feature(marker_trait_attr)]
u... | impl<T: Debug> MyMarker for T {}
impl<T: Display> MyMarker for T {}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.