prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>robotirc.js<|end_file_name|><|fim▁begin|>/*****************************************************************************/
/* */
/* RobotIRC 0.1.2 */
/* Copyright (c) 2013-2017... | "!expand => Expand a shortened URL\n" + |
<|file_name|>filter_design.py<|end_file_name|><|fim▁begin|># Copyright 2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
import os
import re
import csv
import copy
import warnings
from optparse import OptionParser
from gnuradio import f... | |
<|file_name|>server.js<|end_file_name|><|fim▁begin|>require('newrelic');
var express = require('express');
var app = express();
var http = require("http");
app.use(express.static(__dirname));
module.exports = app;
var server = app.listen(process.env.PORT || 3000, function() {
console.log('express server listening ... | setInterval(function() { |
<|file_name|>ResetDBParameterGroupResult.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. 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.
* A copy of the Licens... | * ModifyDBParameterGroup or ResetDBParameterGroup action.
* </p>
*/ |
<|file_name|>BackupStorageMigrateImageResult.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
public class BackupStorageMigrateImageResult {
public ImageInventory inventory;
public void setInventory(ImageInventory inventory) {
this.inventory = inventory;
}
public ImageInventory getInventory() {
... | package org.zstack.sdk;
import org.zstack.sdk.ImageInventory; |
<|file_name|>build_python_filter_routine.py<|end_file_name|><|fim▁begin|># -*- python -*-
# Git Version: @git@
#-----------------------------------------------------------------------
# XALT: A tool that tracks users jobs and environments on a cluster.
# Copyright (C) 2013-2014 University of Texas at Austin
# Copyrigh... | import os, sys, re, argparse |
<|file_name|>expanded.tsx<|end_file_name|><|fim▁begin|>/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../../..'
export const run = editor => {
Transforms.move(editor, { edge: 'start' })
}
export const input = (<|fim▁hole|> hree
</block>
</editor>
)
export const output = (
<edito... | <editor>
<block>
one <anchor />
two t<focus /> |
<|file_name|>0005_auto_20160330_1625.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 = [
('experiment', '0004_auto_20150727_1405'),
]
operations = [
... | migrations.AlterField( |
<|file_name|>euler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from pygal import *
<|fim▁hole|>def listeEuler(f, x0, y0, pas, n):
x, y, L = x0, y0, []
for k in range(n):
L += [(x, y)]
x += pas
y += pas * f(x, y)
return L
def euler(f, x0, y0, xf, n):
pas =... | |
<|file_name|>LocalWalModeChangeDuringRebalancingSelfTest.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 l... | ignite.cluster().active(true);
|
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>#[macro_export]
macro_rules! symbol {
($handle: expr, $symbol: expr) => ({
let sym: *mut libc::c_void = libc::dlsym($handle, $symbol);
if sym.ne(&ptr::null_mut()) {
Some(mem::transmute::<*mut libc::c_void, _>(sym))
} else {
... | } |
<|file_name|>JoinProcessor.java<|end_file_name|><|fim▁begin|>/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party... | } |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render
<|fim▁hole|><|fim▁end|> |
def index(request):
return render(request, 'common/index.html', {}) |
<|file_name|>tool.go<|end_file_name|><|fim▁begin|>// Package tool does the work of rendering output from templates.
package tool
import (
"fmt"
"html/template"
"io"
"io/ioutil"
"path/filepath"
"strings"
"github.com/matryer/codeform/parser"
"github.com/matryer/codeform/query"
"github.com/matryer/codeform/rend... | Interfaces []string
Structs []string
Funcs []string
Log func(...interface{}) |
<|file_name|>basehandler.py<|end_file_name|><|fim▁begin|>import os, h5py, numpy
from scipy.sparse import csc_matrix
import ml2h5.task
from ml2h5 import VERSION_MLDATA
from ml2h5.converter import ALLOWED_SEPERATORS
class BaseHandler(object):
"""Base handler class.
It is the base for classes to handle differe... | raise AttributeError(_("Seperator '%s' not allowed!" % seperator))
|
<|file_name|>array_index.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>
// EMIT_MIR array_index.main.ConstProp.diff
fn main() {
let x: u32 = [0, 1, 2, 3][2];
}<|fim▁end|> | // EMIT_MIR_FOR_EACH_BIT_WIDTH |
<|file_name|>LagrangianLinearDiagonalDS.hpp<|end_file_name|><|fim▁begin|>/* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2022 INRIA.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in comp... | ~LagrangianLinearDiagonalDS(){}; |
<|file_name|>respond.py<|end_file_name|><|fim▁begin|># Add 'RESPOND' and 'M118' commands for sending messages to the host
#
# Copyright (C) 2018 Alec Plumb <alec@etherwalker.com>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
respond_types = {
'echo': 'echo:',
'command': '//',
... | msg = gcmd.get('MSG', '')
gcmd.respond_raw("%s %s" % (prefix, msg))
|
<|file_name|>test_imports.py<|end_file_name|><|fim▁begin|>"""Test suite for the custom import logic."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import os
import sys
import require
def test_patch_replaces_an... | |
<|file_name|>pubsub.js<|end_file_name|><|fim▁begin|>(function(){
/**
* PubSub implementation (fast)<|fim▁hole|>
if (!(this instanceof PubSub)){
return new PubSub( defaultScope );
}
this._topics = {};
this.defaultScope = defaultScope || this;
};
PubSub.prot... | */
var PubSub = function PubSub( defaultScope ){ |
<|file_name|>misc.rs<|end_file_name|><|fim▁begin|>/// Module for miscellaneous instructions
use jeebie::core::cpu::CPU;
use jeebie::core::registers::Register8::*;
use jeebie::core::registers::Register16::*;
// 'NOP' 00 4
pub fn nop(cpu: &mut CPU) -> i32 { 4 }
// 'SWAP A' CB 37 8
pub fn SWAP_a(cpu: &mut CPU) -> i32 {
... | pub fn SWAP_e(cpu: &mut CPU) -> i32 {
cpu.compute_swap(E);
8
} |
<|file_name|>window.py<|end_file_name|><|fim▁begin|>from pydispatch import dispatcher
from PySide import QtCore, QtGui
import cbpos
logger = cbpos.get_logger(__name__)
from .page import BasePage
class MainWindow(QtGui.QMainWindow):
__inits = []
def __init__(self):
super(MainWindow, s... | |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>"use strict";
(function() {
function get_promise(endpoint) {
return function($http) {
return $http.get(endpoint);
};
}
angular.module('pagerbot-admin', ['ngRoute', 'ngTable', 'angular-loading-bar'])
.config(function ($routeProvider) {
$rou... | templateUrl: 'views/schedules.html',
controller: 'ScheduleAliasCtrl', |
<|file_name|>test__sources.py<|end_file_name|><|fim▁begin|>import os
import tempfile
from pkg_resources import Requirement
from infi.unittest import parameters
from .test_cases import ForgeTest
from pydeploy.environment import Environment
from pydeploy.environment_utils import EnvironmentUtils
from pydeploy.checkout_ca... | specs = Requirement.parse(requirement).specs
git.get_remote_references_dict(self.url).and_return(options) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2011 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://ww... | |
<|file_name|>assign_node_ids.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... | fn new_id(&self, old_id: ast::NodeId) -> ast::NodeId {
assert_eq!(old_id, ast::DUMMY_NODE_ID);
self.sess.next_node_id()
} |
<|file_name|>TagsObject.java<|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.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.ma... | } |
<|file_name|>issue-14421.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/lic... | extern crate bug_lib = "issue-14421"; |
<|file_name|>registry.rs<|end_file_name|><|fim▁begin|>//! A `Source` for registry-based packages.
//!
//! # What's a Registry?
//!
//! Registries are central locations where packages can be uploaded to,
//! discovered, and searched for. The purpose of a registry is to have a
//! location that serves as permanent storag... | try!(src.update());
self.sources.push(src);
}
Ok(()) |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate luck_ecs;<|fim▁hole|>extern crate luck_math;
extern crate luck_core;
pub use luck_ecs as ecs;
pub use luck_math as math;
pub use luck_core as core;<|fim▁end|> | |
<|file_name|>home.js<|end_file_name|><|fim▁begin|>'use strict';
var express = require('express'),
router = express.Router(),
Post = require('../models/post');
module.exports = function (app) {
app.use('/', router);
};
router.get('/', function (req, res, next) {
var posts = [new Post({
"title": "dummy pos... | res.render('index', {
title: 'Brian Mitchell',
active: {active_home: true}, |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from django.views.generic import RedirectView<|fim▁hole|>
urlpatterns = [
url(r"wordcloud/?$", wordcloud_demoview, name="wordcloud")
]<|fim▁end|> | from .views import wordcloud_demoview
|
<|file_name|>link-modal.component.ts<|end_file_name|><|fim▁begin|>import {Component} from '@angular/core';
import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';<|fim▁hole|>import {ProjectConfiguration} from '../../../core/configuration/project-configuration';
@Component({
selector: 'link-modal',
template... | import {Category} from 'idai-field-core'; |
<|file_name|>Get.js<|end_file_name|><|fim▁begin|>const { Array } = require.main.require('./Tag/Classes');
class GetTag extends Array {
constructor(client) {
super(client, {
name: 'get',
args: [
{
name: 'array'
}, {
name: 'index'
}
],
minArgs: 2,... | let arr = await this.loadArray(ctx, args.array);
let index = this.parseInt(args.index, 'index'); |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># yellowbrick.model_selection
# Visualizers that wrap the model selection libraries of Scikit-Learn
#
# Author: Benjamin Bengfort <benjamin@bengfort.com>
# Created: Fri Mar 30 10:36:12 2018 -0400
#
# ID: __init__.py [c5355ee] benjamin@bengfort.com $
"""
Visualizer... | ## Imports
##########################################################################
from .learning_curve import LearningCurve, learning_curve |
<|file_name|>FoggerExampleApplication.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014 the original author or 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
*
* htt... | import android.content.SharedPreferences; |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Various utilities
pub mod units;
pub trait FromChar {
type Ret;
<|fim▁hole|> fn from_char(c: char) -> Self::Ret;
}<|fim▁end|> | |
<|file_name|>hpv.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014. Mount Sinai School of Medicine
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | def load_tcell(*args, **kwargs):
tcell_path = join(DATA_DIR, 'cvc_hpv_tcell.csv') |
<|file_name|>tut_runner.hpp<|end_file_name|><|fim▁begin|>// *****************************************************************************
/*!
\file src/NoWarning/tut_runner.hpp
\copyright 2012-2015 J. Bakosi,
2016-2018 Los Alamos National Security, LLC.,
2019-2020 Triad National Secur... | #pragma GCC diagnostic ignored "-Wshadow" |
<|file_name|>MainUI.java<|end_file_name|><|fim▁begin|>package com.game.clean;
import org.apache.log4j.Logger;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.concurrent.*;
/**
* Created by wanggq on 2016/11/9.
*/
public class ... | |
<|file_name|>issue-16602-2.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/l... | assert_eq!(a.x, 2);
assert_eq!(a.y, 2);
} |
<|file_name|>pictogramResponseTest.js<|end_file_name|><|fim▁begin|>var chai = require('chai');
var should = chai.should();
var pictogramResponse = require('../../../lib/model/response/pictogramResponse');
describe('pictogramResponse model test', function () {
var id = 'id';
var category = 'category';
var url = ... | |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-25 15:51
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion<|fim▁hole|>
class Migration(migrations.Mi... | |
<|file_name|>FieldProcessingActionSupport.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the ho... | * jPOS Project [http://jpos.org]
* Copyright (C) 2000-2010 Alejandro P. Revilla
*
* This program is free software: you can redistribute it and/or modify |
<|file_name|>fields_generator.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
This module has a function that matches django fields to the corresponding
random value generator.
"""
from django.db.models.fields import BigIntegerField
from django.db.models.fields import BinaryField
from django.db.models.fields ... | elif isinstance(field, CharField):
return generate_string(field.max_length)
elif isinstance(field, UUIDField):
return generate_uuid() |
<|file_name|>messages.js<|end_file_name|><|fim▁begin|>const greetings = {<|fim▁hole|>};
module.exports = {
getMessage: function(callback) {
const d = new Date();
var hour = d.getHours();
if (hour >= 5 && hour < 12) {
return greetings.morning[Math.floor(Math.random() * greetings.morning.length)];
... | morning: ['God morgon!', 'Kaffe?', 'Ha en bra dag!', 'Hoppas du får en bra dag!', 'Sovit gott?'],
afternoon: ['Ganska fin du!', 'Trevlig eftermiddag!', 'Eftermiddags kaffe?', 'Glömde väl inte att fika?'],
evening: ['Trevlig kväll!', 'Ser bra ut!', 'Myskväll?!'], |
<|file_name|>app.routes.ts<|end_file_name|><|fim▁begin|>import {provideRouter,RouterConfig} from '@angular/router';
import {SetupComponent} from './setup.component';
import {HomePageComponent} from './homepage.component';
import {ThemingComponent} from './theming.component';
import {InputTextDemo} from './demo/inputtex... | {path: 'rating', component: RatingDemo},
{path: 'password', component: PasswordDemo},
{path: 'dialog', component: DialogDemo},
{path: 'togglebutton', component: ToggleButtonDemo}, |
<|file_name|>does-not-have-mapdata-internal-slot-weakmap.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 23.1.3.6
description: >
Throws a TypeError if `this` is a WeakMap object.
info... | ...
features: [WeakMap]
---*/
|
<|file_name|>test-missionlog.js<|end_file_name|><|fim▁begin|>const should = require('should');
const MissionLog = require('../lib/log').MissionLog;
const Severity = require('../lib/Severity');
describe('MissionLog', function () {
it('should test the properties', function () {<|fim▁hole|> });
it('should retu... | const Log = new MissionLog();
Log.should.have.property('severities').with.lengthOf(5);
Log.should.have.property('defaultSeverity'); |
<|file_name|>mgrb-terms.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-mgrb-terms',
templateUrl: './mgrb-terms.component.html',
styleUrls: ['./mgrb-terms.component.css']
})
export class MgrbTermsComponent implements OnInit {<|fim▁hol... |
constructor() {
}
|
<|file_name|>Tw2VectorSequencer.js<|end_file_name|><|fim▁begin|>function Tw2VectorSequencer()
{
this.name = '';
this.start = 0;
this.value = vec3.create();
this.operator = 0;
this.functions = [];<|fim▁hole|> this._tempValue = vec3.create();
}
Tw2VectorSequencer.prototype.GetLength = function (... | |
<|file_name|>rtconfig.py<|end_file_name|><|fim▁begin|>import os
<|fim▁hole|>
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc':
print '================ERROR===... | # toolchains options
ARCH='arm'
CPU='cortex-m0'
CROSS_TOOL='keil' |
<|file_name|>joint.rs<|end_file_name|><|fim▁begin|>#![allow(missing_docs)] // For downcast.
use downcast_rs::Downcast;
use na::{DVectorSliceMut, RealField};
use crate::math::{Isometry, JacobianSliceMut, Vector, Velocity};
use crate::object::{BodyPartHandle, Multibody, MultibodyLink};
use crate::solver::{ConstraintSet... | /// The number of degrees of freedom allowed by the joint.
fn ndofs(&self) -> usize;
/// The position of the multibody link containing this joint relative to its parent.
fn body_to_parent(&self, parent_shift: &Vector<N>, body_shift: &Vector<N>) -> Isometry<N>; |
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>};<|fim▁end|> | module.exports = {
createUser: require('./create-user') |
<|file_name|>haiku_finder_bot.py<|end_file_name|><|fim▁begin|>import re, requests, collections, praw, time
words=list()
syl=collections.OrderedDict()
###############################################################################################################
# Generate syll... |
for i in range(len(flat_comments)):
if (not isinstance(flat_comments[i], praw.objects.MoreComments) and str(haikus[h]).strip('["]')[3:20] in flat_comments[i].body): |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! An wrapper for the RealSense library.
//!<|fim▁hole|>//! # Example
//!
//! ```no_run
//! extern crate realsense;
//! use realsense as rs;
//!
//! fn main() {
//! let context = rs::Context::new().unwrap();
//! let device = context.get_device(0).unwrap();
//! ... | |
<|file_name|>UserAuth.java<|end_file_name|><|fim▁begin|>package com.xcode.bean;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
... | |
<|file_name|>parser.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 context within which CSS code is parsed.
use cssparse... | pub base_url: &'a Url, |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import (absolute_import, print_function, division)
<|fim▁hole|>class NotImplementedException(Exception):
pass<|fim▁end|> | |
<|file_name|>devtools-frontend.py<|end_file_name|><|fim▁begin|># Copyright 2019 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 sys
import config_util # pylint: disable=import-error
# This class doesn't need an ... | 'managed' : False,
'custom_deps' : {},
}
spec = { |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn main() {
let m_array = [55,66,27];<|fim▁hole|><|fim▁end|> | println!("{:?}",m_array.len());
println!("{:?}",m_array[0]);
print!("{:?}",m_array[3]);
} |
<|file_name|>socks.go<|end_file_name|><|fim▁begin|>package socks
import (
_ "bufio"
"errors"
"io"
"net"
"strconv"
"github.com/v2ray/v2ray-core"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
protocol "github.com/v2ray/v2ray-core/proxy/socks/protocol"
)
var (
ErrorAu... | close(finish)
} |
<|file_name|>RunnableFuture.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
@Override
void run();
}<|fim▁end|> | package minejava.reg.util.concurrent;
public interface RunnableFuture<V> extends Runnable, Future<V>{ |
<|file_name|>snmptd_mkevent.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ |... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Code generation for `#[derive(ScalarValue)]` macro.
use std::{collections::HashMap, convert::TryFrom};
use proc_macro2::{Literal, TokenStream};
use quote::{quote, ToTokens, TokenStreamExt as _};
use syn::{
parse::{Parse, ParseStream},
parse_quote,
spann... | };
input.try_parse::<token::Comma>()?;
}
Ok(out) |
<|file_name|>MercurialRule.java<|end_file_name|><|fim▁begin|>/**
* This file was copied from https://github.com/jenkinsci/mercurial-plugin/raw/master/src/test/java/hudson/plugins/mercurial/MercurialRule.java
* so we as well have a MercurialRule to create test repos with.
* The file is licensed under the MIT License,... | |
<|file_name|>pagerank.rs<|end_file_name|><|fim▁begin|>use super::super::{ Network, NodeId };
/// Runs pagerank algorithm on a graph until convergence.
/// Convergence is reached, when the last ranks vector and the new one
/// differ by less than `eps` in their L1-norm.
/// `beta` is the teleport probability. CAUTION: ... | (0,3,0.0,0.0),
(1,2,0.0,0.0),
(1,3,0.0,0.0), |
<|file_name|>operation_display.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code... | |
<|file_name|>future-incompatible-lint-group.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>
trait Tr {
// Warn only since this is not a `future_incompatible` lint
fn f(u8) {} //~ WARN anonymous parameters are deprecated
//~| WARN this is accepted in the current edition
}
pub mod submodule {
//... | // Ensure that the future_incompatible lint group only includes
// lints for changes that are not tied to an edition
#![deny(future_incompatible)] |
<|file_name|>docker_image_availability.py<|end_file_name|><|fim▁begin|>"""Check that required Docker images are available."""
import re
from pipes import quote
from ansible.module_utils import six
from openshift_checks import OpenShiftCheck
from openshift_checks.mixins import DockerHostMixin
NODE_IMAGE_SUFFIXES = ["... | |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from abc import ABCMeta, abstractmethod
import numpy as np
class Illustration2VecBase(object):
__metaclass__ = ABCMeta
def __init__(self, net, tags=None, threshold=None):
self.net = net
if tags is not None:
self.tags = np.array(ta... |
def _estimate(self, images):
assert(self.tags is not None) |
<|file_name|>51d493c4d3e1_remove_uniqueness_in_repo.py<|end_file_name|><|fim▁begin|>"""Remove uniqueness in Repo
Revision ID: 51d493c4d3e1
Revises: 5ac5404bfcd9
Create Date: 2015-05-11 18:55:46.065354
"""
# revision identifiers, used by Alembic.<|fim▁hole|>from alembic import op
import sqlalchemy as sa
def upgrade... | revision = '51d493c4d3e1'
down_revision = '5ac5404bfcd9'
|
<|file_name|>MainTest.java<|end_file_name|><|fim▁begin|>///**
// * ClassName: MainTest.java
// * Date: 2017年5月16日
// */
//package com.ojdbc.sql.test;
//
//import java.sql.Connection;
//import java.sql.SQLException;
//
//import com.ojdbc.sql.ConnectionObject;
//import com.ojdbc.sql.DataBase;
//import com.ojdb... | // passWord = "root";
// conn = mysql.createConnection(dataBaseURL, userName, passWord);
// System.out.println(conn.getMetaData().getURL());
//
|
<|file_name|>DiskStoreAttributes.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... | diskDirSizes = DiskStoreFactory.DEFAULT_DISK_DIR_SIZES;
diskDirSizesUnit = DEFAULT_DISK_DIR_SIZES_UNIT;
diskUsageWarningPct = DiskStoreFactory.DEFAULT_DISK_USAGE_WARNING_PERCENTAGE;
diskUsageCriticalPct = DiskStoreFactory.DEFAULT_DISK_USAGE_CRITICAL_PERCENTAGE; |
<|file_name|>api.js<|end_file_name|><|fim▁begin|>export const API_FAIL = 'API_FAIL';<|fim▁hole|><|fim▁end|> | export const SAVE_TIMELINE_FAIL = 'SAVE_TIMELINE_FAIL'; |
<|file_name|>mine.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
'''
The function cache system allows for data to be stored on the master so it can be easily read by other minions
'''
# Import python libs
import copy
import logging
# Import salt libs
import salt.crypt
import salt.payload
log = logging.getL... | salt '*' mine.send network.interfaces eth0
'''
if not func in __salt__:
return False |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from SimpleTCPClient import SimpleTCPClient
from SimpleTCPClientException import HTTPError, URLError<|fim▁hole|>__all__ = [SimpleTCPClient, HTTPError, URLError]<|fim▁end|> | |
<|file_name|>ibinaryexpression.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { IExpression } from './iexpression';
export enum BinaryOperatorType {
Subtraction,
Addition,
Division,
Multiplication,
Modulus, // %
And, // &
Or, // |
ExclusiveOr, // ^
... | |
<|file_name|>conclude_proposal.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand
from optparse import make_option
from django.utils import timezone
from orcamentos.proposal.models import Proposal
class Command(BaseCommand):
help = ''' Conclui orçamento. '''
option_list = Base... | |
<|file_name|>feature.rs<|end_file_name|><|fim▁begin|>use lv2::core::*;
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
struct MyFeature(u8);
unsafe impl Feature for MyFeature {
const URI: &'static [u8] = b"http://proko.eu/my_feature\0";
}
#[derive(Copy, Clone)]
struct MyVecFeature<'a>(pub &'a Vec<u8>);
unsafe impl... | let buf = FeatureBuffer::new(&[feature.descriptor(), feature_vec.descriptor()]);
|
<|file_name|>remotelinuxenvironmentaspect.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensee... | |
<|file_name|>qos.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, skdltmxn
// Licensed under the MIT License <LICENSE.md>
//! QoS definitions for NDIS components.
pub type SERVICETYPE = ::ULONG;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct FLOWSPEC {
pub TokenRate: ::ULONG,
pub TokenBucketSize: ::UL... | pub type PFLOWSPEC = *mut FLOWSPEC;
pub type LPFLOWSPEC = *mut FLOWSPEC; |
<|file_name|>CreateEditsLog.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... | int numFiles = 0;
short replication = 1;
int numBlocksPerFile = 0;
|
<|file_name|>svn.py<|end_file_name|><|fim▁begin|>"""Helper functions for an SVN build."""
from __future__ import absolute_import
from __future__ import print_function
import re
import os
import errno
from .constants import SVN_ROOT, SVN_REDHAT_PATH, SVN_RESTRICTED_BRANCHES, KOJI_RESTRICTED_TARGETS
from .error import E... | |
<|file_name|>framework.py<|end_file_name|><|fim▁begin|>"""AXScript Client Framework
This module provides a core framework for an ActiveX Scripting client.
Derived classes actually implement the AX Client itself, including the
scoping rules, etc.
There are classes defined for the engine itself, and for ScriptI... | |
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from django.apps import AppConfig
class ImagerProfileAppConfig(AppConfig):
name = "imager_profile"
verbose_name = "Imager User Profile"
def ready(self):<|fim▁hole|><|fim▁end|> | """code to run when the app is ready"""
from imager_profile import handlers |
<|file_name|>default_settings.py<|end_file_name|><|fim▁begin|>import os
PUPPETDB_HOST = 'localhost'
PUPPETDB_PORT = 8080
PUPPETDB_SSL_VERIFY = True
PUPPETDB_KEY = None<|fim▁hole|>PUPPETDB_CERT = None
PUPPETDB_TIMEOUT = 20
SECRET_KEY = os.urandom(24)
DEV_LISTEN_HOST = '127.0.0.1'
DEV_LISTEN_PORT = 5000
DEV_COFFEE_LOCAT... | |
<|file_name|>strategy.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unles... | newRoleBinding := obj.(*rbac.RoleBinding) |
<|file_name|>hls.js.d.ts<|end_file_name|><|fim▁begin|>declare class AbrController implements ComponentAPI {
protected hls: Hls;
private lastLoadedFragLevel;
private _nextAutoLevel;
private timer?;
private onCheck;
private fragCurrent;
private partCurrent;
private bitrateTestDelay;
re... | restrictedLevels: Array<number>;
timer: number | undefined;
private hls; |
<|file_name|>CompressedStream.go<|end_file_name|><|fim▁begin|>/*
Copyright 2011-2013 Frederic Langlet
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may obtain a copy of the License at
http://www.apache.org/licenses/L... | // Notify after entropy
evt, err := NewBlockEvent(EVT_AFTER_ENTROPY, currentBlockId,
int((this.ibs.Read()-read)/8), checksum1, this.hasher != nil)
|
<|file_name|>hours.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-hours',<|fim▁hole|>})
export class HoursPage {
started: boolean = false;
stopped: boolean = true;
const... | templateUrl: 'hours.html', |
<|file_name|>Sparse Matrix Multiplication.py<|end_file_name|><|fim▁begin|>class Solution(object):
def multiply(self, A, B):
"""
:type A: List[List[int]]
:type B: List[List[int]]
:rtype: List[List[int]]
"""
p = len(B[0])
C = [[0 for _ in xrange(p)] for _ in xra... | for j in xrange(len(B)):
if A[i][j] != 0:
for k in xrange(p):
C[i][k] += A[i][j] * B[j][k] |
<|file_name|>GameEventTest.js<|end_file_name|><|fim▁begin|>import GameEvent from "../../../src/artifact/js/GameEvent.js";
QUnit.module("GameEvent");
var GameEventTest = {};
QUnit.test("GameEvent properties Quest card drawn", function(assert)
{
var eventKey = GameEvent.QUEST_CARD_DRAWN;
var properties = GameEve... | |
<|file_name|>markov.py<|end_file_name|><|fim▁begin|>import argparse
from collections import defaultdict, Counter, deque
import random
import json
import time
from tqdm import tqdm
import wikipedia
class MarkovModel(object):
def __init__(self):
self.states = defaultdict(lambda: Counter())
self.tota... | return '\n'
def load_story(filenames): |
<|file_name|>exponential_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 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.... | |
<|file_name|>test_tasks.py<|end_file_name|><|fim▁begin|>"""
Tests for programs celery tasks.
"""
import json
from datetime import datetime, timedelta
import ddt
import httpretty
import mock
import pytz
from waffle.testutils import override_switch
from celery.exceptions import MaxRetriesExceededError
from django.conf im... | self.assertEqual(result, [1])
|
<|file_name|>NoOpReportersTest.java<|end_file_name|><|fim▁begin|>package com.github.alkedr.matchers.reporting.reporters;
import org.junit.Test;
import static com.github.alkedr.matchers.reporting.reporters.Reporters.noOpSafeTreeReporter;
import static com.github.alkedr.matchers.reporting.reporters.Reporters.noOpSimple... | reporter.beginAbsentNode(null);
reporter.beginBrokenNode(null, null);
reporter.endNode(); |
<|file_name|>render.ts<|end_file_name|><|fim▁begin|>import global from 'global';
import dedent from 'ts-dedent';
import { RenderContext, ElementArgs, OptionsArgs } from './types';
const { window: globalWindow, document } = global;
declare let Ember: any;
const rootEl = document.getElementById('root');
const config ... |
const component = instance.lookup('component:story-mode');
if (element) { |
<|file_name|>placeholderadmin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import sys
from django.contrib.admin.helpers import AdminForm
from django.utils.decorators import method_decorator
from django.db import transaction
from django.utils import simplejson
from django.views.decorators.clickjacking import... | from django.conf.urls import patterns, url |
<|file_name|>test_dhcp_ipv6.py<|end_file_name|><|fim▁begin|># Copyright 2014 OpenStack Foundation
# 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
#
# h... | kwargs = dict((k, v) for k, v in six.iteritems(kwargs) if v)
subnet, port = self._create_subnet_router(kwargs)
port_ip = next(iter(port['fixed_ips']), None)['ip_address'] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.