prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>applicationService.js<|end_file_name|><|fim▁begin|>import util from "../utils";
class ApplicationService {
getServiceFramework(controller) {
let sf = util.utilities.sf;
sf.moduleRoot = "PersonaBar";
sf.controller = controller;
return sf;
}
getGeneralSettings(c... | |
<|file_name|>mount_tr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="tr">
<context>
<name>DeviceActionInfo</name>
<message>
<location filename="../actions/deviceaction_info.cpp" line="45"/>
<source>The device <b><nobr>... | <location filename="../popup.cpp" line="68"/> |
<|file_name|>simple_worker.rs<|end_file_name|><|fim▁begin|>#[macro_use]
extern crate log;
extern crate bevy;
use std::collections::HashMap;
use std::sync::mpsc::{Receiver, Sender, channel};<|fim▁hole|>use bevy::net::client::{ClientID};
use bevy::net::work::{Work,WorkIdentifier,WorkEvent,ClientEvent,WorkerEvent,WorkEve... | use std::net::TcpStream;
use std::thread;
use bevy::net::worker::Worker; |
<|file_name|>test-aws-region.js<|end_file_name|><|fim▁begin|>/*global module, process */<|fim▁hole|><|fim▁end|> | module.exports = process.env.AWS_REGION || 'us-east-1'; |
<|file_name|>_monitors_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code ... | monitor_name=monitor_name,
body=body, |
<|file_name|>SoftwareTools.py<|end_file_name|><|fim▁begin|># -*- coding: iso-8859-1 -*-
from enigma import eConsoleAppContainer
from Components.Console import Console
from Components.About import about
from Components.PackageInfo import PackageInfoHandler
from Components.Language import language
from Components.Sources... | for package in self.packagesIndexlist[:]:
if not self.verifyPrerequisites(package[0]["prerequisites"]):
self.packagesIndexlist.remove(package) |
<|file_name|>jaglk.py<|end_file_name|><|fim▁begin|>import re
from jaglt import *
from jaglf import *
''' Regexes '''
JRE_Num = [
re.compile(r"[0-8]+o"), #Octal
re.compile(r"[\dA-F]+x"), #Hex
re.compile(r"(?:-?\d+(?:\.(?:\d+)?)?|\.\d+|-?\d+)e-?\d+"), #Scientific
re.compile(r"-?\d+(?:\.(?:\d+)?)?... | arr.append(JArray(map(lambda x: JNum(ord(x)), inner[s+1:e-1]))) |
<|file_name|>annotations_line2d.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
annotations_line2d module
Created on Thu Sep 10 21:51:23 2015
@author: James Sorenson
"""
import matplotlib
import matplotlib.pyplot as plt
# This is to prevent overlapping annotations from being dragged simultaneously
# due to... | # Determine if the new data coordinates reach or exceed the next line data point.
index=self.index
while (index > 0) and (self.xydata[index-1][0] > new_data_xy[0]): |
<|file_name|>recurrence_analysis_speleo_raw.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2014 Jonathan F. Donges
# Author: Jonathan F. Donges <donges@pik-potsdam.de>
# URL: <http://www.pik-potsdam.de/members/donges/software>
"""
Performs recurrence analysis of paleoclimate proxy recor... | print "Length of record:", t_max
print "Size of moving window:", T
print "Step size:", delta
print "Number of steps for moving window:", t_steps |
<|file_name|>db.py<|end_file_name|><|fim▁begin|>import pymysql.cursors
from model.group import Group
from model.contact import Contact
class DbFixture():
def __init__(self, host, name, user, password):
self.host = host
self.name = name
self.user = user
self.password = password
... | |
<|file_name|>bin_xlsx.ts<|end_file_name|><|fim▁begin|>/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* eslint-env node */
/* vim: set ts=2 ft=javascript: */
/// <reference types="../node_modules/@types/node/" />
const n = "xlsx";
import X = require("xlsx");
import 'exit-on-epipe';
import * as fs from 'f... | console.error(n + ": must specify a filename");
process.exit(1); |
<|file_name|>test_appx_gp.py<|end_file_name|><|fim▁begin|>import sys
import matplotlib.pyplot as plt
import numpy as np
import sklearn.gaussian_process
import sklearn.kernel_approximation
import splitter
from appx_gaussian_processes import appx_gp
TRAINING_NUM = 1500
TESTING_NUM = 50000
ALPHA = .003
LENGTH_SCALE =... | COMPONENTS))
plt.xlabel('GP uncertainty')
plt.ylabel('Approximate GP uncertainty') |
<|file_name|>pycallgraph.py<|end_file_name|><|fim▁begin|>import locale
from .output import Output
from .config import Config
from .tracer import AsyncronousTracer, SyncronousTracer
from .exceptions import PyCallGraphException
class PyCallGraph(object):
def __init__(self, output=None, config=None):
'''out... | 'No outputs declared. Please see the '
'examples in the online documentation.'
) |
<|file_name|>regex.rs<|end_file_name|><|fim▁begin|>use regex;
use serde_json::Value;<|fim▁hole|>
use super::super::errors;
impl super::Validator for regex::Regex {
fn validate(&self, val: &Value, path: &str) -> super::ValidatorResult {
let string = strict_process!(val.as_str(), path, "The value must be a s... | |
<|file_name|>pop.ts<|end_file_name|><|fim▁begin|>// ==LICENSE-BEGIN==
// Copyright 2017 European Digital Reading Lab. All rights reserved.
// Licensed to the Readium Foundation under one or more contributor license agreements.
// Use of this source code is governed by a BSD-style license
// that can be found in the LIC... | payload: param,
}; |
<|file_name|>localize.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""extends the standard Python gettext classes
allows multiple simultaneous domains... (makes multiple sessions with different languages easier too)"""
# Copyright 2002, 2003 St James Software
#
# This file is part of... | if tmsg is not None:
if isinstance(tmsg, unicode):
return tmsg
else: |
<|file_name|>LibraryFormContents.js<|end_file_name|><|fim▁begin|>import React from 'react';
import PropTypes from 'prop-types';
import FormField from '../../components/FormField';
import TextHelp from '../../components/TextHelp';
import DomainIdField from '../../components/DomainIdField';
import PodcastEdit from './Pod... | Published at: {url}<br />
<a href={`https://validator.w3.org/feed/check.cgi?url=${encodeURIComponent(url)}`}>
Test
</a> <a href="https://help.apple.com/itc/podcasts_connect/#/itcd88ea40b9"> |
<|file_name|>transactions.js<|end_file_name|><|fim▁begin|>'use strict'
var _ = require('lodash'),
CrudRoutes = require('../lib/crud-routes'),
transactions = require('../services/transactions'),
log = require('../lib/log');
<|fim▁hole|> parent: {
name: 'account'
},
protected: true
};
let ... | let opts = {
entity: 'transactions',
service: transactions,
user: true, |
<|file_name|>CheckField.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author dh2744
*/
import java.io.BufferedReader;
import java.io.F... | javax.swing.JButton makeRasterButton, |
<|file_name|>queue.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
"""
The ``queue` utils
==================
Some operation will require a queue. This utils file
"""
<|fim▁hole|>__credits__ = ['Salas']
__license__ = 'MIT'
__version__ = '0.2.0'
__maintainer__ = 'Salas'
__email__ = 'Salas.106.212... | __author__ = 'Salas'
__copyright__ = 'Copyright 2014 LTL' |
<|file_name|>view.rs<|end_file_name|><|fim▁begin|>// +--------------------------------------------------------------------------+
// | Copyright 2016 Matthew D. Steele <mdsteele@alum.mit.edu> |
// | |
// | This file is part of Syst... | } else { |
<|file_name|>monad.ts<|end_file_name|><|fim▁begin|>/**
* Created by edlc on 12/9/16.
* Contains basic `Monad` class and associated methods.
* For 'what is a monad'/back-story
* @see `Maybe` reference: [http://hackage.haskell.org/package/base-4.10.1.0/docs/Data-Maybe.html](http://hackage.haskell.org/package/base-4.1... | /** |
<|file_name|>mitkNavigationDataPassThroughFilter.cpp<|end_file_name|><|fim▁begin|>/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This... | mitk::NavigationDataPassThroughFilter::NavigationDataPassThroughFilter() |
<|file_name|>watch-files.js<|end_file_name|><|fim▁begin|>import watch from 'gulp-watch';
import browserSync from 'browser-sync';
import path from 'path';
<|fim▁hole|> * Gulp task to watch files
* @return {function} Function task
*/
export default function watchFilesTask() {
const config = this.config;
co... | /** |
<|file_name|>paytoedit.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal... | self.setStyleSheet(frozen_style if b else normal_style) |
<|file_name|>resource_thread.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! A thread that takes a URL and streams back the bi... | filemanager: filemanager,
};
|
<|file_name|>Upload.py<|end_file_name|><|fim▁begin|>from getpass import getuser
from Job import Job
from datetime import datetime
import os.path
import time
import re
import Database
class Upload( object ):
@classmethod
def CreateUpload( cls, filename=None ):
if not filename:
... | self._filename = r[2]
self._n_insert = r[3]
|
<|file_name|>app.js<|end_file_name|><|fim▁begin|>/**
* Module dependencies.
*/
var express = require('express');
var routes = require('./routes');
var user = require('./routes/user');
var http = require('http');
var path = require('path');
var app = express();
// all environments
app.set('port', process.env.PORT |... | app.use(express.logger('dev')); |
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com>
"""
Module for listing commands and help.
"""
from basemodule import BaseModule, BaseCommandContext
from alternatives import _
class HelpContext(BaseCommandContext):
def cmd_list(self, argument):
"""List command... | if help_item:
self.send(target, index[cmd_type][cmd]['summary'])
else: |
<|file_name|>validation.js<|end_file_name|><|fim▁begin|>define([
], function () {
'use strict';
return function (req, res, next) {
function filterParams(req, action) {
var paramsWhitelist = action.params,
whitelistParam,
paramValue,
type,
... | for (whitelistParam in paramsWhitelist) { |
<|file_name|>AspireDbFilterConfig.java<|end_file_name|><|fim▁begin|>/*
* The aspiredb project
*
* Copyright (c) 2012 University of British Columbia
*
* 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 ... | |
<|file_name|>arrayMap.js<|end_file_name|><|fim▁begin|>define([], function() {
/**
* A specialized version of `_.map` for arrays without support for callback
* shorthands or `this` binding.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invok... | return result; |
<|file_name|>packetParser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Welcome to Gobbler, the Scapy pcap parser and dump scripts
# Part of the sniffMyPackets suite http://www.sniffmypackets.net
# Written by @catalyst256 / catalyst256@gmail.com
import datetime
from layers.http import *
from layers.BadLayer... | |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'
// dependencies
var path = require('path'),
request = require('request'),
// container connections
ccs = [];
// function to get all containers
function GetAllContainers(host, func) {
request({
json: true,
method: 'G... | if (resp.statusCode != 200) {
return func(new Error("Status from server was: " + resp.statusCode), containers);
} |
<|file_name|>register.go<|end_file_name|><|fim▁begin|>package v1
import (
"github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// SchemeGroupVersion is group version used to regist... | return SchemeGroupVersion.WithResource(resource).GroupResource()
}
|
<|file_name|>error_handler.go<|end_file_name|><|fim▁begin|>package transport
import (
"context"
"github.com/go-kit/kit/log"
)
// ErrorHandler receives a transport error to be processed for diagnostic purposes.
// Usually this means logging the error.
type ErrorHandler interface {
Handle(ctx context.Context, err e... | // The ErrorHandlerFunc type is an adapter to allow the use of
// ordinary function as ErrorHandler. If f is a function
// with the appropriate signature, ErrorHandlerFunc(f) is a |
<|file_name|>environment.go<|end_file_name|><|fim▁begin|>package builder
import (
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"strings"
"sync"
"github.com/fatih/color"
)
//
// Description: Builder will build and run the three packages necessary to run.
//
// Example:
// go run environment.go
//
// RunEnvironme... | |
<|file_name|>tweenjs-tests.ts<|end_file_name|><|fim▁begin|>/// <reference types="easeljs"/>
var target = new createjs.DisplayObject();
// source : http://www.createjs.com/Docs/TweenJS/modules/TweenJS.html
// Chainable modules :
target.alpha = 1;<|fim▁hole|> //Tween complete
}<|fim▁end|> | createjs.Tween.get(target).wait(500, false).to({ alpha: 0, visible: false }, 1000).call(onComplete);
function onComplete() { |
<|file_name|>webgl.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use euclid::default::{Rect, Size2D};
use ipc_channel::ipc::{Ip... | StencilBackPassDepthPass = gl::STENCIL_BACK_PASS_DEPTH_PASS, |
<|file_name|>estimation_lccm_specification_ub91to95.py<|end_file_name|><|fim▁begin|># Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
specification = {}
specification = {
2:
{
"equation_ids":(1,2),
"constant":(0, "act_2_2"),
... | "h750":("h750_6_1","h750_6_2",0,0, 0),
"hmps":("hmps_6_1",0,0,0,0),
|
<|file_name|>query.py<|end_file_name|><|fim▁begin|>import datetime
import numbers
from django.db.models.fields import FieldDoesNotExist
from django.utils import tree
from django.core.exceptions import FieldError
try:
from django.db.models.sql.constants import LOOKUP_SEP
except:
from django.db.models.constants i... | raise TypeError('invalid lookup type')
def sql_for_column(self, qn, connection): |
<|file_name|>object_detection_evaluation.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
#
# ... | |
<|file_name|>ChunkInfo.java<|end_file_name|><|fim▁begin|>package derpstream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.PriorityQueue;
import java.util.TimerTask;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*... | String chunkPath = null; |
<|file_name|>list_retention.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 DDN. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
use super::*;
use crate::{extensions::RequestExt, font_awesome};
use iml_wire_types::snapshot::{ReserveUnit... | |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2018 jem@seethis.link
# Licensed under the MIT license (http://opensource.org/licenses/MIT)
from keyplus.utility import inverse_map
AES_KEY_LEN = 16
EP_VENDOR_SIZE = 64
VENDOR_REPORT_LEN = 64
FLASH_WRITE_P... | }
def report_mode_to_str(mode): |
<|file_name|>ScaleClipTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Publ... | final int[] rgb = (int[]) raster.getDataElements(x, y, null);
|
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponse, Http404
from django.template.loader import get_template
from django.template import RequestContext
from django.core.paginator import Paginator, EmptyPage
from django.utils.translation import ugettext as _
from tagging.models import... | from qqq.revisions.models import Revision |
<|file_name|>fetch_sra_files.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#(c) 2014 Emory University. All Rights Reserved
# Code written by: Michael Sauria (mgehrin@emory.edu)
<|fim▁hole|>import sys
import os
import subprocess
file_list, tmp_dir, out_dir, fastq_dump = sys.argv[1:5]
files = []
for line in ope... | |
<|file_name|>generic_derive.rs<|end_file_name|><|fim▁begin|>pub trait CustomType: prost::Message + Default {}
impl CustomType for u64 {}
#[derive(Clone, prost::Oneof)]
enum GenericEnum<A: CustomType> {
#[prost(message, tag = "1")]
Data(GenericMessage<A>),
#[prost(uint64, tag = "2")]
#[allow(dead_code)... | Number(u64),
}
#[derive(Clone, prost::Message)] |
<|file_name|>manage_team.js<|end_file_name|><|fim▁begin|>angular.module('teamform-manage_team-app', ['firebase'])
.controller('ManageTeamCtrl', ['$scope', '$firebaseObject', '$firebaseArray', function($scope, $firebaseObject, $firebaseArray) {
initalizeFirebase();
var teamleader;
firebase.auth().onAuthStateChange... | |
<|file_name|>test_run.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# This file is part of hopr: https://github.com/hopr/hopr.
#
# Hopr 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 versio... | make_eventparser = MagicMock(name='make_eventparser')
args = ['--log-level', 'debug', '--log-file', f.name] |
<|file_name|>ShadowMapMasterRenderer.java<|end_file_name|><|fim▁begin|>package shadows;
import java.util.List;
import java.util.Map;
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.vector.Matrix4f;
import org.lwjgl.util.vector.Vector2f;
import org.lwjgl.util.vector.Vector3f;
import entities.Camera;
im... | * Carries out the shadow render pass. This renders the entities to the
* shadow map. First the shadow box is updated to calculate the size and
|
<|file_name|>lv.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Latvian language.
*/
/**#@+
@type S... | // Textarea Dialog.
textarea :
{
|
<|file_name|>test_student_batch_name.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
<|fim▁hole|><|fim▁end|> | # test_records = frappe.get_test_records('Student Batch Name')
class TestStudentBatchName(unittest.TestCase):
pass |
<|file_name|>extern-calling-convention-test.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<|fim... | |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict';
const fs = require('fs'),
_ = require('lodash');
let config = require('./_default');
const ENV_NAME = process.env.NODE_ENV || process.env.ENV;<|fim▁hole|>
// Merge with ENV file if exits.
if (fs.existsSync(ENVIRONMENT_FILE)) {
const env = requi... | const ENVIRONMENT_FILE = `${__dirname}/_${ENV_NAME}.js`; |
<|file_name|>lasdiff.py<|end_file_name|><|fim▁begin|>try:
import traceback
import argparse
import textwrap
import glob
import os
import logging<|fim▁hole|>except ImportError as err:
print('Error {0} import module: {1}'.format(__name__, err))
traceback.print_exc()
exit(128)
script_pat... | import datetime
import multiprocessing
from libs import LasPyConverter |
<|file_name|>subnet-cal.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
<|fim▁hole|>#my_subnet = input("Enter Subnet address:")
my_ip = "192.168.1.100"
my_subnet = "255.255.255.0"
ip = my_ip.split(".")
print ip
# Check the validity of the ip address
while True:
#my_ip = input("Enter a ip address:")
if int(ip[0])... | |
<|file_name|>Capsule.py<|end_file_name|><|fim▁begin|>## @file
# generate capsule
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies t... | for driver in self.CapsuleDataList:
FileName = driver.GenCapsuleSubItem()
FwMgrHdr.write(pack('=Q', PreSize))
PreSize += os.path.getsize(FileName)
|
<|file_name|>project.config.ts<|end_file_name|><|fim▁begin|>import { join } from 'path';
import { SeedConfig } from './seed.config';
import { ExtendPackages } from './seed.config.interfaces';
/**
* This class extends the basic seed configuration, allowing for project specific overrides. A few examples can be found
... | export class ProjectConfig extends SeedConfig { |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(feature = "benchmark", feature(test))]
//! The module `seq` provides the lightweight, generic sequence container [`Seq`] for unmovable data.
//!
//! The container `Seq` is linking data of hierarchical function-scopes on top of each other,
//! forming sequen... | //! |
<|file_name|>vera.py<|end_file_name|><|fim▁begin|>"""
Support for Vera sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.vera/
"""
import logging
from homeassistant.const import (
TEMP_CELSIUS, TEMP_FAHRENHEIT)
from homeassistant.helper... | |
<|file_name|>environments.js<|end_file_name|><|fim▁begin|>// Here is where you can define configuration overrides based on the execution environment.
// Supply a key to the default export matching the NODE_ENV that you wish to target, and
// the base configuration will apply your overrides before exporting itself.
expo... | // ====================================================== |
<|file_name|>mne_browse_raw.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
r"""Browse raw data.
This uses :func:`mne.io.read_raw` so it supports the same formats
(without keyword arguments).
Examples
--------
.. code-block:: console
$ mne browse_raw sample_audvis_raw.fif \
--proj samp... | plt.show(block=True)
|
<|file_name|>test_views_item_delete.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Delete record ... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2005
# The President and Fellows of Harvard College.
#
# 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 mus... | # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University nor the names of its contributors |
<|file_name|>relay_benchmark_test.go<|end_file_name|><|fim▁begin|>package tchannel_test
import (
"fmt"
"sync"
"testing"
"time"
"github.com/bmizerany/perks/quantile"
"github.com/stretchr/testify/require"
. "github.com/uber/tchannel-go"
"github.com/uber/tchannel-go/benchmark"
"github.com/uber/tchannel-go/relay... | |
<|file_name|>settings_default.py<|end_file_name|><|fim▁begin|>'''
Created on Jun 20, 2016
@author: ionut
'''
import logging
logging.basicConfig(level=logging.DEBUG,
format='[%(asctime)s] - %(name)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
logging.getLogger("requests").setLevel(logging.WARNING... | 34, 44
]
|
<|file_name|>test.py<|end_file_name|><|fim▁begin|>###
# Copyright (c) 2005, Jeremiah Fincher
# 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 the ... | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by... | 'ErrorResponse',
'HelmOperatorProperties',
'ProxyResource',
'Resource', |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright 2015 Palo Alto 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 the License at
#
# http://www.apache.org/licenses/LICENSE... | self.f = f |
<|file_name|>uploader_test.go<|end_file_name|><|fim▁begin|>package s3util
import (
"io"
"io/ioutil"
"net/http"
"runtime"
"strings"
"testing"
)
func runUpload(t *testing.T, makeCloser func(io.Reader) io.ReadCloser) *uploader {
c := *DefaultConfig
c.Client = &http.Client{
Transport: RoundTripperFunc(func(req ... | |
<|file_name|>resource_aws_elasticsearch_domain_policy.go<|end_file_name|><|fim▁begin|>package aws
import (
"fmt"
"log"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice"
"github.com/hashicorp/terraform/helper/reso... |
log.Printf("[DEBUG] Received ElasticSearch domain: %s", out) |
<|file_name|>prism-puppet.js<|end_file_name|><|fim▁begin|>(function (Prism) {
Prism.languages.puppet = {
'heredoc': [
// Matches the content of a quoted heredoc string (subject to interpolation)
{
pattern: /(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2... | } |
<|file_name|>FineFilter.java<|end_file_name|><|fim▁begin|>package com.kitsu.medievalcraft.item.craftingtools.filters;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;<|fim▁hole|>
import cpw.mods.fml.common.registry.GameRegistry;
public class FineFilter extends Item {
private String name = "fineFi... |
import com.kitsu.medievalcraft.Main;
import com.kitsu.medievalcraft.util.CustomTab; |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::fs::File;
use std::io::{BufRead, BufReader};
fn is_ordered(s: &str) -> bool {
let mut prev = '\x00';
for c in s.chars() {
if c < prev {
return false;
}
prev = c;
}<|fim▁hole|>
true
}
fn find_longest_ordered_... | |
<|file_name|>lineNumbers.ts<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*------... |
let output: string[] = [];
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { |
<|file_name|>classes.js<|end_file_name|><|fim▁begin|>var classes = [
{
"name": "Hal\\Report\\Html\\Reporter",
"interface": false,
"methods": [
{
"name": "__construct",
"role": null,
"public": true,
"private": false,
... | "public": true, |
<|file_name|>0008_auto_20151028_1154.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('videos', '0007_auto_20151027_2338'),
]
... | field=jsonfield.fields.JSONField(default={}),
),
] |
<|file_name|>test_commands.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from os import path as op
import shutil
import glob
import warnings
from nose.tools import assert_true, assert_raises
from numpy.testing import assert_equal, assert_allclose
from mne import concatenate_raws, read_bem_surfaces
... | del os.environ['FREESURFER_HOME'] |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import os
import os.path
from raiden.constants import RAIDEN_DB_VERSION
def database_from_privatekey(base_dir, app_number):
""" Format a database path based on the private key and app number. """
dbpath = os.path.join(base_dir, f"app{app_number}", f"v{RAIDEN_D... | return dbpath |
<|file_name|>test_relation_model_models.py<|end_file_name|><|fim▁begin|># Copyright 2014 Google 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.a... | contact=mary.key,
company=candit.key,
title='president').put() |
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>'use strict';
<|fim▁hole|>const gulp = require('gulp');
const env = require('../index');
// Call it when necessary.
gulpRequireTasks({
// Pass any options to it. Please see below.
path: env.inConfigs('gulp', 'tasks')// This is default
});
gulp.task('default', ... | // https://github.com/betsol/gulp-require-tasks
// Require the module.
const gulpRequireTasks = require('gulp-require-tasks'); |
<|file_name|>out_response.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 Uber Technologies, Inc.
//
// 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 restriction, including wi... | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
<|file_name|>XmlParserJhove.java<|end_file_name|><|fim▁begin|>package output;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import javax.swing.JOptionPane;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFact... | }
if (eElement.getElementsByTagName("creationyear").item(0)!= null) {
xmlsummary.println("<CreationYear>" + eElement.getElementsByTagName("creationyear").item(0).getTextContent() + "</CreationYear>");
|
<|file_name|>service_update_test.go<|end_file_name|><|fim▁begin|>package client
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"golang.org/x/net/context"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/swarm"
)
func TestServiceUpdateError(t *testing.T) {
client ... | return &http.Response{
StatusCode: http.StatusOK, |
<|file_name|>Base.py<|end_file_name|><|fim▁begin|>"""
$Id: Base.py,v 1.12.2.10 2008/08/01 03:58:03 customdesigned Exp $
This file is part of the pydns project.
Homepage: http://pydns.sourceforge.net
This code is covered by the standard Python License.
Base functionality. Request and Response classes, that sort of t... | raise DNSError, reason
if self.async: |
<|file_name|>BubbleChart.tsx<|end_file_name|><|fim▁begin|>import React from 'react'
import {
StyleSheet,
View,
processColor
} from 'react-native'
import { BubbleChart } from 'react-native-charts-wrapper'
class BubbleChartScreen extends React.Component<any, any> {
constructor(props) {
super(props)
con... | entryLabelColor={processColor(this.props.modeInfo.titleTextColor)} |
<|file_name|>diff.js<|end_file_name|><|fim▁begin|>function diff( now, props ) { //noinspection FallthroughInSwitchStatementJS
switch ( util.ntype( now ) ) {
case 'number' : case 'string' :
if ( valid( new Type( now ) ) )
now = new Type( now );
else {
if ( !props ) props = now;
now = Type.no... |
switch ( val.charAt( 0 ) ) {
case '-' : excl[prop] = true; break; |
<|file_name|>test_linalg.py<|end_file_name|><|fim▁begin|>import unittest
import test_dot
import test_math
import test_trans
import test_lapack<|fim▁hole|>suite = unittest.TestSuite([test_dot.suite(),
test_math.suite(),
test_trans.suite(),
... |
# linear algebra group suite
|
<|file_name|>Sandbox.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 University of Dundee & Open Microscopy Environment
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publi... |
def teardown_method(self, method):
try:
self.sandbox.cleanup() |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#![deny(warnings)]
#![feature(never_type)]
mod cachelib_utils;
mod memcache_utils;
mod mo... | &*STATS
} |
<|file_name|>OsgiBundlePacking.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to Y... | |
<|file_name|>rpc-tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Run Regression Test Suite
This module calls d... | |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for stormtrooper project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
<|fim▁hole|>
os.environ.setdefau... | from django.core.wsgi import get_wsgi_application |
<|file_name|>test_validators.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name,len-as-condition
from functools import partial
from rebulk.pattern import StringPattern
from ..validators import chars_before,... | assert len(matches) == 1
matches = list(StringPattern("word", validator=left).matches("wordxxx"))
assert len(matches) == 1 |
<|file_name|>plugin.ts<|end_file_name|><|fim▁begin|>/**
* Created by johan on 11/11/2015.
*/
var router = require('express').Router();
var pwd = require('path');
router.get('/:name', function (req, res) {
var pluginName = req.params.name;
var data = req.query;
console.log(data);
var plugin: any ... | }; |
<|file_name|>vec4_test.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2017 Google 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/licenses/LICENSE-... | {f32.Vec4{1, 2, 3, 4}, f32.Vec4{-1, -2, -3, -4}, f32.Vec4{2, 4, 6, 8}},
} {
assert.For("Sub4D(%v, %v)", test.a, test.b). |
<|file_name|>Canon_1D.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import bpy
camera = bpy.context.edit_movieclip.tracking.camera
camera.sensor_width = 27.9
camera.units = 'MILLIMETERS'
camera.focal_length = 24.0
camera.pixel_aspect = 1
camera.k1 = 0.0
camera.k2 = 0.0
camera.k3 = 0.0<|fim▁end|> | |
<|file_name|>sample_input_reader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Sample Input Reader for map job."""
import random
import string
import time
from mapreduce import context
from mapreduce import errors
from mapreduce import operation
from mapreduce.api import map_job
# pylint: disable=invalid-n... | @classmethod
def validate(cls, job_config):
"""Inherit docs.""" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.