prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>leptonica.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ nidaba.plugins.leptonica ~~~~~~~~~~~~~~~~~~~~~~~~ Plugin accessing `leptonica <http://leptonica.com>`_ functions. This plugin requires a liblept shared object in the current library search path. On Debian-based systems it can be instal...
<|file_name|>macro-export-inner-module.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....
pub fn main() {
<|file_name|>observe.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at http://polymer.github.io/AUT...
}
<|file_name|>test_root.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import time import json import Image, StringIO import allura from mock import patch from nose.tools import assert_true, assert_false, assert_equal, assert_in from formencode.variabledecode import variable_encode from alluratest.c...
<|file_name|>permissions.py<|end_file_name|><|fim▁begin|>import enum class calendar_permissions(enum.IntEnum): ASCIT = 21<|fim▁hole|> FLEMING = 26 LLOYD = 27 PAGE = 28 RICKETTS = 29 RUDDOCK = 30 OTHER = 31 ATHLETICS = 32<|fim▁end|>
AVERY = 22 BECHTEL = 23 BLACKER = 24 DABNEY = 25
<|file_name|>CreateRecipe.test.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import React from 'react'; import { Provider } from 'react-redux'; import { mount } from 'enzyme'; import fakeStore from './fakeStore'; import CreateRecipe from '../../client/components/CreateRecipe.js'; describe('<CreateRec...
<|file_name|>timestamp.js<|end_file_name|><|fim▁begin|>var h = require('hyperscript') var human = require('human-time') exports.needs = {} <|fim▁hole|>exports.gives = 'message_meta' exports.create = function () { function updateTimestampEl(el) { el.firstChild.nodeValue = human(new Date(el.timestamp)) retur...
<|file_name|>reverse_shuffle_merge.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python def capable(d1,d2): for key in d1.keys(): if not d2.has_key(key) or d1[key] > d2[key] return False return True def main(s): count = {}<|fim▁hole|> else: count[c] = 1 A_count = { key:count[key]/2 for ...
for c in s: if count.has_key(c): count[c] += 1
<|file_name|>replacement.go<|end_file_name|><|fim▁begin|>// Copyright 2021 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 package types import ( "fmt" "strings" "sigs.k8s.io/kustomize/kyaml/resid" ) const DefaultReplacementFieldPath = "metadata.name" // Replacement defines how to perform a subst...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for Xiaomi Gateways.""" from datetime import timedelta import logging import voluptuous as vol from xiaomi_gateway import XiaomiGateway, XiaomiGatewayDiscovery from homeassistant import config_entries, core from homeassistant.const import ( ATTR_BAT...
} else:
<|file_name|>tsstats.py<|end_file_name|><|fim▁begin|>import numpy as np import numpy.ma as ma from numpy import linalg as LA import matplotlib.pyplot as plt import itertools import collections from scipy import stats def acf(x, lags=500, exclude=None): if exclude is None: exclude = np.zeros(x.shape) e...
<|file_name|>dummy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># from datetime import datetime credentials = '''{ "invalid": false, "token_uri": "https://accounts.google.com/o/oauth2/token", "refresh_token": "", "client_id": "351298984682.apps.googleusercontent.com", "token_expiry": "...
# # Dummy parameters for models created in unit tests
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![deny(warnings)] #![feature(plugin)]<|fim▁hole|> extern crate regex; extern crate term; extern crate binunit; use std::io::prelude::*; fn main() { let binunit = binunit::BinUnit::new(&std::env::current_dir().unwrap()); match binunit.run() { Ok(mut o...
#![plugin(regex_macros)]
<|file_name|>query15.rs<|end_file_name|><|fim▁begin|>use timely::dataflow::*; use timely::dataflow::operators::*; use timely::dataflow::operators::probe::Handle as ProbeHandle; use differential_dataflow::AsCollection; use differential_dataflow::operators::*; use differential_dataflow::lattice::Lattice; use ::Collecti...
}) .map(|(_,key)| ((key % 10) as u8, key)) .group_u(|_k, s, t| {
<|file_name|>createEpisodeTest.js<|end_file_name|><|fim▁begin|>'use strict'; const sinon = require('sinon'), q = require('q'), mockery = require('mockery'), _ = require('lodash'), should = require('chai').should(); describe('Create episode', () => { const idsGeneratorStub = () => '123'; it('Should call the ne...
deferred.resolve(); function checkResponse() {
<|file_name|>msr.rs<|end_file_name|><|fim▁begin|>//! MSR value list and function to read and write them. /// Write 64 bits to msr register. pub unsafe fn wrmsr(msr: u32, value: u64) { let low = value as u32; let high = (value >> 32) as u32; asm!("wrmsr" :: "{ecx}" (msr), "{eax}" (low), "{edx}" (high) : "me...
<|file_name|>testing.d.ts<|end_file_name|><|fim▁begin|>export declare type AsyncFactoryFn<T> = () => Promise<T>; export declare type AsyncOptionPredicate<T, O> = (item: T, option: O) => Promise<boolean>; export declare type AsyncPredicate<T> = (item: T) => Promise<boolean>; export interface BaseHarnessFilters { ...
locatorForOptional<T extends (HarnessQuery<any> | string)[]>(...queries: T): AsyncFactoryFn<LocatorFnResult<T> | null>; rootHarnessLoader(): Promise<HarnessLoader>; waitForTasksOutsideAngular(): Promise<void>;
<|file_name|>_hasidof.py<|end_file_name|><|fim▁begin|># # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 Fou...
#------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext
<|file_name|>models.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2016, Clemson University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain t...
('user', 'name'),
<|file_name|>shell.py<|end_file_name|><|fim▁begin|>import os from flask import current_app from flask.cli import FlaskGroup, run_command from opsy.db import db from opsy.app import create_app, create_scheduler from opsy.utils import load_plugins DEFAULT_CONFIG = '%s/opsy.ini' % os.path.abspath(os.path.curdir) def cr...
def main(): with create_opsy_app(None).app_context():
<|file_name|>func_tracked.rs<|end_file_name|><|fim▁begin|>use FuncUnsafe; use Symbol; /// A pointer to a shared function which allows a user-provided ref-counting implementation to avoid outliving its library. #[derive(Debug)] pub struct FuncTracked<T, TLib> { func: FuncUnsafe<T>, _lib: TLib, } impl <T, TLib>...
}
<|file_name|>welcome-view.js<|end_file_name|><|fim▁begin|>/** @babel */ /** @jsx etch.dom **/ import etch from 'etch'; export default class WelcomeView { constructor(props) { this.props = props; etch.initialize(this); this.element.addEventListener('click', event => { const link = event.target.clo...
</a> </header>
<|file_name|>pg.py<|end_file_name|><|fim▁begin|>import re import os import errno import shutil import hashlib from collections import namedtuple from uuid import uuid4 import psycopg2 import core.db.query_rewriter from psycopg2.extensions import AsIs from psycopg2.pool import ThreadedConnectionPool from psycopg2 import...
<|file_name|>directive_normalizer.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 */ import {CompileDirectiveMetadata, CompileStyleshee...
}
<|file_name|>comments-view.js<|end_file_name|><|fim▁begin|>import { div } from '../core/dom-api'; import { urls } from '../urls'; const commentsSort = (a, b) => { if (a.time < b.time) return -1; if (a.time > b.time) return 1; return 0; }; const commentElement = (data) => { let replies = data && data....
<|file_name|>extract_images.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np import turtle from argparse import ArgumentParser from base64 import decodestring from zlib import decompress # Python 2/3 compat<|fim▁hole|> _input = raw_input except NameError: _input = input '''T...
try:
<|file_name|>synth.py<|end_file_name|><|fim▁begin|>Experiment(description='Synthetic data sets of interest', data_dir='../data/synth/', max_depth=9, random_order=False, k=1, debug=False, local_computation=False, n_rand=9, sd=2, ...
<|file_name|>TeaVMPlatform.java<|end_file_name|><|fim▁begin|>package it.cavallium.warppi.teavm; import java.io.PrintWriter; import java.net.URL; import java.util.HashMap; import java.util.Map; import org.teavm.jso.browser.Window; import org.teavm.jso.dom.html.HTMLDocument; import it.cavallium.warppi.Platfo...
<|file_name|>stylus.js<|end_file_name|><|fim▁begin|>'use strict'; var getTemplatedStylesheet = require('./templatedStylesheet'), path = require('path');<|fim▁hole|><|fim▁end|>
module.exports = getTemplatedStylesheet(path.join(__dirname, '/templates/stylus.tpl'));
<|file_name|>t04.C<|end_file_name|><|fim▁begin|>// { dg-do assemble } template <class A> class B { public: A a; };<|fim▁hole|>static B<char> b_char; static B<unsigned char> b_uchar; int foo () { return b_int.a + b_char.a + b_uchar.a; }<|fim▁end|>
static B<int> b_int;
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib.admin.models import LogEntry from django.contrib.auth.models import User, Group, Permission<|fim▁hole|> from celsius.tools import register_for_permission_handling register(User) register(Group) register_for_permission_handling(User) register_for_p...
from simple_history import register
<|file_name|>update_blogs.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand from django.utils.timezone import now from ...models import BlogEntry, RelatedBlog, Feed from ...parser import get_all_entries, update_blog_supernav class Command(BaseCommand): """ Update blog entries an...
url=entry['url'],
<|file_name|>avl.cc<|end_file_name|><|fim▁begin|>// // avl.cc // // Copyright (C) 1996 Limit Point Systems, Inc. // // Author: Curtis Janssen <cljanss@limitpt.com> // Maintainer: LPS // // This file is part of the SC Toolkit. // // The SC Toolkit is free software; you can redistribute it and/or modify // it under the t...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(mod_path)] <|fim▁hole|>mod_path! keyexchange (concat!(env!("OUT_DIR"), "/keyexchange.rs")); mod_path! authentication (concat!(env!("OUT_DIR"), "/authentication.rs")); mod_path! mercury (concat!(env!("OUT_DIR"), "/mercury.rs")); mod_path! met...
extern crate protobuf;
<|file_name|>ometiff_write.py<|end_file_name|><|fim▁begin|>import javabridge import bioformats as bf import numpy as np from matplotlib import pyplot as plt, cm javabridge.start_vm(class_path=bf.JARS, run_headless=True) NT = 10 NC = 2 NZ = 4 NX = 217 NY = 94 output_path = 'outome.tif' frames = [] for t in range(NT...
assert(NXp == NX) assert(NYp == NY)
<|file_name|>test_3080_cmd_rm.py<|end_file_name|><|fim▁begin|>import unittest import os from pprint import pprint import pym_elfinder.exceptions as exc from .. import lib from .. import lib_localfilesystem as lfs class TestCmdRm(unittest.TestCase): @classmethod def setUpClass(cls): cls.finder = lib...
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|># This file is part of the Anitya project. # Copyright (C) 2017 Red Hat, Inc. # # 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 ...
# # This program is distributed in the hope that it will be useful,
<|file_name|>runparameters_xml.py<|end_file_name|><|fim▁begin|>from bs4 import BeautifulSoup class RunParameter_xml: ''' A class for reading runparameters xml file from Illumina sequencing runs :param xml_file: A runparameters xml file ''' def __init__(self, xml_file): self.xml_file = xml_file self....
raise ValueError( 'Missing NovaSeq workflow type: {0}'.\ format(workflowtype)) if soup.rfidsinfo and \
<|file_name|>credential.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from copy import deepcopy from cfme.utils import conf from cfme.utils.pretty import Pretty from cfme.utils.update import Updateable class FromConfigMixin(object): @staticmethod def rename_properties(creds): """ hel...
"auth_uri": "{auth}",
<|file_name|>test_extended_hypervisors.py<|end_file_name|><|fim▁begin|># Copyright 2014 IBM 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<|fim▁hole|># Unless required by applicable law or agreed to in ...
# a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #
<|file_name|>km.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.<|fim▁hole|>For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'wsc', 'km', { btnIgnore: 'មិនផ្លាស់ប្តូរ', btnIgnoreAll: 'មិនផ្លាស់ប្តូរ ទាំងអស់', bt...
<|file_name|>resource_cloudstack_network.go<|end_file_name|><|fim▁begin|>package cloudstack <|fim▁hole|> "net" "strings" "github.com/hashicorp/terraform/helper/schema" "github.com/xanzy/go-cloudstack/cloudstack" ) func resourceCloudStackNetwork() *schema.Resource { return &schema.Resource{ Create: resourceCloud...
import ( "fmt" "log"
<|file_name|>lookaside.go<|end_file_name|><|fim▁begin|>package docker import ( "fmt" "io/ioutil" "net/url" "os" "path" "path/filepath" "strings" "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/types" "github.com/ghodss/yaml" "github.com/opencontainers/go-digest" "github.c...
dir, err := os.Open(dirPath) if err != nil { if os.IsNotExist(err) {
<|file_name|>settings.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core';<|fim▁hole|>import { User } from '../classes/user'; import { NotificationService } from '../shared/notification.service'; @Component({ selector: 'xp-settings', templateUrl: './settings.component.h...
import { FormBuilder, Validators, FormGroup } from '@angular/forms'; import { AuthService } from '../core/auth.service'; import { UserService } from '../shared/user.service';
<|file_name|>test_add_group.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from model.group import Group <|fim▁hole|>def test_add_group(app): old_groups = app.group.get_group_list() group = Group(name="hjhj", header="jhjh", footer="jhjjhhj") app.group.create(group) new_groups = app.group.get_gr...
<|file_name|>AuthenticationManagerStandardInstallerAbstract.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. T...
<|file_name|>simple-lexical-scope.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....
// lldbg-check:[...]$3 = 10
<|file_name|>500.js<|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...
export default () => (
<|file_name|>util.go<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright 2012-present Oliver Eilhard. All rights reserved. // Use of this source code is governed by a MIT-license. // See http://olivere.mit-license.org/license.txt for details. package opentracing import ( "strconv" ) func atouint16(s string) uint1...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; var http = require('http'); var Pusher = require('pusher'); var Network = require('./model/network'); var Node = require('./model/node'); var Sensor = require('./model/sensor'); var Feature = require('./model/feature'); require('./model/relations'); /...
<|file_name|>AddComment.test.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { shallow } from 'enzyme';<|fim▁hole|>const USER = { user: { user: 'RSwanson', username: 'Ron_Swanson', imageURL: '', users: [ { name: 'April Ludwig', url: 'aprilL@parksdept.com', ...
import sinon from 'sinon'; import AddComment from './AddComment';
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// TODO: Remove #![allow(dead_code)] // TODO: make this private again, once #18241 is fixed // https://github.com/rust-lang/rust/issues/18241 pub mod item; pub mod block; pub use self::item::{ ItemExt, TypeDef, Interface, Class, ClassMember, Fie...
impl Type {
<|file_name|>test_forward_step.py<|end_file_name|><|fim▁begin|>import numpy as np import matplotlib.pyplot as plt import statsmodels.api as sm from selection.algorithms.lasso import instance from selection.algorithms.forward_step import forward_stepwise, info_crit_stop, sequential, data_carving_IC def test_FS(k=10): ...
plt.clf()
<|file_name|>webpack.production.config.js<|end_file_name|><|fim▁begin|>var path = require('path') var webpack = require('webpack') // Phaser webpack config var phaserModule = path.join(__dirname, '/node_modules/phaser-ce/') var phaser = path.join(phaserModule, 'build/custom/phaser-split.js') var pixi = path.join(phase...
})
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for Meteo-France raining forecast sensor.""" import logging from meteofrance_api.helpers import ( get_warning_text_status_from_indice_color, readeable_phenomenoms_dict, ) from homeassistant.config_entries import ConfigEntry from homeassistant.cons...
for sensor_type in SENSOR_TYPES:
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__":<|fim▁hole|> execute_from_command_line(sys.argv)<|fim▁end|>
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "platy.settings") from django.core.management import execute_from_command_line
<|file_name|>dispatcher.js<|end_file_name|><|fim▁begin|>'use strict'; var _ = require('lodash'); var Bacon = require('baconjs'); var logger = require('./logger'); var bus = new Bacon.Bus(); var dirtyStores = []; var dispatching = false; function dispatch(type, payload) { if (dispatching) { return Promise.rejec...
<|file_name|>chain.rs<|end_file_name|><|fim▁begin|>use cgmath::{Matrix4, Rad, SquareMatrix, Vector3}; use glium::{IndexBuffer, VertexBuffer};<|fim▁hole|> use inverse_kinematics::{State}; use model::{Model}; use render::vertices::{ForwardVertex}; #[allow(dead_code)] #[derive(Copy, Clone)] pub enum Axis { X = 0, Y = ...
use glium::backend::{Facade}; use glium::index::{PrimitiveType};
<|file_name|>lumina-textedit_ca.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="ca_ES"> <context> <name>ColorDialog</name> <message> <location filename="../ColorDialog.ui" line="14"/> <source>Customize Colors</source> <tran...
<|file_name|>lodash.js<|end_file_name|><|fim▁begin|>/** * Created by jiamiu on 14-4-10. */ var _=require('lodash') function A(){} A.prototype.fn = function(){ } var a = new A a.pro = {}<|fim▁hole|> var c = {} c.__proto__ = A.prototype _.assign( c, a ) c.own = {} console.log( c.fn === a.fn,a.pro === c.pro, c.o...
var b = _.cloneDeep(a) //console.log(b.fn,a.fn)
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime import json import os import shutil from django.conf import settings from django.core.files.storage import default_storage as storage from django.core.urlresolvers import reverse import mock from nose.tools import eq_, ok_...
<|file_name|>borrowck-scope-of-deref-issue-4666.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 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 ...
assert_eq!(23, *a_box.get());
<|file_name|>imagePreviewService.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('achan.previewer').service('imagePreviewService', function () { var source; var ImagePreviewService = { render: function (scope, element) { element.html('<img src="' + source + '" class="img-responsive" />'); ...
<|file_name|>file_win32.cc<|end_file_name|><|fim▁begin|>// Copyright 2008, Google Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the abo...
return ::DeleteFile(wstr.c_str()) ? true : false; } static const unsigned int BUFSIZE = 1024;
<|file_name|>create_profile.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python2.7 # encoding: utf-8 from __future__ import division from argparse import ArgumentParser import logging import sys from expertfinding import ExpertFinding from collections import Counter def main(): '''Command line options.''' ...
<|file_name|>nosqldb.ts<|end_file_name|><|fim▁begin|>import { Client } from 'cassandra-driver' export class Repository { protected nosqlClient: Client constructor(nosqlClient: Client) {<|fim▁hole|> } }<|fim▁end|>
this.nosqlClient = nosqlClient
<|file_name|>client.go<|end_file_name|><|fim▁begin|>// Package peering implements the Azure ARM Peering service API version 2020-10-01. // // Peering Client package peering // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license in...
} const APIVersion = "2020-10-01" queryParameters := map[string]interface{}{
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { NgModule, ApplicationRef } from '@angular/core'; import { AppComponent } from './app.component'; import { removeNgStyles, createNewHosts } from '@angularclass/hmr';<|fim▁hole|>import { AccordionDemoComponent } from './components/accordion.component'; @N...
import { BrowserModule } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { J3ComponentsModule } from '../src';
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Module Resty Date: November 25, 2013<|fim▁hole|>Company: SwissTech Consulting. Author: Patrick Glass <patrickglass@gmail.com> Copyright: Copyright 2013 SwissTech Consulting. This class implements a simple rest api framework for interfacing with the Server via ...
<|file_name|>Cisco_IOS_XR_infra_objmgr_cfg.py<|end_file_name|><|fim▁begin|>""" Cisco_IOS_XR_infra_objmgr_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR infra\-objmgr package configuration. This module contains definitions for the following management objects\: object\-group\: Object\-g...
@staticmethod def _meta_info(): from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_infra_objmgr_cfg as meta
<|file_name|>settings.js<|end_file_name|><|fim▁begin|>exports.view = function(req, res){ res.render('settings'); <|fim▁hole|><|fim▁end|>
};
<|file_name|>datasource_utils.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013,2014 VMware, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
<|file_name|>SyncUpdateBase.java<|end_file_name|><|fim▁begin|>package eu.geekhome.asymptote.model; public abstract class SyncUpdateBase<T> implements SyncUpdate<T> {<|fim▁hole|> public T getValue() { return _value; } public void setValue(T value) { _value = value; } public SyncUpd...
private T _value; @Override
<|file_name|>mainpage.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#define UNEXPANDED_HEIGHT 137 #include "mainpage.h" #include "ui_options.h" #include <QWidget> #include <QComboBox> #include <QHBoxLayout> #include <QVBoxLayout> #include <QGroupBox> #include <QCheckBox> #include <QLineEdit> #include <QMimeData> #incl...
#define ICON_SIZE QSize(48,48) #define EXPANDED_HEIGHT 413
<|file_name|>零件分组.cpp<|end_file_name|><|fim▁begin|>#include<cstdio> #include<cstring> #include<algorithm> #define maxn 1010 using namespace std; struct node { int len, weight; bool vis; node(int len = 0, int weight = 0, bool vis = false) :len(len), weight(weight), vis(vis){} }num[maxn]; int sum; boo...
<|file_name|>maskeditor.py<|end_file_name|><|fim▁begin|>import datetime import logging import os import numpy as np from matplotlib.path import Path from matplotlib.widgets import Cursor, EllipseSelector, LassoSelector, RectangleSelector from sastool.io.credo_cct import Exposure from scipy.io import loadmat, savemat ...
def on_saveas(self, button): filename = self.get_save_filename(None) if filename is not None:
<|file_name|>logisticRegression.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas import scipy, scipy.spatial import sklearn import sys from sklearn import linear_model from sklearn.metrics import precision_score, recall_score, f1_score import argparse def main(): parser = argparse.ArgumentParse...
for Xtest in pandas.read_table(args.test, sep=' ', header=None, iterator=True, chunksize=10000): ypred = clf.predict(Xtest)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from .atomicparsley import AtomicParsleyPP from .ffmpeg import ( FFmpegPostProcessor, FFmpegAudioFixPP, FFmpegEmbedSubtitlePP, FFmpegExtractAudioPP, FFmpegFixupStretchedPP, FFmpegMergerPP, FFmpegMe...
'AtomicParsleyPP', 'ExecAfterDownloadPP', 'FFmpegAudioFixPP',
<|file_name|>semaphore.cpp<|end_file_name|><|fim▁begin|>// // semaphore.cpp // // Circle - A C++ bare metal environment for Raspberry Pi // Copyright (C) 2021 R. Stange <rsta2@o2online.de> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License...
if (AtomicDecrement (&m_nCount) == 0) { assert (m_Event.GetState ());
<|file_name|>TestUser.ts<|end_file_name|><|fim▁begin|>// Source file from duniter: Crypto-currency software to manage libre currency such as Ğ1 // Copyright (C) 2018 Cedric Moreau <cem.moreau@gmail.com> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero G...
<|file_name|>filter.go<|end_file_name|><|fim▁begin|>package events // import "github.com/docker/docker/daemon/events" import ( "github.com/docker/distribution/reference" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" ) // Filter can filter out docker events from a stream t...
return ef.filter.FuzzyMatch(eventType, ev.Actor.ID) ||
<|file_name|>ai_easy_strategy_tests.py<|end_file_name|><|fim▁begin|>from nose.tools import * from tictactoe.ai_strategies.easy import Easy from tictactoe.game_board import GameBoard def easy_strategy_makes_any_opening_move_test(): ai = Easy("X", "O") board = GameBoard() move = ai.make_move(board) asser...
<|file_name|>dmat.rs<|end_file_name|><|fim▁begin|>//! Matrix with dimensions unknown at compile-time. #![allow(missing_docs)] // we hide doc to not have to document the $trhs double dispatch trait. use std::{cmp, mem}; use std::iter::repeat; use std::ops::{Add, Sub, Mul, Div, Index, IndexMut}; use std::fmt::{Debug, D...
if self.nrows == self.ncols { let mut res = self.clone();
<|file_name|>test_sys_call.py<|end_file_name|><|fim▁begin|># Copyright 2016: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at<|fim▁hole|># ...
#
<|file_name|>tracker.js<|end_file_name|><|fim▁begin|>(function() { "use strict"; window.GOVUK = window.GOVUK || {}; // For usage and initialisation see: // https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/analytics.md#create-an-analytics-tracker var Tracker = function(config) { this.t...
Assumes that the index of the dimension is the same for both classic and universal. Check this for your app before using this */ Tracker.prototype.setDimension = function(index, value, name, scope) {
<|file_name|>netbase.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Copyright (c) 2013-2013 Bluecoin Developers // Distributed under the MIT/X11 software license, see the a...
#endif
<|file_name|>dlg_sql_window.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2...
break aliasIndex += 1
<|file_name|>OperationalHoursDAO.java<|end_file_name|><|fim▁begin|>package uk.ac.abdn.fits.hibernate.dao; /** * @author Cheng Zeng, University of Aberdeen * */ <|fim▁hole|> import org.springframework.transaction.annotation.Transactional; import uk.ac.abdn.fits.hibernate.model.OperationalHours; @Transactional(r...
import java.util.List;
<|file_name|>IterUtils.java<|end_file_name|><|fim▁begin|>package org.lemurproject.galago.core.util; import org.lemurproject.galago.core.retrieval.iterator.BaseIterator; import org.lemurproject.galago.core.retrieval.traversal.Traversal; import org.lemurproject.galago.utility.Parameters; import java.util.ArrayList; imp...
if(!argp.isList("traversals")) { argp.put("traversals", new ArrayList<>());
<|file_name|>eventtarget.js<|end_file_name|><|fim▁begin|>// Copyright 2005 The Closure Library 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 // // htt...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from admin.nodes import views app_name = 'admin' urlpatterns = [ url(r'^$', views.NodeFormView.as_view(), name='search'), url(r'^flagged_spam$', views.NodeFlaggedSpamList.as_view(),<|fim▁hole|> name='known-ham'),...
name='flagged-spam'), url(r'^known_spam$', views.NodeKnownSpamList.as_view(), name='known-spam'), url(r'^known_ham$', views.NodeKnownHamList.as_view(),
<|file_name|>utils.js<|end_file_name|><|fim▁begin|>/* eslint-disable node/no-deprecated-api */ module.exports.pathBasename = pathBasename module.exports.hasSuffix = hasSuffix module.exports.serialize = serialize module.exports.translate = translate module.exports.stringToStream = stringToStream module.exports.debrack ...
}
<|file_name|>etcd.go<|end_file_name|><|fim▁begin|>package etcd import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/generic/registry" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage" "k8s.io/kubernetes/pkg/printers" printerstorage "...
} options := &generic.StoreOptions{
<|file_name|>user-md.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnPropert...
<|file_name|>burnin.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. # # 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; ei...
"""Execute one or more opcodes and manage the exec buffer.
<|file_name|>builders.js<|end_file_name|><|fim▁begin|>// Geometry building functions import Vector from '../vector'; import Geo from '../geo'; import earcut from 'earcut'; var Builders; export default Builders = {}; Builders.debug = false; Builders.tile_bounds = [ { x: 0, y: 0}, { x: Geo.tile_scale, y: -Ge...
} } // Clear the buffer
<|file_name|>NestedListEditor.py<|end_file_name|><|fim▁begin|>#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # This file is part of the E-Cell System # # Copyright (C) 1996-2016 Keio University # Copyright (C) 2008-2016 RIKEN # Copyright (C) 2005-2009 The Molecular...
def __nestedListToString( self, aNestedList, level = 1 ): if type(aNestedList ) == type(''):
<|file_name|>core.shims.js<|end_file_name|><|fim▁begin|>exports = module.exports = addShims; function addShims() { Function.prototype.extend = function(parent) { var child = this; var args = Array.prototype.slice.call(arguments, 0); child.prototype = parent; child.prototype = new (Function.prototype...
var parentProxy = child.prototype.parent = {}; for (var i in parent) {
<|file_name|>session.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright (C) 2012 Intel Corporation # # 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 Licens...
ui_auto_type = tset.get("ui-auto")
<|file_name|>elementIdClick.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|>}); exports.default = elementIdClick; var _ErrorHandler = require('../utils/ErrorHandler'); function elementIdClick(id) { if (typeof id !== 'string' && typeof id !== 'number') { throw new _ErrorHandler.ProtocolError('num...
Object.defineProperty(exports, "__esModule", { value: true