prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>monitor_test.py<|end_file_name|><|fim▁begin|>""" Test the "snabb lwaftr monitor" subcommand. Needs a NIC name and a TAP interface. 1. Execute "snabb lwaftr run" in on-a-stick mode and with the mirror option set. 2. Run "snabb lwaftr monitor" to set the counter and check its output. """ from random import...
<|file_name|>strings.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without...
"CMD_UNINDENT" : "Ausrücken", "CMD_DUPLICATE" : "Duplizieren", "CMD_COMMENT" : "Zeilen (aus-)kommentieren",
<|file_name|>day_6.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use std::iter::Peekable; use std::num::ParseFloatError; use std::str::Chars; pub fn calculate<'s>(src: Cow<'s, str>) -> Result<f64, ParseFloatError> { let mut iter = src.chars().peekable(); parse_expression(&mut iter) } fn parse_expressi...
}
<|file_name|>cond_v2_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 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.apac...
<|file_name|>issue-11709.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(dead_code)] // ignore-pretty issue #37199 <|fim▁hole|>// There are several tests in this run-pass that raised // when this bug was opened. The cases where the compiler // panics before the fix have a comment. struct S {x:()} fn test(slot: &...
// Don't panic on blocks without results
<|file_name|>filters.js<|end_file_name|><|fim▁begin|>angular.module('app') .filter('date', function(){ 'use strict'; return function(timestamp, format){ return timestamp ? moment(timestamp).format(format ? format : 'll') : '<date>'; }; }) .filter('datetime', function(){ 'use strict'; return function(tim...
})
<|file_name|>message_keys.py<|end_file_name|><|fim▁begin|>''' This file must hold keys for translatable messages that are used as variables it is important that a dummy _() function is used here this way message key will be pulled into django.po and can still be used as a variable in python files. ''' _ = lambda v:v #...
__all__ = []
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>import os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DEBUG = True ALLOWED_HOSTS = [] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'django_netjsongraph.db', } } SECRET_KEY = 'fn)t*+$)ugeyip6-#txyy$...
'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
<|file_name|>overloaded-calls-zero-args.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...
y: 3, }; let ans = s(); assert_eq!(ans, 9);
<|file_name|>merge.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import mergeStatic from './merge-static'; export default function merge<R>(...observables: (Observable<any>|number)[]): Observable<R> { observables.unshift(this); return mergeStatic.apply(this, observables); }<|fim▁end|>
import Observable from '../Observable';
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|>from zope import schema from sparc.entity import IEntity from sparc.organization import ICompany from sparc.organization import IOrganizableEntity class IAddress(IEntity): """A generic address""" address = schema.Text( title = u'Address', ...
description = u'Phone numbers for contact',
<|file_name|>feature_column_v2.py<|end_file_name|><|fim▁begin|># Copyright 2017 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|>GoogleDriveConnectionDefinition.java<|end_file_name|><|fim▁begin|>//============================================================================ // // Copyright (C) 2006-2022 Talend Inc. - www.talend.com // // This source code is available under agreement available at // %InstallDIR%\features\org.talend.rc...
assertEngineCompatibility(engine);
<|file_name|>make_all_epubs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os # Preliminary bit to get cgi scripts working def guess_http_host(): hostnames = { 'cloudy': 'objavi.halo.gen.nz', 'vps504': 'objavi.flossmanuals.net', } f = open('/etc/hostname') host = f.read().st...
<|file_name|>webpack.common.js<|end_file_name|><|fim▁begin|>const webpack = require("webpack"); const path = require("path"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const AssetsPlugin = require("assets-webpack-plugin"); module.exports ...
},
<|file_name|>Me.js<|end_file_name|><|fim▁begin|>var Exo = require('exoskeleton'); var Profile = Exo.Model.extend({ url: "/api/me", initialize: function(){ this.transformData(); this.on('change', this.transformData.bind(this)); }, transformData: function(){ this.name = this.get('displayName') || '@'...
module.exports = new Profile();
<|file_name|>qvideowidget.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Mob...
<|file_name|>lacp.py<|end_file_name|><|fim▁begin|># # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The iosxr_lacp class It is in this file where the current configuration (as dict) is compared to the provided configurat...
existing_lacp_facts = self.get_lacp_facts() commands.extend(self.set_config(existing_lacp_facts)) if commands:
<|file_name|>addNewPlugin.js<|end_file_name|><|fim▁begin|>/** * Adds a new plugin to plugin.json, based on user prompts */ (function(){ var fs = require("fs"), inquirer = require("inquirer"), chalk = require("chalk"), plugins = require("../plugins.json"), banner = requ...
return "This plugin has already been added to the list."; }
<|file_name|>parser_test.go<|end_file_name|><|fim▁begin|>package pgparser import ( "fmt" "testing" "github.com/stretchr/testify/assert" ) var ( singleRecordString = `({http://www.example.com/image1.png,http://www.example.com/image2.png},image/png,"a logo",123456)` multipleRecordString = `{"({http://www.exampl...
func TestMultipleRecords(t *testing.T) { a := assert.New(t)
<|file_name|>edmunds.py<|end_file_name|><|fim▁begin|>import os, requests, time import mydropbox edmunds = mydropbox.get_keys('edmunds') api_key = edmunds['api_key'] api_secret = edmunds['api_secret'] vin = mydropbox.read_dropbox_file(os.path.join('Records', 'Financials', 'Car', 'VIN')).strip() r = requests.get("https...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(...
<|file_name|>scan_job.go<|end_file_name|><|fim▁begin|>// copyright (c) 2017 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 // // http://www.apache.or...
<|file_name|>allow_deleting_browser_history_webdriver_test.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from absl import app from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_c...
# Copyright (c) 2019 The Chromium Authors. All rights reserved.
<|file_name|>algorithms_for_string_matching.hpp<|end_file_name|><|fim▁begin|>/* sdsl - succinct data structures library Copyright (C) 2010 Simon Gog 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 Softwar...
* * \par Time complexity * \f$ \Order{ t_{backward\_search} + z \cdot t_{SA} } \f$, where \f$z\f$ is the number of
<|file_name|>debug_hover_layout.py<|end_file_name|><|fim▁begin|># Copyright 2020 Makani Technologies LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
_NAME = 'Debug (Hover)'
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # API configuration ##################### DEBUG = False # Top-level URL for deployment. Numerous other URLs depend on this. CYCLADES_BASE_URL = "https://compute.example.synnefo.org/compute/" # The API will return HTTP Bad Request if the ?cha...
<|file_name|>ApplicationParameters4.go<|end_file_name|><|fim▁begin|>package iso20022 // Acceptor parameters dedicated to a payment application of the point of interaction. type ApplicationParameters4 struct { // Identification of the payment application. ApplicationIdentification *Max35Text `xml:"ApplId"` // Vers...
// Sensitive parameters (sequence of parameters including the envelope) encrypted with a cryptographic key. EncryptedParameters *ContentInformationType10 `xml:"NcrptdParams,omitempty"` }
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 ## Copyright (c) 2011 Steven D'Aprano. ## See the file __init__.py for the licence terms for this software. """ General utilities used by the stats package. """ __all__ = ['add_partial', 'coroutine','minmax'] import collections import fun...
xydata = as_sequence(xydata) nx, sumx = _generalised_sum((t[0] for t in xydata), None) if nx == 0: raise StatsError('no data items')
<|file_name|>IWORKPresentationRedirector.cpp<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* * This file is part of the libetonyek project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL ...
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/** Copyright 2017 Andrea "Stock" Stocchero 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...
<|file_name|>ct.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import argparse import json import sys import urllib.parse<|fim▁hole|>import urllib.request parser = argparse.ArgumentParser(description='Certificate transparency name extractor.') parser.add_argument('-d', '--domains', metavar='domain_file', type...
<|file_name|>stemcf3d.py<|end_file_name|><|fim▁begin|>"""The WaveBlocks Project Function for stem-plotting functions of the type f:IxI -> C with abs(f) as z-value and phase(f) as color code. This function makes a three dimensional stem plot. @author: R. Bourquin @copyright: Copyright (C) 2012, 2014, 2016 R. Bourquin ...
<|file_name|>authenticator.service.ts<|end_file_name|><|fim▁begin|>///<reference path="../coreReferences.ts"/> /** * Created by Johanna on 2015-08-28. */ module Moosetrail.Core.Authentication { export class Authenticator { authData: Authentication.TokenAuthorization; http: DataAccess.HttpDataFac...
login(username: string, password: string): ng.IPromise<DataAccess.DataResult> {
<|file_name|>resources.py<|end_file_name|><|fim▁begin|>from pymacaron.log import pymlogger import multiprocessing from math import ceil from pymacaron.config import get_config log = pymlogger(__name__) # Calculate resources available on this container hardware. # Used by pymacaron-async, pymacaron-gcp and pymacaron...
"""Return the number of gunicorn worker to run on this container hardware""" if cpu_count: return cpu_count * 2 + 1
<|file_name|>_nticks.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="funnel.marker.colorbar", **kwargs ):<|fim▁hole|> super(NticksValidator, self).__i...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import random, itertools, operator, types, pprint, contextlib, collections import textwrap, string, pdb, copy, abc, functools memoiziraj = functools.lru_cache(maxsize=None) def djeljiv(m, n): """Je li m djeljiv s n?""" return not m % n def ispiši(automat): ...
<|file_name|>random_unsigned_inclusive_range.rs<|end_file_name|><|fim▁begin|>use malachite_base::num::basic::unsigneds::PrimitiveUnsigned; use malachite_base::num::float::NiceFloat; use malachite_base::num::random::random_unsigned_inclusive_range; use malachite_base::random::EXAMPLE_SEED; use malachite_base_test_util::...
]; let pop_median = (127, Some(128)); let sample_median = (127, None);
<|file_name|>doucoin_es_MX.ts<|end_file_name|><|fim▁begin|><TS language="es_MX" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Create a new address</source> <translation>Crear una dirección nueva</translation> </message> <message> <source>&amp;New</source...
</context>
<|file_name|>level.js<|end_file_name|><|fim▁begin|>'use strict'; const Board = require('./board'), config = require('./config'), Characters = require('./characters'), LongTasks = require('./long-tasks'), Pause ...
CharacterParticleEmitter = require('./character-particle-emitter');
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>from shutil import copy from tkinter import * from tkinter import filedialog from tkinter import ttk from .GetStaticData import * from .SetStaticData import * # The following handles everything to do with the gui. (main) # variables starting with var are default value...
balance Entry)""" write_general_to_file(save_file_path, bool(var_misconduct.get()), bool(var_gangs.get()), bool(var_decay.get()),
<|file_name|>AbstractPersistentBean.java<|end_file_name|><|fim▁begin|>/*<license> Copyright 2005 - $Date$ by PeopleWare n.v.. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.o...
* @mudo We now have a dependency here on JPA via annotations. Also, the listener is defined in a subpackage, which * depends on this package. This introduces a cycle! This is a bad idea. Like this, you always need the JPA * libraries, even if they are annotations, because the annotations are loaded in th...
<|file_name|>resdef_parser_shader.cc<|end_file_name|><|fim▁begin|>/* resdef_parser_shader.cc -- Copyright (c) 2013 Noel Cower. All rights reserved. See COPYING under the project root for the source code license. If this file is not present, refer to <https://raw.github.com/nilium/snow/master/COPYING>. */ #include...
const std::map<string, GLuint> g_named_attribs { { "position", ATTRIB_POSITION }, { "color", ATTRIB_COLOR },
<|file_name|>WorldOverview.tsx<|end_file_name|><|fim▁begin|>import React from "react"; import { WorldGeneratorObject } from "../../../../services"; import { Row, Col } from "../../../layout"; import { Card, DatumGroup, PlanetDiagram } from "../../../ui"; export const WorldOverview = ({ world }: WorldOverviewProps) => ...
<DatumGroup title="Univeral world profile"
<|file_name|>dispatcher.go<|end_file_name|><|fim▁begin|>package statsd import ( "context" "fmt" "hash/adler32" "sync" "github.com/ash2k/stager/wait" "github.com/atlassian/gostatsd" "github.com/atlassian/gostatsd/pkg/statser" ) // AggregatorFactory creates Aggregator objects. type AggregatorFactory interface {...
id: i, } } return &MetricDispatcher{
<|file_name|>LessNodeTest.java<|end_file_name|><|fim▁begin|>package io.skysail.server.queryfilter.nodes.test; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.juni...
LessNode lessNode = new LessNode("A", 0); assertThat(lessNode.accept(new FilterVisitor() { @Override public String visit(ExprNode node) {
<|file_name|>team_delete.go<|end_file_name|><|fim▁begin|>// Code generated by entc, DO NOT EDIT. package ent import ( "context" "fmt" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" "github.com/gen0cide/laforge/ent/predicate" "github.com/gen0cide/laforge/ent/team" ) ...
func (tdo *TeamDeleteOne) Exec(ctx context.Context) error { n, err := tdo.td.Exec(ctx) switch {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use futures::Future; use hyper::service::service_fn_ok; use hyper::{Body, Request, Response}; use hyper::{Client, Server, Uri}; use std::str; use std::sync::atomic::{AtomicUsize, Ordering}; use tokio::runtime::Runtime; // Return the received request in the response body...
response_function: fn(Request<Body>) -> Response<Body>, ) -> Runtime { let address = "127.0.0.1:".to_owned() + &port.to_string();
<|file_name|>TaskAltSharp.js<|end_file_name|><|fim▁begin|>"use strict"; <|fim▁hole|>var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./ut...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from __future__ import print_function import socket import time import six import math import threading from random import choice import logging from kazoo.client import KazooClient from kazoo.client import KazooState...
for conn_str in connection_strings: args = {'hosts': conn_str}
<|file_name|>KmlDomConformanceTester.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 from xml.dom import minidom import re def atc_1_root_element(kml): """Verify that the root element of the document has [local name] = "kml" and [namespace name] = "http://www.opengis.net/km...
'_get_documentElement', '_get_documentURI', '_get_elem_info',
<|file_name|>test_authorization.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, absolute_import from mock import MagicMock from ....unittest import TestCase from oauthlib.oauth1 import RequestValidator from oauthlib.oauth1.rfc5849 import errors from oauthlib.oauth1.rfc5849.endpoints import Au...
self.validator.verify_request_token.return_value = False self.assertRaises(errors.InvalidClientError, self.endpoint.get_realms_and_credentials, self.uri)
<|file_name|>ssh_keys.rs<|end_file_name|><|fim▁begin|>use std::marker::PhantomData; use hyper::method::Method; use response; use request::RequestBuilder; use request::DoRequest; impl<'t> RequestBuilder<'t, response::SshKeys> { pub fn create(self, name: &str, pub_key: &str) -> RequestBuilder<'t, response::SshKey>...
// "name" : "my super key" RequestBuilder { method: Method::Post, auth: self.auth,
<|file_name|>test_enum.py<|end_file_name|><|fim▁begin|>import enum import inspect import pydoc import unittest from collections import OrderedDict from enum import Enum, IntEnum, EnumMeta, unique from io import StringIO from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL # for pickle tests try: ...
class NEI(NamedInt, Enum): __qualname__ = 'NEI'
<|file_name|>label.py<|end_file_name|><|fim▁begin|>from geoscript.style import util from geoscript.style.expression import Expression from geoscript.style.font import Font from geoscript.style.fill import Fill from geoscript.style.halo import Halo from geoscript.style.color import Color from geoscript.style.property im...
<|file_name|>pictureflow.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** * (C) Copyright 2007 Trolltech ASA * All rights reserved. ** * This is version of the Pictureflow animated image show widget modified by Trolltech ASA. * * * Redistribution and u...
// qDebug() << "TargetSlide = " << targetSlide;
<|file_name|>tactic_backup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # This is a simple command line script that can be used to backup the # TACTIC database. It is independent of TACTIC, so can be run on # servers where TACTIC is not install with the database. import datetime import os import time impor...
class DatabaseBackup(object):
<|file_name|>UAS_LinkedObject.hh<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
// $XConsortium: UAS_LinkedObject.hh /main/2 1996/06/11 16:38:08 cde-hal $
<|file_name|>Api.java<|end_file_name|><|fim▁begin|>package gea.api; <|fim▁hole|><|fim▁end|>
public class Api extends Thread{ }
<|file_name|>initial_state.rs<|end_file_name|><|fim▁begin|>use std::convert::TryFrom; use matches::assert_matches; use ruma_common::{ events::{AnyInitialStateEvent, InitialStateEvent}, RoomName, };<|fim▁hole|> #[test] fn deserialize_initial_state_event() { assert_matches!( serde_json::from_value(js...
use serde_json::json;
<|file_name|>init.rs<|end_file_name|><|fim▁begin|>use std::sync::{atomic, mpsc}; use std::{io, process, thread}; use ctrlc; use crate::control::acio; use crate::{args, control, disk, log, rpc, throttle, tracker}; use crate::{CONFIG, SHUTDOWN, THROT_TOKS}; pub fn init(args: args::Args) -> Result<(), ()> { if let ...
match init_threads() { Ok(threads) => {
<|file_name|>Selector.py<|end_file_name|><|fim▁begin|>from abc import ABC, abstractmethod class Selector(ABC): """docstring""" def __init__(self):<|fim▁hole|> pass<|fim▁end|>
pass @abstractmethod def make(self, population, selectSize, tSize):
<|file_name|>mate.py<|end_file_name|><|fim▁begin|><|fim▁hole|>OPEN = "mate-open" FILE_MANAGER = "caja"<|fim▁end|>
<|file_name|>test_records.py<|end_file_name|><|fim▁begin|>from __future__ import division, absolute_import, print_function import sys import collections import pickle import warnings from os import path import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_array_...
a = np.rec.fromrecords([(1, 'a'), (2, 'bbb')], dtype=[('a', int), ('b', np.object)]) assert_equal(a.a, [1, 2])
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export { default as ArrayInput } from './ArrayInput'; export { ValidateCallback } from './Form/ValidateCallback';<|fim▁end|>
export {FormState, createFormState, default as Form} from './Form/index'; export { default as formElement, FormElementProps } from './formElement'; export { default as Group } from './Group';
<|file_name|>resolv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright © 2013, IOhannes m zmölnig, IEM # This file is part of WILMix # # 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 # ...
# # This program is distributed in the hope that it will be useful,
<|file_name|>namespace_all.d.ts<|end_file_name|><|fim▁begin|>declare module "namespaces" { namespace FoobarNS { /** * A Foo. */ class Foo<T> { /** * A generic method. * @param f - A function. * @param [opt_this = 10] - An object. ...
var helloWorld2: boolean; const helloWorld3: string;
<|file_name|>XHtmlIdIndexer.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2009 JetBrains s.r.o. * * 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/licens...
protected Lexer createLexer(final BaseFilterLexer.OccurrenceConsumer consumer) {
<|file_name|>batchuploader_engine.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2012, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the...
import pwd import grp
<|file_name|>workerthread.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2014 - Garrett Regier # # 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...
# Prevent the queue.get() from blocking forever old_tasks.put(self.__sentinel)
<|file_name|>AccountServiceIntegration.java<|end_file_name|><|fim▁begin|>package org.knowm.xchange.test.exx; import java.io.IOException; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeFactory; import org.knowm.xchange.ExchangeSpecification; import org.knowm.xchange.exx.EXXExchange; import org.know...
exchangeSpecification.setSecretKey(secretKey);
<|file_name|>download_all.py<|end_file_name|><|fim▁begin|># Simple script to run required operations to # 1. Download FASTAs from database # 2. Copy FASTAs to nextflu directory # 3. Download titer tables from database # 4. Copy titer tables to nextflu directory # Run from base fauna directory with python flu/download_a...
for source in params.titers_sources: if source == "base": for lineage in params.flu_lineages:
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>import unittest from pyramid import testing class ViewTests(unittest.TestCase): def setUp(self): self.config = testing.setUp() def tearDown(self): testing.tearDown() <|fim▁hole|> request = testing.DummyRequest() info = comment(...
def test_my_view(self): from formhelpers2.views import comment
<|file_name|>Brocfile.js<|end_file_name|><|fim▁begin|>/* jshint node: true */ /* global require, module */ var EmberAddon = require( 'ember-cli/lib/broccoli/ember-addon' ); var packageConfig = require( './package.json' ); var replace = require( 'broccoli-string-replace' ); var env = require( './config/environment' ); ...
<|file_name|>RNA.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ segmentation-fold can predict RNA 2D structures including K-turns. Copyright (C) 2012-2016 Youri Hoogstrate This file is part of segmentation-fold and originally taken from yh-kt-fold. segmentation-fold is free software: you can redistribute ...
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__":<|fim▁hole|> from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "downloadmusic.settings")
<|file_name|>AbstractRankingFunction.py<|end_file_name|><|fim▁begin|># This file is part of Lerot. # # Lerot is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
def get_document_probability(self, docid): raise NotImplementedError("Derived class needs to implement "
<|file_name|>OpenHABRestConnection.java<|end_file_name|><|fim▁begin|>package org.openbase.bco.device.openhab.communication; /*- * #%L * BCO Openhab Device Manager * %% * Copyright (C) 2015 - 2021 openbase.org * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the...
private void setConnectState(final ConnectionState.State connectState) {
<|file_name|>awsbilling.py<|end_file_name|><|fim▁begin|>""" This module handles parsing the AWS Billing Reports (stored on S3 in .zip or just plain .csv format) and creating metrics to be sent to the WF proxy. """ import ConfigParser import datetime import io import os import sys import time import traceback import zi...
return if not self.config.enabled: self.logger.info('Billing is disabled')
<|file_name|>VoiceKey.cpp<|end_file_name|><|fim▁begin|>/********************************************************************** Audacity: A Digital Audio Editor VoiceKey.cpp ?? Dominic Mazzoni ?? Shane Muller *******************************************************************//*! \class VoiceKey \brief Thi...
TestDirectionChangesUpdate(dc,WindowSizeInt,atrend,buffer[i],buffer[i+1],ztrend,buffer[i+WindowSizeInt],buffer[i+WindowSizeInt+1]); tests += (int)(dc > mThresholdDirectionChangesUpper); testThreshold++;
<|file_name|>api.js<|end_file_name|><|fim▁begin|>var assert = require('assert'), _ = require('underscore'), request = require('request'), config = require('../../config/'), apiHost = 'http://localhost:' + config.port + '/api'; describe('api', function () { describe('users', function () { // assuming tha...
<|file_name|>collector_tag.hpp<|end_file_name|><|fim▁begin|>#pragma once #include "generator/collector_interface.hpp" #include <fstream> #include <functional> #include <memory> #include <string> struct OsmElement; namespace base { class GeoObjectId; } // namespace base namespace generator { namespace cache { class...
<|file_name|>token.rs<|end_file_name|><|fim▁begin|>use std; /// A token. #[derive(Clone,Debug,PartialEq,Eq)] pub enum Token { /// A word. Word(String), /// A string literal. String(String), /// An integer literal. // TODO: use BigNum Integer(i64), /// A comment. /// /// If the c...
pub fn is_string(&self) -> bool { if let Token::String(..) = *self { true } else { false } }
<|file_name|>testcase_getatr.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """Unit tests for SCardConnect/SCardStatus/SCardDisconnect This test case can be executed individually, or with all other test cases thru testsuite_scard.py. __author__ = "http://www.gemalto.com" Copyright 2001-2012 gemalto Author: J...
<|file_name|>UserRepository.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. * * This program and the ac...
package org.icgc.dcc.submission.server.repository;
<|file_name|>query_time.go<|end_file_name|><|fim▁begin|>package gorethink import ( p "github.com/brendanobrienesq/gorethink/ql2" ) // Now returns a time object representing the current time in UTC func Now(args ...interface{}) Term { return constructRootTerm("Now", p.Term_NOW, args, map[string]interface{}{}) } // ...
<|file_name|>Vector3.java<|end_file_name|><|fim▁begin|>package cn.nukkit.math; /** * author: MagicDroidX * Nukkit Project */ public class Vector3 implements Cloneable { public double x; public double y; public double z; public Vector3() { this(0, 0, 0); } public Vector3(double x) ...
}
<|file_name|>cheddar.py<|end_file_name|><|fim▁begin|>import foauth.providers class Cheddar(foauth.providers.OAuth2):<|fim▁hole|> category = 'Tasks' # URLs to interact with the API authorize_url = 'https://api.cheddarapp.com/oauth/authorize' access_token_url = 'https://api.cheddarapp.com/oauth/token' ...
# General info about the provider provider_url = 'https://cheddarapp.com/' docs_url = 'https://cheddarapp.com/developer/'
<|file_name|>base.py<|end_file_name|><|fim▁begin|># Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
<|file_name|>lbaas_tests.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of ...
'list_pools')}) def test_pool_health_monitor_get(self): monitor = self.api_monitors.first() neutronclient.show_health_monitor(
<|file_name|>swagger_model.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import contextlib import logging import os import os.path import yaml from bravado_core.spec import is_yaml from six.moves import urllib from six.moves.urllib import parse as urlparse from bravado.compat import json from bravado.reques...
return load_url(url, http_client=http_client, base_url=base_url)
<|file_name|>SchemaLocalizerDlg.java<|end_file_name|><|fim▁begin|>/* Copyright (C) 2022, Specify Collections Consortium * * Specify Collections Consortium, Biodiversity Institute, University of Kansas, * 1345 Jayhawk Boulevard, Lawrence, Kansas, 66045, USA, support@specifysoftware.org * * This program is free so...
locales.add(new Locale(language, country, ""));
<|file_name|>VSPluginServer.hpp<|end_file_name|><|fim▁begin|>/* * This file is part of the Voodoo Shader Framework. * * Copyright (c) 2010-2013 by Sean Sube * * The Voodoo Shader Framework is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser * General Public License as publ...
{ public:
<|file_name|>ClipboardListener.java<|end_file_name|><|fim▁begin|>/** * <p>Title: ClipboardListener.java</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: NASA Ames Research Center</p> * @author Ronald Mak & Luca Severini <lucaseverini@mac.com> * @version 2.0 */ package rope1401; i...
while(true) { try
<|file_name|>forceGraph0-0-1.ts<|end_file_name|><|fim▁begin|>module powerbi.visuals { export class ForceGraph implements IVisual { public static capabilities: VisualCapabilities = { dataRoles: [ { name: 'Values', kind: VisualDataRoleKind.Gr...
<|file_name|>pt-BR.js<|end_file_name|><|fim▁begin|>// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP export default { 'People Finder': 'Localizador de Pessoas', 'Groups Finder': 'Localizador de Grupos', 'Locations Finder': 'Localizador de Locais', 'People': 'Pessoas', 'Groups': 'Grupos', ...
'Details': 'Detalhes', 'Owners': 'Proprietários',
<|file_name|>regions-infer-invariance-due-to-mutability-4.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-APACH...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>ntr_sender.rs<|end_file_name|><|fim▁begin|>use byteorder::{ByteOrder, LittleEndian}; use std::io; use std::io::prelude::*; use std::net::TcpStream; #[derive(Debug)] pub struct NtrSender { tcp_stream: TcpStream, current_seq: u32, is_heartbeat_sendable: bool, } impl NtrSender { pub fn new(tc...
pub fn set_is_heartbeat_sendable(&mut self, b: bool) { self.is_heartbeat_sendable = b;
<|file_name|>api.xpack.logstash.delete_pipeline.go<|end_file_name|><|fim▁begin|>// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to y...
if r.Pretty {
<|file_name|>expr.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/licenses/L...
ast::ExprKind::Array(ref expr_vec) => { rewrite_array(expr_vec.iter().map(|e| &**e), mk_sp(context.codemap.span_after(expr.span, "["), expr.span.hi), context,