prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>project.py<|end_file_name|><|fim▁begin|>#-*- coding:Utf-8 -*-
from __future__ import print_function
"""
.. curentmodule:: pylayers.util.project
.. autosummary::
"""
import numpy as np
import os
import sys
import shutil
import pkgutil
import pdb
import seaborn as sns
import logging
class PyLayers(object)... | pstruc['DIRMAT2'] = 'ini'
pstruc['DIRANT'] = 'ant'
pstruc['DIRTRA'] = 'output' |
<|file_name|>tree.py<|end_file_name|><|fim▁begin|>"""
File: tree.py
Author: Inokentiy Babushkin
Email: inokentiy.babushkin@googlemail.com
Github: ibabushkin
Description:
A tree used to store DFS-trees for the CFG-module.
"""
class Tree(object):
"""
The tree mentioned in the module-docstring.
Probably ... | """
ret = []
for edge in self.edges:
if edge[0] == index: |
<|file_name|>xls.py<|end_file_name|><|fim▁begin|>"""
pyexcel_xls
~~~~~~~~~~~~~~~~~~~
The lower level xls/xlsm file format handler using xlrd/xlwt
:copyright: (c) 2016-2017 by Onni Software Ltd
:license: New BSD License
"""
import sys
import math
import datetime
import xlrd
from xlwt import Workboo... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.decorators import login_required
import logging
from certificates.models import GeneratedCertificate
from certificates.models import CertificateStatuses as status
from django.views.decorators.csrf import csrf_exempt
from django.http import Http... | c_course_full_name = user_course.display_number_with_default + " " + c_course_name #course name
fontpath = '/home/tahoe/edx_all/edx-platform/lms/static/fonts'
imagepath = '/home/tahoe/edx_all/edx-platform/lms/static/images/certificate' |
<|file_name|>nycmta.py<|end_file_name|><|fim▁begin|>#sudo -H pip2 install gtfs-realtime-bindings
from google.transit import gtfs_realtime_pb2
import urllib
from pprint import pprint
#sudo -H pip2 install protobuf_to_dict
from protobuf_to_dict import protobuf_to_dict
from itertools import chain
#for deciding if the ard... | import time
|
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>export const PAGINATION_PIECE_PREVIOUS = 'Previous'
export const PAGINATION_PIECE_ELLIPSIS = 'ellipsis'<|fim▁hole|><|fim▁end|> | export const PAGINATION_PIECE_PAGE_NUMBER = 'page-number'
export const PAGINATION_PIECE_NEXT = 'Next'
export const DEFAULT_MAX_PAGE_NUMBER_LINKS = 5 |
<|file_name|>20191108184707-add-pilot-challenge-data.ts<|end_file_name|><|fim▁begin|>// Our current version of MySQL doesn't support `WITH` statements. We're only
// running this a few times, so no need to get fancy. It'll get cached anyway.
const pilotId = `(SELECT id FROM challenges WHERE url_token='pilot')`;
export... | |
<|file_name|>DirectionalLight.tests.js<|end_file_name|><|fim▁begin|>/**
* @author TristanVALCKE / https://github.com/Itee
* @author moraxy / https://github.com/moraxy<|fim▁hole|>/* global QUnit */
import { runStdLightTests } from '../../qunit-utils';
import { DirectionalLight } from '../../../../src/lights/Direction... | */ |
<|file_name|>rinco-parse-template.js<|end_file_name|><|fim▁begin|>/* jslint node: true */
/*!
* rinco - include templates
* Copyright(c) 2014 Allan Esquina
* MIT Licensed
*/
'use strict';
var rinco = require('../rinco');
var it = require('../interpreter');
var Markdown = require('markdown').markdown;
var md = requ... |
var config = require('../constants');
// Parse templates files |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for brp project.
It exposes the WSGI callable as a module-level variable named ``application``.<|fim▁hole|>https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from dj_static import Cling
from django.core.wsgi import get_wsgi_app... |
For more information on this file, see |
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../page... | ],
bootstrap: [IonicApp],
entryComponents: [ |
<|file_name|>tex_nine_utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#************************************************************************
#
# TeX-9 library: Python module
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | #************************************************************************
|
<|file_name|>StartPoint.hpp<|end_file_name|><|fim▁begin|>/*
Copyright_License {
XCSoar Glide Computer - http://www.xcsoar.org/
Copyright (C) 2000-2013 The XCSoar Project
A detailed list of copyright holders can be found in the file "AUTHORS".
This program is free software; you can redistribute it and/or
m... | const TaskProjection &projection, |
<|file_name|>winnls.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub const CP_OEMCP: ::DWORD = 1;
pub const CP_MACCP: ::DWORD = 2;
pub const CP_THREAD_ACP: ::DWORD = 3;
pub const CP_SYMBOL: ::DWORD = 42;
pub const CP_UTF7: ::DWORD = 65000;
pub const CP_UTF8: ::DWORD = 65001;<|fim▁end|> | // Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>
//! Procedure declarations, constant definitions, and macros for the NLS component.
pub const CP_ACP: ::DWORD = 0; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from qinfer.tomography.distributions import *
from qinfer.tomography.models import *
from qinfer.tomography.plotting_tools import *
from qinfer.tomography.bases import *
from qinfer.tomography.expdesign import *<|fim▁end|> | from __future__ import absolute_import |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>"""setuptools based packaging and installation module.
Defines the project properties, as well as a special command to build a
standalone executable, by using PyInstaller.
Run with --help to see available options.
"""
# Always prefer setuptools over distutils
from s... | """Set default values for user options.""" |
<|file_name|>buildprogress.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** L... | |
<|file_name|>import.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... | pub fn bar() { println!("bar"); }
use foo; //~ ERROR unresolved import `foo` [E0432]
//~^ no `foo` in the root |
<|file_name|>domain_record.rs<|end_file_name|><|fim▁begin|>extern crate digitalocean;
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_json;
extern crate url;
extern crate url_serde;
mod utils;
use serde_json::Value;
use digitalocean::api::{Domain, DomainRecord};
use digitalocean::method::{Create, Dele... |
#[test]
fn update_produces_correct_request() { |
<|file_name|>png.py<|end_file_name|><|fim▁begin|># Copyright 2014, Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain
# rights in this software.
from __future__ import absolute_import
from __future__ import division
import toyplot.cairo.pn... | ----------
canvas: :class:`toyplot.canvas.Canvas`
Canvas to be rendered.
fobj: file-like object or string, optional |
<|file_name|>model_show_scaling_policy_response.go<|end_file_name|><|fim▁begin|>package model
<|fim▁hole|>)
// Response Object
type ShowScalingPolicyResponse struct {
ScalingPolicy *ScalingV1PolicyDetail `json:"scaling_policy,omitempty"`
HttpStatusCode int `json:"-"`
}
func (o ShowScalingPolicyR... | import (
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud-sdk-go-v3/core/utils"
"strings" |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required, user_passes_test
urlpatterns = patterns('',
url(r'^$', 'website.views.index', name='website_index'),
... | |
<|file_name|>heap_utils.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|>const {
Symbol
} = primordials;
const {
kUpdateTimer,
onStreamRead,
} = require('internal/stream_base_commons');
const { owner_symbol } = require('internal/async_hooks').symbols;
const { Readable } = require('stream');
const kHandle... | |
<|file_name|>SourcesList.js<|end_file_name|><|fim▁begin|>/*
Copyright 2010-2012 Infracom & Eurotechnia (support@webcampak.com)
This file is part of the Webcampak project.
Webcampak 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 Sof... |
name: 'source',
|
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>/***********************************************************************
This file is part of KEEL-software, the Data Mining tool for regression,
classification, clustering, pattern mining and so on.
Copyright (C) 2004-2010
F. Herrera (herrera@decsai.ugr.es)
... | along with this program. If not, see http://www.gnu.org/licenses/
|
<|file_name|>tab1.component.ts<|end_file_name|><|fim▁begin|>import { ChangeDetectionStrategy, Component } from '@angular/core';
// webpack html imports
let template = require('./tab1.component.html');
@Component({
selector: 'tabs-demo',
changeDetection: ChangeDetectionStrategy.OnPush,
template: template
})
expo... | public removeTabHandler(/*tab:any*/):void {
console.log('Remove Tab handler');
};
} |
<|file_name|>accesscontrol.py<|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.
# ---------... | resolve_assignee=True, assignee_principal_type=None, assignment_id=None): |
<|file_name|>MapleExpeditionType.java<|end_file_name|><|fim▁begin|>/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribu... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import datetime
import time
import boto
import redis
import requests
import random
import zlib
from django.shortcuts import get_object_or_404
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.template.loader impor... | data = dict(feeds=[], folders=[]) |
<|file_name|>skia_trace_memory_dump_impl.cc<|end_file_name|><|fim▁begin|>// Copyright 2015 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 "skia/ext/skia_trace_memory_dump_impl.h"
#include "base/trace_event/mem... | |
<|file_name|>issue-18711.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<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at... | // http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
<|file_name|>p123.py<|end_file_name|><|fim▁begin|>import primes<|fim▁hole|># maybe Fermat's Little Theorem would show up
# ... but it didn't.
def check(p,n,target):
return 2*p*n > target
def main():
ps = primes.primes(250000)
i = 0
while not check(ps[i],i+1,10**10):
i += 2
print i+1 # zero... |
# same logic as p120
# I was hoping since these were primes that |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict';
angular.module('playgroundApp', [
'playgroundApp.filters',
'playgroundApp.services',
'playgroundApp.directives',
'ngRoute',
'ui.bootstrap',
'ui',
])
.config(function($locationProvider, $routeProvider, $httpProvider,
... | // TODO: see http://www.youtube.com/watch?v=P6KITGRQujQ
$routeProvider
.when('/playground/', {
templateUrl: '/playground/main.html', |
<|file_name|>x86_64.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses... |
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
return target_strs::t { |
<|file_name|>send_message.rs<|end_file_name|><|fim▁begin|>use settings;
use connection;
use api::VcxStateType;
use messages::*;
use messages::message_type::MessageTypes;
use messages::payload::{Payloads, PayloadKinds};
use messages::thread::Thread;
use utils::{httpclient, constants};
use utils::uuid::uuid;
use error::p... | |
<|file_name|>jtexec.py<|end_file_name|><|fim▁begin|><|fim▁hole|># _*_ coding: latin-1 _*_
import jtutil
import jtsocket
import jtdom
def jtexec(cmd):
jtsocket.send("<jtexec>"+jtutil.cdataif(cmd)+"</jtexec>")
# <exitvalue>value</exitvalue>
# vagy
# <execerror>error</execerror>
while 1:
... | ##! /usr/bin/env python |
<|file_name|>KeyManagerType.cpp<|end_file_name|><|fim▁begin|>/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kms/model/KeyManagerType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/E... | }
return {}; |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import VueBootstrap from ... | el: '#app',
router,
store, |
<|file_name|>logger.go<|end_file_name|><|fim▁begin|>// Copyright 2020 the Exposure Notifications Server 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.apach... | }
return logger.Sugar() |
<|file_name|>boss_lord_marrowgar.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2006 - 2012 ScriptDev2 <http://www.scriptdev2.com/>
* 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<|fim▁hole|> * This program is distributed... | * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* |
<|file_name|>borrowck-uniq-via-lend.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.apa... |
fn local_rec() {
struct F { f: Box<int> }
let mut v = F {f: box 3}; |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { Button } from './button';
export { Button };<|fim▁hole|>export default null;<|fim▁end|> | |
<|file_name|>settings.service.ts<|end_file_name|><|fim▁begin|>import { Inject, Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ApplicationHttpClient, HTTP_INJECTION_TOKEN } from '../application-http-client.service';
import { Settings } from './settings.interface';
import { TermsOfServic... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url<|fim▁hole|>from django.contrib import admin
from api import views
admin.autodiscover()
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register(r'headings', views.HeadingViewSet)
route... | |
<|file_name|>PT2314PreAmp.cpp<|end_file_name|><|fim▁begin|>/*
* PT2314PreAmp.cpp
*
* Created on: 28.12.2017
* Author: wmarkowski
*/
#include "PT2314PreAmp.h"
PT2314PreAmp::PT2314PreAmp(PT2314 *pt2314)
{
this->pt2314 = pt2314;
this->volume = 0;
this->inputChannel = 0;
}
void PT2314PreAmp::setVolum... | uint8_t PT2314PreAmp::getInputChannel()
{
return inputChannel; |
<|file_name|>array-to-object.test.js<|end_file_name|><|fim▁begin|>import arrayToObject from './array-to-object'
describe('array to object', () => {
it('takes an array of object and returns an object', () => {
expect(arrayToObject([
{
name: 'A', age: 30, food: 'pizza'
}, {<|fim▁hole|> n... | |
<|file_name|>test_results_preprocessors.py<|end_file_name|><|fim▁begin|>import pytest
from ray.train.callbacks.results_preprocessors import (
ExcludedKeysResultsPreprocessor,
IndexedResultsPreprocessor,
SequentialResultsPreprocessor,
AverageResultsPreprocessor,
MaxResultsPreprocessor,
WeightedA... | assert results_preprocessor2.preprocess(results4) == expected4
assert "Averaging weight `c` value type is not valid." in caplog.text |
<|file_name|>oop_test.py<|end_file_name|><|fim▁begin|>import random
from urllib import urlopen
import sys
WORD_URL = "http://learncodethehardway.org/words.txt"
WORDS = []
PHRASES = {
"class %%%(%%%):":
"Make a class named %%% that is-a %%%.",
"class %%%(object):\n\tdef __init__(self, ***)" :
"class %%% has-a __... |
for i in range(0, snippet.count("@@@")):
param_count = random.randint(1,3)
param_names.append(', '.join(random.sample(WORDS, param_count))) |
<|file_name|>GComment.java<|end_file_name|><|fim▁begin|>// ----------> GENERATED FILE - DON'T TOUCH! <----------
// generator: ilarkesto.mda.legacy.generator.EntityGenerator
package scrum.server.collaboration;
import java.util.*;
import ilarkesto.persistence.*;
import ilarkesto.core.logging.Log;
import ilar... | if (property.equals("authorName")) updateAuthorName(value); |
<|file_name|>FamilyInstance.FlipFromToRoom.py<|end_file_name|><|fim▁begin|>import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *<|fim▁hole|>import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instan... |
clr.AddReference("RevitServices") |
<|file_name|>react-window-tests.tsx<|end_file_name|><|fim▁begin|>import {
FixedSizeList,
VariableSizeList,
FixedSizeGrid,
VariableSizeGrid,
ListChildComponentProps,
areEqual,
shouldComponentUpdate
} from "react-window";
import * as React from "react";
const FixedSizeListTestRequiredProps: R... | return <div style={style}>Row {index} {data.foo}</div>; |
<|file_name|>pointer.cc<|end_file_name|><|fim▁begin|>// { dg-options "-std=gnu++11" }
// Copyright (C) 2005-2016 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public Li... | |
<|file_name|>log_entry.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo.
// source: google/logging/v2/log_entry.proto
// DO NOT EDIT!
package google_logging_v2
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gengo/grpc-gateway/third_party/g... | } |
<|file_name|>test_beam_object.py<|end_file_name|><|fim▁begin|># coding: utf-8
# Copyright 2017 CERN. This software is distributed under the
# terms of the GNU General Public Licence version 3 (GPL Version 3),
# copied verbatim in the file LICENCE.md.
# In applying this licence, CERN does not waive the privileges and im... | from blond.input_parameters.rf_parameters import RFStation
from blond.beam.beam import Beam
from blond.beam.distributions import matched_from_distribution_function |
<|file_name|>EntityModel.js<|end_file_name|><|fim▁begin|>(function (_, $, Backbone, Drupal, drupalSettings) {
"use strict";
/**
* State of an in-place editable entity in the DOM.
*/
Drupal.edit.EntityModel = Drupal.edit.BaseModel.extend({
defaults: {
// The DOM element that represents this entity. It may see... | 'state': 'inactive'
}, options); |
<|file_name|>codeplayer.js<|end_file_name|><|fim▁begin|>var windowHeight = $(window).height();
var menuBarHeight = $('#codeplayer-menubar').height();
$('.codeplayer-code-container').css('height', (windowHeight - menuBarHeight) + 'px');
$('.codeplayer-toogle').click(function() {
$(this).toggleClass('codeplayer-select... | var divWidthPercentage = 100 / showingDivs;
$('.codeplayer-code-container').css('width', divWidthPercentage + '%'); |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2017 AltOS-Rust Team
*
* 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 3 of the License, or
* (at your option) ... | impl Deref for GPIO { |
<|file_name|>copy_config_files.py<|end_file_name|><|fim▁begin|># WARNING: This script copies all the files in this repo into the root
# WARNING: tree of the RaspberryPi and saves a backup file (.bak).
# WARNING: Need to be ran with "sudo".
import os
import shutil
try:
raw_input # Python 2
except NameErro... | shutil.move(root_path, root_path + '.bak')
except IOError as e: |
<|file_name|>setBindGroup.spec.ts<|end_file_name|><|fim▁begin|>export const description = `
setBindGroup validation tests.
TODO: merge these notes and implement.
> (Note: If there are errors with using certain binding types in certain passes, test those in the file for that pass type, not here.)
>
> - state tracking (... | validateFinish(false); |
<|file_name|>const-int-rotate.rs<|end_file_name|><|fim▁begin|>fn main() {
let x: &'static i32 = &(5_i32.rotate_left(3));<|fim▁hole|> //~^ ERROR temporary value dropped while borrowed
let y: &'static i32 = &(5_i32.rotate_right(3));
//~^ ERROR temporary value dropped while borrowed
}<|fim▁end|> | |
<|file_name|>Most Digits.py<|end_file_name|><|fim▁begin|># Kata link: https://www.codewars.com/kata/58daa7617332e59593000006
# First solution
def find_longest(arr):
count = [len(str(v)) for v in arr]
max_value = max(count)
max_index = count.index(max_value)
return arr[max_index]<|fim▁hole|><|fim▁end|> |
# Another solution
def find_longest(arr):
return max(arr, key=lambda x: len(str(x))) |
<|file_name|>test_region_info_accessor.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0.
use keys::data_end_key;
use kvproto::metapb::Region;
use raft::StateRole;
use raftstore::coprocessor::{RegionInfo, RegionInfoAccessor};
use raftstore::store::util::{find_peer, new_p... | |
<|file_name|>logger_file_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2018-Present Couchbase, Inc.
Use of this software is governed by the Business Source License included in
the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that
file, in accordance with the Business Source License, use of ... | "github.com/stretchr/testify/assert" |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>from birdseye.server import main
<|fim▁hole|><|fim▁end|> | if __name__ == '__main__':
main() |
<|file_name|>live-list-manager.js<|end_file_name|><|fim▁begin|>/**
* Copyright 2016 The AMP HTML 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
*
* ... | /** @private @const {!../../../src/service/extensions-impl.Extensions} */
this.extensions_ = Services.extensionsFor(this.ampdoc.win);
/** @private {number} */ |
<|file_name|>bitcoin_uk.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About CheckCoin</source>
... | <source>Open until %1</source>
<translation>Відкрити до %1</translation>
</message> |
<|file_name|>AbstractDynamicClassLoader.java<|end_file_name|><|fim▁begin|>package alice.util;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
/**
*
* @author Alessio Mercurio
*
* Custom abstract classloader used to addAt/remove dynamically URLs from it
* need... | */ |
<|file_name|>1052.js<|end_file_name|><|fim▁begin|>var __v=[
{
"Id": 2056,
"Panel": 1052,
"Name": "array",
"Sort": 0,<|fim▁hole|> "Str": ""
},
{
"Id": 2057,
"Panel": 1052,
"Name": "相關接口",
"Sort": 0,
"Str": ""
},
{
"Id": 2058,
"Panel": 1052,
"Name": "Example",
"Sort": 0,... | |
<|file_name|>mod_path.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## Copyright © 2007-2012, Matthias Urlichs <matthias@urlichs.de>
##
## 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
## t... | main_words.register_statement(ShutdownHandler)
load_module("logging") |
<|file_name|>paCriticalSection.cpp<|end_file_name|><|fim▁begin|>//<|fim▁hole|>
#include "PhyaPluginPrivatePCH.h"<|fim▁end|> | // paCriticalSection.cpp
// |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Main __init__.py for the vsgen package
"""
import pkg_resources
try:
pkg = pkg_resources.get_distribution("vsgen")
__version__ = pkg.version
except pkg_resources.DistributionNotFound:
__version__ = "0.0.0.0"
from vsgen.soluti... | __all__ = [
'VSGSolution',
'VSGProject', |
<|file_name|>size-and-align.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/... | |
<|file_name|>IdProviderTest.java<|end_file_name|><|fim▁begin|>package com.appleframework.distributed.id.snowflake;
import com.appleframework.distributed.id.snowflake.IdProvider;
import com.appleframework.distributed.id.snowflake.IdProviderFactory;
public class IdProviderTest {
<|fim▁hole|> final IdProvider idPr... |
public static void main(String[] args) throws Exception {
IdProviderFactory idProviderFactory = new IdProviderFactory("localhost:2181");
final IdProvider idProvider1 = idProviderFactory.getProvider();
|
<|file_name|>linktastic.py<|end_file_name|><|fim▁begin|># Linktastic Module
# - A python2/3 compatible module that can create hardlinks/symlinks on windows-based systems
#
# Linktastic is distributed under the MIT License. The follow are the terms and conditions of using Linktastic.
#
# The MIT License (MIT)
# Copyri... | # This version of link, unlike os.link, supports nt systems as well
def link(src, dest):
if os.name == 'nt':
_link_windows(src, dest) |
<|file_name|>example.go<|end_file_name|><|fim▁begin|>package main
import (
"math/rand"
"net/http"
"time"
"github.com/williambailey/go-slurp/slurp"
"github.com/williambailey/go-slurp/slurpd"
)
func init() {
loaderFunc = append(loaderFunc, func(s *slurpd.Slurpd) {
l := slurp.NewDataLoaderStatWrapper(&exampleLo... | p,
a.AnalysisRequest(time.Now().Add(-24*time.Hour)),
a.AnalysisRequest(time.Now().Add(-36*time.Hour)), |
<|file_name|>i18n.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# This file is part of pacman-mirrors.
#
# pacman-mirrors 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 3 of the Licen... | try:
user_locale = locale.getdefaultlocale()[0] |
<|file_name|>store.js<|end_file_name|><|fim▁begin|>/**** MarketPress Checkout JS *********/
jQuery(document).ready(function($) {
//coupon codes
$('#coupon-link').click(function() {
$('#coupon-link').hide();
$('#coupon-code').show();
$('#coupon_code').focus();
return false;
});
/... | var gid = $('input.mp_choose_gateway:checked').val();
$('div.mp_gateway_form').hide();
$('div#' + gid).show();
});
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(non_camel_case_types)]
extern crate libc;
extern crate eina_sys;
use libc::*;
use eina_sys::*;
/* automatically generated by rust-bindgen */
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum EezeUdevEvent {
EezeUdevEventNone = 240,
EezeU... | *const c_char,
property:
*const c_char)
-> *const c_char; |
<|file_name|>group.js<|end_file_name|><|fim▁begin|>SVG.G = SVG.invent({
// Initialize node
create: 'g'
// Inherit from
, inherit: SVG.Container
// Add class methods
, extend: {
// Move over x-axis
x: function(x) {
return x == null ? this.transform('x') : this.transform({ x: x - this.x() }, true)... | return y == null ? this.transform('y') : this.transform({ y: y - this.y() }, true)
}
// Move by center over x-axis |
<|file_name|>XmlNamespace.java<|end_file_name|><|fim▁begin|>/*
* JasperReports - Free Java Reporting Library.
* Copyright (C) 2001 - 2014 TIBCO Software Inc. All rights reserved.
* http://www.jaspersoft.com
*
* Unless you have purchased a commercial license agreement from Jaspersoft,
* the following license terms... |
/**
* An XML namespace. |
<|file_name|>client.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable} from '@angular/core';
import {Observable, of}... | * @param url The endpoint URL.
* @param options The HTTP options to send with the request.
* |
<|file_name|>nectar_config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (c) 2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.... | from functools import partial |
<|file_name|>mainloop.py<|end_file_name|><|fim▁begin|>import tkinter
window = tkinter.Tk()
window.mainloop()<|fim▁hole|><|fim▁end|> | print('Anybody home?') |
<|file_name|>gamepadbuttonlist.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 crate::dom::bindings::codegen::Bindings::Gamep... | |
<|file_name|>tubehentai.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para tubehentai
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
impor... | if DEBUG: scrapertools.printMatches(matches)
itemlist = [] |
<|file_name|>0008_auto_20170518_1629.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('layout_page', '0007_auto_20170509_1148'),<|fim▁hole|> ]
operatio... | |
<|file_name|>test_yum.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from ansible.compat.tests import unittest
from ansible.modules.packaging.os.yum import YumModule
yum_plugin_load_error = """
Plugin "product-id" can't be imported
Plugin "search-disabled-repos" can't be imported
Plugin "subscription-manage... | ddashboard.x86_64 0.2.0.1-1.el7_3 mhlavink-developerdashboard |
<|file_name|>Ol.ts<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2014 Jose Carlos Lama. www.typedom.org
*
* 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 ... |
} |
<|file_name|>versioneer.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
"""versioneer.py
(like a rocketeer, but for versions)
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Version: 0.7+
This file helps distutils-based projects manage their version number by just
creating... | |
<|file_name|>import.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding, utf-8 -*-
# FIDATA. Open-source system for analysis of financial and economic data
# Copyright © 2013 Basil Peace
# This file is part of FIDATA.
#
# FIDATA is free software: you can redistribute it and/or modify
# it under the t... | reader = DictReader(open('markets.csv', 'r', encoding = 'UTF8'), delimiter = ';')
child_markets = list()
for row in reader:
if row['country_alpha2_code'] == '': |
<|file_name|>TiActivity.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2017 grandcentrix GmbH
* 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... | import androidx.appcompat.app.AppCompatActivity;
import java.util.List;
import java.util.concurrent.Executor; |
<|file_name|>BoardNotFoundException.java<|end_file_name|><|fim▁begin|>package com.ntlx.exception;<|fim▁hole|>public class BoardNotFoundException extends KanbanException {
private static final long serialVersionUID = 1L;
private int boardId;
public BoardNotFoundException (int boardId) {
this.boardId = boardId;
}
... | |
<|file_name|>managers.py<|end_file_name|><|fim▁begin|>import datetime
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models import Sum
from django.contrib.contenttypes.models import ContentType
class TrendingManager(models.Manager):
def trending(self, model, d... | d["object"] = None
return views |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># This file is part of PRAW.
#
# PRAW 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 3 of the License, or (at your option) any later
# vers... | image_type = 'jpg'
elif first_bytes.startswith(PNG_HEADER):
image_type = 'png' |
<|file_name|>base.py<|end_file_name|><|fim▁begin|># Copyright 2017 Huawei Technologies Co.,LTD.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# htt... | via RPC. Simply defining a class that inherits from this base class
will make it remotely instantiatable. Objects should implement the
necessary "get" classmethod routines as well as "save" object methods |
<|file_name|>compute_capabilities_filter.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License... | # 1, check that whether the namespace is 'capabilities'. If not,
# ignore it.
if len(scope) == 1: |
<|file_name|>haltest.py<|end_file_name|><|fim▁begin|># example for using Python with cython bindings as a [HAL]HALFILE<|fim▁hole|>#HALFILE = haltest.py
from machinekit.halfile import rt, hal
rt.loadrt("supply")
hal.addf("supply.0.update","servo-thread")<|fim▁end|> | # in the ini file, add as last HALFILE:
#[HAL] |
<|file_name|>angular-locale_en-vg.js<|end_file_name|><|fim▁begin|>'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
ret... | "Aug",
"Sep",
"Oct",
"Nov", |
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
{
'name': "website_register_b2b",
'summary': """
Registration form for site purchases """,<|fim▁hole|>
'author': "Alexsandro Haag <alex@hgsoft.com.br>, HGSOFT",
'website': "http://www.hgsoft.com.br",
'categor... |
'description': """
Registration form for site purchases
""", |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
import cgi
import codecs
import logging
import sys
from io import BytesIO
from threading import Lock
import warnings
from django import http
from django.conf import settings
from django.core import signals
from django.core.handl... | """
Get a value from the WSGI environ dictionary as bytes.
key and default should be str objects. Under Python 2 they may also be |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.