prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ze_generated_example_sapmonitors_client_test.go<|end_file_name|><|fim▁begin|>//go:build go1.16 // +build go1.16 // 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) Au...
"<resource-group-name>", "<sap-monitor-name>",
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use std::io::{Read, BufReader, Cursor}; use FromCursor; use compression::Compression; use frame::frame_response::ResponseBody; use super::*; use types::{from_bytes, from_u16_bytes, UUID_LEN, CStringList}; use types::data_serialization_types::decode_timeuuid; use erro...
fn convert_frame_into_result(frame: Frame) -> error::Result<Frame> { match frame.opcode { Opcode::Error => { frame.get_body().and_then(|err| match err {
<|file_name|>check_config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # check_config.py # # Copyright 2012 Curtis Adkins <curtadkins@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
with open(diamond_back_config, 'w') as outfile: json.dump(data, outfile, sort_keys = True, indent = 4)
<|file_name|>toolboxeditor.tsx<|end_file_name|><|fim▁begin|>import * as srceditor from "./srceditor"; import * as toolbox from "./toolbox"; import * as compiler from "./compiler"; export abstract class ToolboxEditor extends srceditor.Editor { protected blockInfo: pxtc.BlocksInfo; protected blockGroupsCache: p...
filters.blocks["procedures_defnoreturn"] ||
<|file_name|>example_fll.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2011-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import print_function from __future__ import division from __future__ import unicode...
from gnuradio.eng_arg import eng_float, intx from argparse import ArgumentParser
<|file_name|>ProtoParser.py<|end_file_name|><|fim▁begin|># Generated from java-escape by ANTLR 4.4 from antlr4 import * from io import StringIO package = globals().get("__package__", None) ischild = len(package)>0 if package is not None else False if ischild: from .ProtoParserListener import ProtoParserListener els...
try: self.enterOuterAlt(localctx, 1) self.state = 256 self.match(self.RPC_LITERAL)
<|file_name|>test_deprecations.py<|end_file_name|><|fim▁begin|>import logging import pytest from traitlets.config import Config from dockerspawner import DockerSpawner def test_deprecated_config(caplog): cfg = Config() cfg.DockerSpawner.image_whitelist = {"1.0": "jupyterhub/singleuser:1.0"} log = loggi...
] assert spawner.allowed_images == {"1.0": "jupyterhub/singleuser:1.0"}
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth import urls as djangoauth_urls from search import views as search_views from b...
urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA_URL,
<|file_name|>SPFilter.java<|end_file_name|><|fim▁begin|>/* * The contents of this file are subject to the Mozilla Public * License Version 1.1 (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.mozilla.org/MPL/ * * Software ...
}
<|file_name|>stage.cpp<|end_file_name|><|fim▁begin|>#include "stage.h" #include <assert.h> #include <map> #include <string> #include <vector> #include "util.h" static std::vector<std::string> stageStrings = {"planning", "alpha", "beta", "release", "mature", "inactive", "abandoned", "deleted", "unknown"}; st...
<|file_name|>Dialog.java<|end_file_name|><|fim▁begin|>package eu.ailao.hub.dialog; import eu.ailao.hub.corefresol.answers.ClueMemorizer; import eu.ailao.hub.corefresol.concepts.ConceptMemorizer; import eu.ailao.hub.questions.Question; import java.util.ArrayList; /** * Created by Petr Marek on 24.02.2016. * Dialog ...
* Adds question to dialog * @param questionID id of question */
<|file_name|>mungeopts.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 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 Unle...
opts.RegisterString(&GCS.LogDir, "gcs-logs-dir", "", "Directory containing test logs.") opts.RegisterString(&GCS.PullLogDir, "pull-logs-dir", "", "Directory of the PR builder.") opts.RegisterString(&GCS.PullKey, "pull-key", "", "String to look for in job name for it to be a pull (presubmit) job.")
<|file_name|>client.py<|end_file_name|><|fim▁begin|>import quickfix import copy import uuid import random import datetime import yaml from twisted.internet import task from sim import (FixSimError, FixSimApplication, create_fix_version, instance_safe_call, create_logger, IncrementID, load_yaml) clas...
else: raise RuntimeError("Unknown entry type %s" % str(entry_type))
<|file_name|>pool.rs<|end_file_name|><|fim▁begin|>//! Connection pooling for a single MongoDB server. use error::Error::{self, ArgumentError, OperationError}; use error::Result; use Client; use coll::options::FindOptions; use command_type::CommandType; use connstring::Host; use cursor::Cursor; use stream::{Stream, Str...
locked.size = size; Ok(()) }
<|file_name|>label.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from "@angular/core"; import { HttpClient } from "@angular/common/http"; import { catchError} from "rxjs/operators"; import { RequestQueryParams } from "./RequestQueryParams"; import { Label } from "./interface"; import { buildHttpRequestO...
getLabels(
<|file_name|>db.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker engine = create_engine('sqlite:////tmp/db.sqlite', echo=True) Base = declarative_base() Session = sessionmaker(bind=engine)<|fim▁end|>
from sqlalchemy import create_engine
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban is free software; you can redistribute it and/or modify # it under the terms of the GNU G...
'bin/fail2ban-client', 'bin/fail2ban-server', 'bin/fail2ban-regex',
<|file_name|>web_dialog_view_browsertest.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/bind.h" #include "base/callback_helpers.h" #include "base/loca...
raw_ptr<views::WebDialogView> view_ = nullptr;
<|file_name|>folders.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/cloud/resourcemanager/v2/folders.proto package resourcemanager // import "google.golang.org/genproto/googleapis/cloud/resourcemanager/v2" import proto "github.com/golang/protobuf/proto" import fm...
}, { MethodName: "MoveFolder", Handler: _Folders_MoveFolder_Handler,
<|file_name|>fabfile.py<|end_file_name|><|fim▁begin|>import os from fabric.api import env, run, cd, sudo, settings from fabric.contrib.files import upload_template def get_env_variable(var_name): """ Get the environment variable or return exception """ try: return os.environ[var_name] except KeyE...
run('mkdir media') run('mkdir static')
<|file_name|>AccountDetails.test.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { screen } from '@testing-library/react'; import { createMemoryHistory } from 'history'; import '__mock__/stripesCore.mock'; import renderWithRouter from 'helpers/renderWithRouter'; import account from 'fixtures/account'...
const props = {
<|file_name|>checkdbs.py<|end_file_name|><|fim▁begin|># Copyright (C) 1998-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 F...
# example, the request was pended while the list's language was French, # but then it was changed to English before checkdbs ran. text = NL.join(upending)
<|file_name|>boost.py<|end_file_name|><|fim▁begin|>## # Copyright 2009-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://...
except OSError, err:
<|file_name|>OnItemSelected.java<|end_file_name|><|fim▁begin|>package butterknife; import android.view.View; import butterknife.internal.ListenerClass; import butterknife.internal.ListenerMethod; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static android.widget.AdapterView.OnItem...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#from setuptools import setup from distutils.core import setup setup( name='pilfer', version='2.0',<|fim▁hole|> author='NapoleonWils0n', maintainer='NapoleonWils0n', license='GPL', keywords='ffmpeg rtmpdump kodi', packages=['pilfer'], #s...
description='pilfer command line tool to record audio and video from Kodi', url='https://github.com/NapoleonWils0n/pilfer',
<|file_name|>fix-model-selection.py<|end_file_name|><|fim▁begin|>from glob import glob import fitsio import sys from astrometry.util.fits import * from astrometry.util.file import * from astrometry.util.starutil_numpy import * from astrometry.libkd.spherematch import * from collections import Counter from legacypipe.on...
<|file_name|>0003_auto_20140804_0236.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def generate_initial_block_types(apps, schema_editor): User = apps.get_model("auth", "User") root = User.objects.filter(username="root")...
has_gallery=False, has_color=False, has_video=False, has_tags=False,
<|file_name|>scatter.py<|end_file_name|><|fim▁begin|>from __future__ import division import numpy as np from bokeh.plotting import figure, HBox, output_file, show, VBox from bokeh.models import Range1d # create some data using python lists x1 = [1, 2, 5, 7, -8, 5, 2, 7, 1, -3, -5, 1.7, 5.4, -5] y1 = [5, 6, -3, ...
# create some data using numpy arrays x2 = np.random.random(size=100) * 20 - 10 y2 = np.random.random(size=100) * 20 - 10
<|file_name|>descriptors.py<|end_file_name|><|fim▁begin|>import django from django.db import router from django.db.models import signals try: from django.db.models.fields.related import ReverseManyRelatedObjectsDescriptor except ImportError: from django.db.models.fields.related import ManyToManyDescriptor as Rever...
<|file_name|>test_valgrind.py<|end_file_name|><|fim▁begin|>import pytest from cplpy import run_test, prepare_config import subprocess as sp import os import glob class cd: """Context manager for changing the current working directory""" def __init__(self, newPath): self.newPath = os.path.expanduser(new...
+ "-Wl,-rpath=$CPL_PATH/lib/ -lcpl -o ./md") cfdcodes = "array_stuff.f90 cfd_sendrecv_cells.f90" bldcfd= ("mpif90 " + cfdcodes + " -I" + os.environ["CPL_PATH"] + "/include "
<|file_name|>test_mnist_tutorial_keras.py<|end_file_name|><|fim▁begin|># pylint: disable=missing-docstring import unittest import numpy as np # pylint bug on next line from tensorflow.python.client import device_lib # pylint: disable=no-name-in-module from cleverhans.devtools.checks import CleverHansTest HAS_GPU = 'GP...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[cfg(any(target_os="linux", target_os="freebsd"))] pub mod unix; #[cfg(any(target_os="linux", target_os="freebsd"))] pub mod windows {} #[cfg(target_os="windows")] pub mod windows;<|fim▁hole|><|fim▁end|>
#[cfg(target_os="windows")] pub mod unix {}
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* jshint node: true */ 'use strict'; var assign = require('object-assign'); <|fim▁hole|>module.exports = { name: 'ember-cli-cloudinary-images', config: function(environment, appConfig) { var CLOUDINARY = appConfig.CLOUDINARY || {}; return { CLOUDI...
<|file_name|>WildcardTermEnum.java<|end_file_name|><|fim▁begin|>package org.apache.lucene.search; /** * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of th...
} protected final boolean termCompare(Term term) {
<|file_name|>integration_tests.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 mod serial_utils; use devices::legacy::EventFdTrigger; use devices::legacy::SerialEventsWrapper; use devices::legacy::SerialWrapper; use devi...
// On the main thread, we will simulate guest "vCPU" thread serial reads.
<|file_name|>config_local.py<|end_file_name|><|fim▁begin|>"""Empty stub file that will import with no errors if the PYTHON_PATH is set correctly. This file is imported by mwaconfig.py, so most MWA python code should import this. Use it to put global initialisation code in here, if any. """<|fim▁hole|> pass<|...
<|file_name|>0_TileToken.js<|end_file_name|><|fim▁begin|>/** * Test for LOOMIA TILE Token * * @author Pactum IO <dev@pactum.io> */ import {getEvents, BigNumber} from './helpers/tools'; import expectThrow from './helpers/expectThrow'; const loomiaToken = artifacts.require('./TileToken'); const should = require('c...
const senderBalance = await tileTokenInstance.balanceOf(owner); senderBalance.should.be.bignumber.equal(balanceBefore.sub(amount));
<|file_name|>stack.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 coroutine-rs Developers // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This file may not be...
/// Returns the top of the stack from which on it grows downwards towards bottom(). #[inline] pub fn top(&self) -> *mut c_void { self.top
<|file_name|>clock_offset_corrector.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Clock offset corrector # Author: Piotr Krysik # Generated: Wed Nov 19 08:38:40 2014 ################################################## <|fim▁...
from gnuradio import blocks
<|file_name|>controller.js<|end_file_name|><|fim▁begin|>document.body.onkeydown = function( e ) { var keys = { 37: 'left', 39: 'right', 40: 'down', 38: 'rotate', 80: 'pause' }; if ( typeof keys[ e.keyCode ] != 'undefined' ) { keyPress( keys[ e.keyCode ] ); ...
};
<|file_name|>comment.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for codemirror // Project: https://github.com/marijnh/CodeMirror // Definitions by: Nikolaj Kappler <https://github.com/nkappler> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // See docs https://codemirror.net/doc/manual.h...
/** When adding line comments and this is turned on, it will align the comment block to the current indentation of the first line of the block. */ indent?: boolean;
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup PKGLIST = ['gearman_geodis'] setup(name='gearman-geodis', version='1.0.0',<|fim▁hole|> license='Apache License, Version 2.0', packages=PKGLIST, scripts=['gearman_geodis/geodis_worker.py', 'gearman_geodis/g...
description='Geolocation Gearman worker powered by Geodis', author_email='engineering@shazamteam.com',
<|file_name|>day_10.rs<|end_file_name|><|fim▁begin|>#[derive(Default)] pub struct Game { rolls: Vec<i32> } impl Game { pub fn new() -> Game { Game { rolls: Vec::with_capacity(21) } } pub fn roll(&mut self, pins: i32) { self.rolls.push(pins); } pub fn score(&self) -> i32 { ...
assert_eq!(game.score(), 20);
<|file_name|>WebServer.py<|end_file_name|><|fim▁begin|>''' Kurgan AI Web Application Security Analyzer. http://www.kurgan.com.br/ Author: Glaudson Ocampos - <glaudson@vortexai.com.br> Created in May, 11th 2016. ''' import db.db as db import config as cf class WebServer(object): banner = None os = None s...
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.rrajath.orange; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(B...
} return super.onOptionsItemSelected(item); }
<|file_name|>c.rs<|end_file_name|><|fim▁begin|>//! C definitions used by libnative that don't belong in liblibc #![allow(nonstandard_style)] #![cfg_attr(test, allow(dead_code))] #![unstable(issue = "none", feature = "windows_c")] use crate::os::raw::NonZero_c_ulong; use crate::os::raw::{c_char, c_int, c_long, c_longl...
#[repr(C)] pub struct WSAPROTOCOL_INFO { pub dwServiceFlags1: DWORD,
<|file_name|>default.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 // http://www.apache.org/li...
<|file_name|>event-key.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:44bac44ffbed21920407278ce3bc7678e40959a50ea1544d0cb61289445b900e size 3181
<|file_name|>dvb.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 Ilkka Rauta // // 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 // // U...
<|file_name|>UINT32_and-test.js<|end_file_name|><|fim▁begin|>var assert = require('assert') var UINT32 = require('..').UINT32 describe('and method', function () { describe('0&1', function () { it('should return 0', function (done) { var u = UINT32(0).and( UINT32(1) ) assert.equal( u.toNumber(), 0 ...
})
<|file_name|>svm_peer_permission_create_parameters.go<|end_file_name|><|fim▁begin|>// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "...
<|file_name|>globals.js<|end_file_name|><|fim▁begin|>// Mucking with different levels let currentLevel = { cells: undefined, dims: undefined }; if (0) {<|fim▁hole|> currentLevel.dims = LEVEL_ONE_DIMS; } // Return a reference to the (logical) cell's unique object const _getCellReference = (i, j, k = 1) => { if (i < 0...
currentLevel.cells = level; currentLevel.dims = level_dims; } else { currentLevel.cells = LEVEL_ONE;
<|file_name|>registerExports.js<|end_file_name|><|fim▁begin|>'use strict'; function registerExports(gulpInst, tasks) { var taskNames = Object.keys(tasks);<|fim▁hole|> taskNames.forEach(register); } function register(taskName) { var task = tasks[taskName]; if (typeof task !== 'function') { retu...
if (taskNames.length) {
<|file_name|>deploy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from build import build from push import push from clean import clean def deploy(args, config):<|fim▁hole|> ''' build(args, config) push(args, config)<|fim▁end|>
''' convenience function that builds and pushes in one call
<|file_name|>TacticMediaCommand.java<|end_file_name|><|fim▁begin|>package com.cabinetms.client; import java.util.List; import com.google.common.collect.Lists; public class TacticMediaCommand { private String command; // 指令 private String clientIp; // 终端IP地址 private String destination; // 终端队列地址 private Integer s...
return command; } public void setCommand(String command) {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Macros for the linear algebra modules. #[macro_use] mod vector; #[macro_use] mod matrix; #[macro_use] mod assert_matrix_eq; #[macro_use]<|fim▁hole|> #[macro_use] mod assert_scalar_eq; mod comparison; pub use self::comparison::{ AbsoluteElementwiseComparator...
mod assert_vector_eq;
<|file_name|>client_compatibility_produce_consume_test.py<|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 thi...
self.timeout_sec = 60 self.producer_throughput = 1000
<|file_name|>rename.rs<|end_file_name|><|fim▁begin|>use crate::fs::asyncify; use std::io; use std::path::Path; /// Renames a file or directory to a new name, replacing the original file if<|fim▁hole|>/// /// This will not work if the new name is on a different mount point. /// /// This is an async version of [`std::f...
/// `to` already exists.
<|file_name|>status_tray_linux.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/status_icons/status_tray_linux.h" #include "build/bu...
} StatusIcon* StatusTrayLinux::CreatePlatformStatusIcon( StatusIconType type,
<|file_name|>archs.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
# limitations under the License. archs_list = ['ARM', 'ARM64', 'MIPS', 'MIPS64', 'X86', 'X86_64']
<|file_name|>DescribeFleetResult.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2017 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 License is located a...
}
<|file_name|>_iterative.py<|end_file_name|><|fim▁begin|>from time import time from collections import namedtuple import warnings from scipy import stats import numpy as np from ..base import clone from ..exceptions import ConvergenceWarning from ..preprocessing import normalize from ..utils import (check_array, check...
Index of the feature currently being imputed.
<|file_name|>single-segment.rs<|end_file_name|><|fim▁begin|>// aux-build:xcrate.rs // compile-flags:--extern xcrate // edition:2018 use crate; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` use *; //~ ERROR cannot glob-import all possible crates fn main() { let s = ::xcrate; //~ ER...
}
<|file_name|>match-vec-rvalue.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.or...
// pretty-expanded FIXME #23616
<|file_name|>notifiers.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Prometheus Team // 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 // /...
return nc.VSendResolved } // EmailConfig configures notifications via mail.
<|file_name|>web_children_hold.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-<|fim▁hole|># # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Michael Sandoz <michaelsandoz87@gmail.com>, Emanuel Cino # # The licence is in the f...
##############################################################################
<|file_name|>point_query.rs<|end_file_name|><|fim▁begin|>use math::{Point, Vect}; /// Trait of objects that can be tested for point inclusion and projection. pub trait PointQuery<P: Point, M> { /// Projects a point on `self` transformed by `m`. #[inline] fn project_point(&self, m: &M, pt: &P, solid: bool) ...
/// Computes the minimal distance between a point and `self` transformed by `m`. #[inline] fn distance_to_point(&self, m: &M, pt: &P) -> <P::Vect as Vect>::Scalar;
<|file_name|>MENUPARTS.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include <common/common.h> START_ATF_NAMESPACE enum MENUPARTS { MENUPartFiller0 = 0x0, MP_MENUITEM = 0x1, MP_MENUDROPDOWN = 0x2, MP_MENUBARITEM = 0x3, MP_MENUBARDROPDOWN = 0x4, MP_CHEVRON = 0x5, MP_SE...
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * iOS and Android apis should match. * It doesn't matter if you export `.ios` or `.android`, either one but only one. */ export * from './mapbox.ios'; // Export any shared classes, constants, etc. export * from './mapbox.common';<|fim▁end|>
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.utils.translation import ugettext_lazy as _ from .models import User class UserCreationForm(forms.ModelForm): password1 = forms.CharField(label=_("Password"), wi...
help_text=_("Enter the same password as above, for verification.") ) class Meta:
<|file_name|>terminal.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import logging import io from time import sleep import json import requests from . import * logging.basicConfig(filename='terminal.log', level=logging.DEBUG) class PyTerminal(): """ This class allows the execution of a command in th...
logging.debug(self._http_response_code) logging.debug(self._success)
<|file_name|>persian_normalize_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 Couchbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/li...
tests := []struct { input analysis.TokenStream output analysis.TokenStream }{
<|file_name|>cfcapp.py<|end_file_name|><|fim▁begin|># import time from flask import Flask, json, request from flask.app import setupmethod from threading import Thread class DaemonThread(Thread): def start(self): self.daemon = True super(DaemonThread, self).start() class WSConnection(object): def __init__(self,...
endpoints = ['rx|'+v for v in self.my_vhosts] while 1: # block on read from a few lists...
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|>import osclib.api import osc.conf import os import os.path import vcr import pytest import requests TESTROOT = os.path.join(pytest.config.rootdir, "osclib-tests") OSCRC = os.path.join(TESTROOT, "oscrc", "oscrc_test_api") VCRROOT = os.path.join(TESTROOT, "fixtur...
<|file_name|>TocButton.spec.js<|end_file_name|><|fim▁begin|>import { mount } from '@vue/test-utils'; import TocButton from '../src/views/TocButton'; function createWrapper() {<|fim▁hole|> describe('Table of contents button', () => { it('should mount', () => { const wrapper = createWrapper(); expect(wrapper.e...
return mount(TocButton); }
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>""" Set-up script to install PyFAST locally """ from setuptools import setup setup(name='pyfast',<|fim▁hole|> author='Jenni Rinker', author_email='jennifer.m.rinker@gmail.com', license='GPL', packages=['pyfast'], zip_safe=False)<|fim▁end|>
version='0.1', description='Tools for working with wind turbine simulator FAST', url='https://github.com/jennirinker/PyFAST.git',
<|file_name|>ProcessModelImpl.java<|end_file_name|><|fim▁begin|>/** * Copyright 2011-2016 GatlingCorp (http://gatling.io) * * 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://w...
/** * The base model implementation for the Process service. Represents a row in the &quot;StressTool_Process&quot; database table, with each column mapped to a property of this class. *
<|file_name|>builtin-superkinds-simple2.rs<|end_file_name|><|fim▁begin|>// run-pass // Simple test case of implementing a trait with super-builtin-kinds. // pretty-expanded FIXME #23616 trait Foo : Send { } <|fim▁hole|> pub fn main() { }<|fim▁end|>
impl Foo for isize { }
<|file_name|>Point.ts<|end_file_name|><|fim▁begin|>import { MathHelper } from "./MathHelper"; import { Vector2D } from "./Vector2D"; import { Rect } from "./Rect"; export class Point { static readonly zero = new Point(0, 0); static readonly one = new Point(1, 1); static readonly four = new Point(4, 4); ...
const b = p1.y - p2.y;
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request class MassMailController(http.Controller): @http.route('/mail/track/<int:mail_id>/blank.gif', type='http', auth='none') def track_mail_open(self, mail_id, **post): ...
return response
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># # This sets up how models are displayed # in the web admin interface. # from django.contrib import admin from src.comms.models import Channel, Msg, PlayerChannelConnection, ExternalChannelConnection class MsgAdmin(admin.ModelAdmin): list_display = ('id', 'db_da...
<|file_name|>InfinispanRemoteConfigurationIT.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...
} } @Test
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import socket def get_free_port():<|fim▁hole|> sock.bind(("", 0)) port = sock.getsockname()[1] sock.close() return port<|fim▁end|>
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
<|file_name|>inventory.go<|end_file_name|><|fim▁begin|>package inventory import ( "github.com/docker/infrakit/pkg/controller/inventory" "github.com/docker/infrakit/pkg/discovery" "github.com/docker/infrakit/pkg/launch/inproc" logutil "github.com/docker/infrakit/pkg/log" "github.com/docker/infrakit/pkg/plugin" "g...
// if the plugin cannot be started. func Run(scope scope.Scope, name plugin.Name,
<|file_name|>bitmap.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2015, Michael Droettboom 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...
""" Bitmap_num_grays = """
<|file_name|>stateful.py<|end_file_name|><|fim▁begin|>""" Stateful module base class and interface description. All stateful Python modules - Get Skype4Py Skype instance on init - have full control over Skype and thus are not limited to !command handlers - Reside in the some modules/ folder as...
- Have #!/sevabot magic string at the head of the file
<|file_name|>snmp-decode.rs<|end_file_name|><|fim▁begin|>extern crate asn1_cereal; extern crate argparse; extern crate serde; extern crate serde_json; use asn1_cereal::{tag, byte}; use asn1_cereal::ber::stream; // SNMP ASN.1 Definition // https://tools.ietf.org/html/rfc1157#page-30 type ObjectIdentifier = u64; type ...
set_request(SetRequest), trap(TrapPDU), }
<|file_name|>review_jsp.java<|end_file_name|><|fim▁begin|>package com.sapienter.jbilling.client.jspc.payment; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import com.sapienter.jbilling.client.util.Constants; public final class review_jsp extends org.apache.jasper.runtime.Htt...
_jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- # COPYRIGHT (c) 2016 Cristóbal Ganter # # GNU AFFERO GENERAL PUBLIC LICENSE # Version 3, 19 November 2007 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licen...
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>lint-unsafe-block.rs<|end_file_name|><|fim▁begin|>// Copyright 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 // http://www.apache.o...
<|file_name|>test_decorators.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.test import TestCase from zerver.decorator import \ REQ, has_request_variables, RequestVariableMissingError, \ RequestVariableConversionError, JsonableError from zerver.lib.validator import ( check_string, chec...
x = {
<|file_name|>textarea.type.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; import { FieldType } from '@ngx-formly/core'; @Component({ selector: 'formly-field-kendo-textarea', template: ` <textarea class="k-textarea" [class.k-state-invalid]="showError" [formControl]=...
<|file_name|>SimpleGlobber.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/li...
import com.facebook.buck.skylark.io.Globber; import com.facebook.buck.util.MoreCollectors;
<|file_name|>test_input.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
"""
<|file_name|>counting-bits.py<|end_file_name|><|fim▁begin|>class Solution(object): def count_bits(self, n): c = (n - ((n >> 1) & 0o33333333333) - ((n >> 2) & 0o11111111111)) return ((c + (c >> 3)) & 0o30707070707) % 63 def countBits(self, num): """<|fim▁hole|> return map(self.coun...
:type num: int :rtype: List[int] """
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from sqlalchemy import UniqueConstraint from sqlalchemy.dialects.postgresql import JSONB from pns.app import app, db class SerializationMixin(): """serialization mixin for sqlalchemy model object """ def to_dict(s...
class Device(db.Model, SerializationMixin): """device resource """ id = db.Column(db.Integer, primary_key=True)
<|file_name|>bitcoin_cy.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="cy" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About BoostCoin</source> <translation type="unfinishe...
<message> <location line="-56"/>
<|file_name|>integer_from_rational.rs<|end_file_name|><|fim▁begin|>use malachite_base::num::arithmetic::traits::DivRound; use malachite_base::num::conversion::traits::{CheckedFrom, ConvertibleFrom, RoundingFrom}; use malachite_base::rounding_modes::RoundingMode; use malachite_nz::integer::Integer; use Rational; impl C...
<|file_name|>driverwriter.rs<|end_file_name|><|fim▁begin|>use core::fmt::{self, Write}; use crate::event::Event; use crate::KERNEL_EVENTEMITTER; pub struct DriverWriter { pub driver_id: Option<usize>, } impl DriverWriter { pub fn new() -> DriverWriter {<|fim▁hole|> self.driver_id = Some(driver_id); ...
DriverWriter { driver_id: None } } pub fn set_driver_id(&mut self, driver_id: usize) {
<|file_name|>contact_model.rs<|end_file_name|><|fim▁begin|>#![allow(missing_docs)] use downcast_rs::Downcast; use na::{DVector, RealField}; use ncollide::query::ContactId; use crate::detection::ColliderContactManifold; use crate::material::MaterialsCoefficientsTable; use crate::object::{BodyHandle, BodySet, ColliderH...
/// The modeling of a contact. pub trait ContactModel<N: RealField, Handle: BodyHandle, CollHandle: ColliderHandle>: