prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>lib.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/. */
//! Calculate [specified][specified] and [computed values][compu... | #[macro_use]
extern crate log; |
<|file_name|>unary.spec.js<|end_file_name|><|fim▁begin|>const test = require('tape')
const helpers = require('../test/helpers')
const bindFunc = helpers.bindFunc
const unary = require('./unary')
test('unary helper', t => {
const f = bindFunc(unary)
const err = /unary: Argument must be a Function/
t.throws(f(u... | t.throws(f([]), err, 'throws with array')
const fn = unary((x, y, z) => ({ x: x, y: y, z: z })) |
<|file_name|>TelaPrincipal.cpp<|end_file_name|><|fim▁begin|>#include "TelaPrincipal.h"
TelaPrincipal::TelaPrincipal()
{<|fim▁hole|><|fim▁end|> |
} |
<|file_name|>impl_aep_asyncio.py<|end_file_name|><|fim▁begin|>from osrf_pycommon.process_utils import asyncio
from osrf_pycommon.process_utils.async_execute_process import async_execute_process
from osrf_pycommon.process_utils import get_loop
from .impl_aep_protocol import create_protocol
loop = get_loop()
<|fim▁hole... | |
<|file_name|>Main.js<|end_file_name|><|fim▁begin|>/*************************************************************
*
* MathJax/jax/output/HTML-CSS/fonts/Asana-Math/Size1/Regular/Main.js
*
* Copyright (c) 2013-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* yo... | 0x302: [783,-627,453,0,453], |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># Copyright The IETF Trust 2008, All Rights Reserved
from django.conf.urls.defaults import patterns, include
from ietf.wginfo import views, edit, milestones
from django.views.generic.simple import redirect_to
urlpatterns = patterns('',<|fim▁hole|> (r'^summary-by-... | (r'^$', views.wg_dir),
(r'^summary.txt', redirect_to, { 'url':'/wg/1wg-summary.txt' }),
(r'^summary-by-area.txt', redirect_to, { 'url':'/wg/1wg-summary.txt' }), |
<|file_name|>uses-optimized-images.js<|end_file_name|><|fim▁begin|>/**
* @license Copyright 2017 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.apache... | |
<|file_name|>angular-locale_zgh-ma.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 ... | |
<|file_name|>simple-tuple.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.o... | // gdbr-check:$1 = (-50, 50)
// gdbg-command:print 'simple_tuple::NO_PADDING_16' |
<|file_name|>integral.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# integeral.py
import numpy as num
def integral(x,y):
"""
ROUTINE: INTEGRAL
USEAGE: RESULT = INTEGRAL( X, Y )
PURPOSE: Integrate tabulated data using Simpson's rule
with 3-point Lagragian interpolation... |
In this example, the f-values are generated from a known function, |
<|file_name|>customsearch-gen.go<|end_file_name|><|fim▁begin|>// Package customsearch provides access to the CustomSearch API.
//
// See https://developers.google.com/custom-search/v1/using_rest
//
// Usage example:
//
// import "google.golang.org/api/customsearch/v1"
// ...
// customsearchService, err := customs... | // Possible values:
// "black" - black
// "blue" - blue
// "brown" - brown |
<|file_name|>RepositorySetRepositories.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Alert, Spinner } from 'patternfly-react';
import { translate as __ } from 'foremanReact/common/I18n';
import loadRepositor... | |
<|file_name|>cs.js<|end_file_name|><|fim▁begin|><|fim▁hole|>/*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'specialchar', 'cs', {
options: 'Nastavení speciálních znaků',
title:... | |
<|file_name|>attach.go<|end_file_name|><|fim▁begin|>package operation
import (
"fmt"
"os"
"github.com/runabove/sail/internal"
"github.com/spf13/cobra"
)
var cmdOperationAttach = &cobra.Command{
Use: "attach",
Short: "Attach to an ongoing operation output: sail operation attach [applicationName] <operationId>... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""StoreServer provides a number of plugins which can provide a store
service on a server.
<|fim▁hole|>These can be used to simplify provision of a store, e.g using the
``webserver`` StoreServer instead of installing a 3rd party webserver
such as Apache.
"""<|fim▁e... | There are currently 2 plugins available: ``webserver`` and ``gitdaemon``.
|
<|file_name|>OgreQuake3Shader.cpp<|end_file_name|><|fim▁begin|>/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2011 Torus Knot Software Lt... | |
<|file_name|>gendocert.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
from httplib import HTTPConnection
from urllib import urlencode
from urlparse import urljoin
from json import loads
from reportlab.pdfgen import canvas
OUTPUTFILE = 'certificate.pdf'
def get_brooklyn_integer():
''' Ask Brookl... |
Returns a tuple with number and integer permalink. |
<|file_name|>setup_pkgresource.py<|end_file_name|><|fim▁begin|>def _setup_pkgresources():
import pkg_resources
import os
import plistlib
pl = plistlib.readPlist(os.path.join(
os.path.dirname(os.getenv('RESOURCEPATH')), "Info.plist"))
appname = pl.get('CFBundleIdentifier')
if appname is ... | pkg_resources.set_extraction_path(path)
|
<|file_name|>palette.js<|end_file_name|><|fim▁begin|>Palette = function(name,colors){
this.name = name;
this.colors = colors;
};
Palette.prototype.hasName = function(name){
return this.name.toLowerCase() == name.toLowerCase()?true:false;
};
Palette.prototype.getRandomColor = function(){
return this.colors[... | Palette.prototype.getColors = function(){
return this.colors; |
<|file_name|>upload_test.go<|end_file_name|><|fim▁begin|>package host
import (
"errors"
"io/ioutil"
"path/filepath"
"testing"
"time"
"github.com/NebulousLabs/Sia/crypto"
"github.com/NebulousLabs/Sia/modules"
"github.com/NebulousLabs/Sia/modules/renter"
"github.com/NebulousLabs/Sia/types"
)
const (
testUplo... |
// Have the renter upload to the host.
rsc, err := renter.NewRSCode(1, 1)
if err != nil { |
<|file_name|>controller.py<|end_file_name|><|fim▁begin|>#
# controller.py
#
# Copyright (C) 2013-2014 Ashwin Menon <ashwin.menon@gmail.com>
# Copyright (C) 2015-2018 Track Master Steve <trackmastersteve@gmail.com>
#
# Alienfx is free software.
#
# You may redistribute it and/or modify it under the terms of the
# GNU Ge... | if zone_name != "": |
<|file_name|>package.py<|end_file_name|><|fim▁begin|><|fim▁hole|>##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Tod... | |
<|file_name|>string.py<|end_file_name|><|fim▁begin|>"""A collection of string constants.
Public module variables:
whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -... | |
<|file_name|>ipv6_loopback.rs<|end_file_name|><|fim▁begin|>use ipaddress::IPAddress;
use num::bigint::BigUint;
use num_traits::One;
/// The loopback address is a unicast localhost address. If an
/// application in a host sends packets to this address, the IPv6 stack
/// will loop these packets back on the same v... | ///
/// The IPv6 loopback address corresponds to 127.0.0.1 in IPv4.
///
/// |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#[cfg(unix)] extern crate libc;
#[cfg(unix)] pub mod unix;
#[cfg(unix)] pub use unix::*;<|fim▁hole|>#[cfg(windows)] pub mod win;
#[cfg(windows)] pub use win::*;
#[cfg(not(any(unix, windows)))] pub mod other;
#[test]
fn getpid_test() {
getpid();
}<|fim▁end|> |
#[cfg(windows)] extern crate kernel32; |
<|file_name|>app.po.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>
export class E2ePage {
navigateToHome() {
return browser.get('/');
}
}<|fim▁end|> | import { browser } from 'protractor'; |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>"""
Shopify Trois
---------------
Shopify API for Python 3<|fim▁hole|>
from setuptools import setup
setup(
name='shopify-trois',
version='1.1-dev',
url='http://masom.github.io/shopify-trois',
license='MIT',
author='Martin Samson',
author_emai... | """ |
<|file_name|>name.py<|end_file_name|><|fim▁begin|>from bottle import request
from sqlalchemy import exc
from libraries.database import engine as db
from libraries.template import view
from libraries.status import Status
from libraries.authentication import login_required
from libraries.forms import Name as Form
from li... | from libraries.session import open_session |
<|file_name|>bin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import sys
from io import BytesIO
import argparse
from PIL import Image
from .api import crop_resize
parser = argparse.ArgumentParser(
description='crop and resize an image without aspect ratio distortion.')
parser.add_argument('image')
pars... | help='desired width of image in pixels') |
<|file_name|>test_rnn.py<|end_file_name|><|fim▁begin|>import torch
from torch import autograd, nn
batch_size = 1
seq_len = 7
input_size = 6
hidden_size = 4
example = [3, 2, 0, 0, 4, 5, 1, 1]
# input = autograd.Variable(torch.rand(seq_len, batch_size, input_size))
# print('input.size()', input.size())
embedding = n... | |
<|file_name|>owl.py<|end_file_name|><|fim▁begin|>class OWL:<|fim▁hole|> pass<|fim▁end|> | def __init__(self): |
<|file_name|>lstub.cpp<|end_file_name|><|fim▁begin|>//functions for manipulating the HBC stub by giantpune
#include <string.h>
#include <ogcsys.h>
#include <malloc.h>
#include <stdio.h>
#include "lstub.h"
#include "gecko.h"
#include "wad/nandtitle.h"
extern const u8 stub_bin[];
extern const u32 stub_bin_size;
stat... | return 1;
} |
<|file_name|>ampyche_setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
import os
import cgi
import cgitb
import json
from pprint import pprint
import setup.common as co
import setup.sqlcommon as sqlc
import setup.defaultpaths as dfp
import setup.getinput as gi
import setup.dbsetup as dbs
import setup.gettags as... | glip = "SETUP COMPLETE"
print(json.dumps(glip, sort_keys=True, indent=4)) |
<|file_name|>assistent_report.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from openerp import models,fields,api
import datetime
import time
class assistent_report1(models.TransientModel):
_name = "assistent.report1"
def date_debut_mois():
now = datetime.date.today() ... | 'res_model': 'ir.actions.act_url',
'type' : 'ir.actions.act_url', |
<|file_name|>library.py<|end_file_name|><|fim▁begin|># Copyright 2015-2016 Open Source Robotics Foundation, 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/... | |
<|file_name|>api.py<|end_file_name|><|fim▁begin|># Copyright 2016 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.o... | decorator = profiler.trace(func_name)
return decorator(function) |
<|file_name|>p019.py<|end_file_name|><|fim▁begin|># Problem 19: Counting Sundays
# https://projecteuler.net/problem=19
def is_leapyear(year):
if year%4 == 0 and year%100 != 0 or year%400 == 0:
return 1
else:
return 0
month = [31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 3... | |
<|file_name|>authorizations.py<|end_file_name|><|fim▁begin|>from . import resource
class AuthorizationsBase(resource.GitHubResource):
path = 'authorizations'
class Authorization(AuthorizationsBase):
pass<|fim▁hole|>class Authorizations(AuthorizationsBase):
pass<|fim▁end|> | |
<|file_name|>order.service.ts<|end_file_name|><|fim▁begin|>/* Importing core module */
import {Injectable} from 'angular2/core';
import {Response} from 'angular2/http';
import {Observable} from 'rxjs/Observable';
import {HttpClient} from './http-client.service';<|fim▁hole|>import {Ord... |
/* Importing model */
import {OrderModel} from '../model/order.model'; |
<|file_name|>server.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> */
var Server = require('annex-ws-node').Server;
var http = require('http');
var stack = require('connect-stack');
var pns = require('pack-n-stack');
module.exports = function createServer(opts) {
var server = http.createServer();
server.stack =... | * Module dependencies |
<|file_name|>ui.rs<|end_file_name|><|fim▁begin|>//<|fim▁hole|>// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; version
// 2.1 of the License.
//
// This library is distributed in the ho... | // imag - the personal information management suite for the commandline
// Copyright (C) 2015-2020 Matthias Beyer <mail@beyermatthias.de> and contributors
// |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for chui v3.9.1
// Project: https://github.com/chocolatechipui/chocolatechip-ui
// Definitions by: Robert Biggs <http://chocolatechip-ui.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// ChocolateChip-UI 3.9.1
/**
These T... | * @return void
*/ |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate ffigen;
extern crate msbuild_util;
use std::process::Command;
use std::fs;
use std::env;
fn main() {
let mut context = ffigen::Context::new();
context.set_root("../scaffold".to_string());
context.add_lang(ffigen::Lang::CSharp, &[ffigen::Conf... | build(&config.to_string());
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Tifflin OS - Asynchronous common interface
// - By John Hodge (thePowersGang)
//
//
//! Asynchronous waiting support
#[macro_use]
extern crate syscalls;
/// Trait for types that can be used for 'idle_loop'
pub trait WaitController
{
fn get_count(&self) -> usize;
f... | ::syscalls::threads::wait(&mut objects, !0);
|
<|file_name|>globalHooks.js<|end_file_name|><|fim▁begin|>global.should = require('should');<|fim▁hole|><|fim▁end|> | global.Breadboard = require('../lib'); |
<|file_name|>consumers.py<|end_file_name|><|fim▁begin|>from asgiref.sync import async_to_sync
from channels.generic.websocket import JsonWebsocketConsumer
from django.conf import settings
from django.utils import timezone
from .models import Route
class BusConsumer(JsonWebsocketConsumer):
groups = ["bus"]
... | within_morning = now_hour < settings.BUS_PAGE_CHANGEOVER_HOUR and time == "morning" |
<|file_name|>webdriver_msg.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/. */
use constellation_msg::PipelineId;
use ipc_channel::ipc... | pub enum WebDriverFrameId { |
<|file_name|>test_add_group.py<|end_file_name|><|fim▁begin|>from model.group import Group
import pytest
def test_add_group(app, db, json_groups):
group = json_groups
with pytest.allure.step('Given a group list'):
old_groups = db.get_group_list()
with pytest.allure.step('When I add ... | #assert len (old_groups) + 1 == app.group.count()
with pytest.allure.step('Then the new group list is equal to the old list with the added group'):
new_groups = db.get_group_list()
old_groups.append(group) |
<|file_name|>wrap_writer.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package textutil
import (
"fmt"
"io"
"unicode"
)
// WrapWriter implements an io.Writer filte... |
const (
stateWordWrap state = iota // Perform word-wrapping [start state]
stateVerbatim // Verbatim output-line, no word-wrapping |
<|file_name|>lint-ctypes-73249-2.rs<|end_file_name|><|fim▁begin|>#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]
pub trait Baz {}
impl Baz for () {}
type Qux = impl Baz;
fn assign() -> Qux {}<|fim▁hole|>
impl Foo for () {
type Assoc = Qux;
}
#[repr(transparent)]
pub struct A<T: Foo> {
x: &'sta... |
pub trait Foo {
type Assoc: 'static;
} |
<|file_name|>flow-require-manager.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descr... | var _path2 = _interopRequireDefault(_path); |
<|file_name|>reducer.js<|end_file_name|><|fim▁begin|>import { RELOAD_WEBVIEW, WEBVIEW_ERROR } from '../../middlewares/Webviews/types';
import { ADD_ACCOUNT, REMOVE_ACCOUNT, TOGGLE_SIDEBAR, TOGGLE_SIDEBAR_ITEM_POSITION, UPDATE_SETTINGS, UPDATE_UNREAD_EMAILS } from './types';
const initialState = {
accounts: [],
set... | |
<|file_name|>starter_first.py<|end_file_name|><|fim▁begin|>import urllib
import twython
def Crowd_twitter(query):
consumer_key = '*****';
consumer_secret = '*****';
access_token = '******';
access_token_secret = '******';
client_args = {'proxies': {'https': 'http://10.93.0.37:3333'}}
t = twyt... | search_query = raw_input("Enter the name to compare : "); |
<|file_name|>boss_death_knight_darkreaver.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the te... | {
new boss_death_knight_darkreaver();
} |
<|file_name|>jediepcserver.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Jedi EPC server.
Copyright (C) 2012 Takafumi Arakaki
Author: Takafumi Arakaki <aka.tkf at gmail.com>
This file is NOT part of GNU Emacs.
Jedi EPC server is free software: you can redistribute it and/or
modify it under the terms of... | |
<|file_name|>TetrahedronIntersection.cpp<|end_file_name|><|fim▁begin|>// *****************************************************************************
// <ProjectName> ENigMA </ProjectName>
// <Description> Extended Numerical Multiphysics Analysis </Description>
// <HeadURL> $HeadURL$ </HeadURL>
// <LastChangedDate... | aTriangle3.addVertex(aTetrahedron.vertex(0));
|
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Greeting(models.Model):
when = models.DateTimeField('date created', auto_now_add=True)
class Material(models.Model):
name = models.CharField(max_length... | modified = models.DateTimeField(auto_now=True)
image = models.ImageField(upload_to="bunches")
pounds = models.FloatField(blank=True, null=True) |
<|file_name|>app.po.ts<|end_file_name|><|fim▁begin|>import { browser, element, by } from 'protractor';
export class NgMaterialSeed2Page {
navigateTo() {
return browser.get('/');
}
getParagraphText() {<|fim▁hole|> return element(by.css('.header-headline h1')).getText();
}
}<|fim▁end|> | |
<|file_name|>lru_cache_unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of ... | def test_len(self):
self.assertEqual(len(self.lru), 3)
|
<|file_name|>webpack.test.js<|end_file_name|><|fim▁begin|>/**
* Copyright 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-... | modules: ['node_modules', path.resolve(__dirname, '../../node_modules')],
extensions: ['.js', '.ts']
} |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>import type AjvCore from "../core";
import type { AnyValidateFunction } from "../types";
export default function standaloneCode(ajv: AjvCore, refsOrFunc?: {<|fim▁hole|><|fim▁end|> | [K in string]?: string;
} | AnyValidateFunction): string; |
<|file_name|>CounterActionTypes.js<|end_file_name|><|fim▁begin|><|fim▁hole|>export const INCREMENT_COUNTER = 'INCREMENT_COUNTER'
export const DECREMENT_COUNTER = 'DECREMENT_COUNTER'<|fim▁end|> | |
<|file_name|>change_request.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
<|fim▁hole|>class Chang... | |
<|file_name|>FeaturedCollectionsRails.test.tsx<|end_file_name|><|fim▁begin|>import { CollectionHubFixture } from "Apps/__tests__/Fixtures/Collections"
import { useTracking } from "Artsy/Analytics/useTracking"
import { ArrowButton } from "Components/Carousel"
import { mount } from "enzyme"
import "jest-styled-components... | FeaturedCollectionEntity,
FeaturedCollectionsRails,
FeaturedImage,
StyledLink, |
<|file_name|>FileZillaEngine.cpp<|end_file_name|><|fim▁begin|>// FileZillaEngine.cpp: Implementierung der Klasse CFileZillaEngine.
//
//////////////////////////////////////////////////////////////////////
#include <filezilla.h>
#include "ControlSocket.h"
#include "directorycache.h"
#include "engineprivate.h"
CFileZil... | int CFileZillaEngine::Init(wxEvtHandler *pEventHandler) |
<|file_name|>mysql_time_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from absl import app
from absl.testing import absltest
from grr_response_server.databases import db_time_test
from grr_response_server.databases import mysql_test
from grr.test_lib import test_lib
class MysqlClientsTest(db_time_test.D... | |
<|file_name|>007_add_ipv6_to_fixed_ips.py<|end_file_name|><|fim▁begin|># Copyright 2011 OpenStack LLC
# 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
#
# ... |
def upgrade(migrate_engine):
# Upgrade operations go here. Don't create your own engine; |
<|file_name|>api_fields.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from udata.api import api, fields, base_reference
from udata.core.badges.api import badge_fields
from udata.core.dataset.api_fields import dataset_ref_fields
from udata.core.organization.api_fields ... | 'slug': fields.String(
description='The reuse permalink string', readonly=True),
'image_url': fields.String(description='The reuse thumbnail URL'),
'page': fields.UrlFor( |
<|file_name|>libwlanplugin.ts<|end_file_name|><|fim▁begin|><!DOCTYPE TS><TS>
<defaultcodec>iso8859-1</defaultcodec>
<context>
<name>WLAN</name>
<message>
<source>Wireless Configuration</source>
<translation>Configuration "sans fils"</translation>
</message>
<message>
<s... | <message>
<source>ESS-ID</source>
<translation>ESS-ID</translation>
</message> |
<|file_name|>extfsTest.js<|end_file_name|><|fim▁begin|>var expect = require('expect.js');
var path = require('path');
var fs = require('../extfs');
describe('extfs', function () {
var rootPath = path.join(__dirname, '../');
it('should return all directories', function (done) {
fs.getDirs(rootPath, function (err,... | |
<|file_name|>test_Read.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
"""test_Read.py to test the Read class.
Requires:
python 2 (https://www.python.org/downloads/)
nose 1.3 (https://nose.readthedocs.org/en/latest/)
Joy-El R.B. Talbot Copyright (c) 2014
The MIT License (MIT)
Permission is hereby granted,... | yield (check_catch_bad_bitwise_input, test, bad_bitwise_flag[test])
|
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# This file is part of VoltDB.
# Copyright (C) 2008-2016 VoltDB 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 ... | # the following conditions:
# |
<|file_name|>test_logistic_dist.cpp<|end_file_name|><|fim▁begin|>// Copyright 2008 Gautam Sewani
// Copyright 2013 Paul A. Bristow
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_... |
test_spot(
static_cast<RealType>(5), // location
static_cast<RealType>(2), // scale
|
<|file_name|>XMLname.py<|end_file_name|><|fim▁begin|>import re
from six import text_type
"""Translate strings to and from SOAP 1.2 XML name encoding
Implements rules for mapping application defined name to XML names
specified by the w3 SOAP working group for SOAP version 1.2 in
Appendix A of "SOAP Version 1.2 Part 2:... | elif (not _NCNameChar(T[i])) or (i == 0 and not _NCNameStartChar(T[i])):
X.append(_toUnicodeHex(T[i]))
else:
X.append(T[i]) |
<|file_name|>holdingpen.py<|end_file_name|><|fim▁begin|>import os
import subprocess
import re
import glob
import numpy as np
from astropy.io import fits
from astropy.time import Time
from astropy.table import Table
import desiutil.log
import desisurvey.config
import desisurvey.plan
import desisurvey.tiles
from desisurv... | |
<|file_name|>deprecation.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apach... | """Returns a dict mapping arg_name to DeprecatedArgSpec w/o position."""
d = {}
for name_or_tuple in deprecated_arg_names_or_tuples:
if isinstance(name_or_tuple, tuple): |
<|file_name|>mode-xml.js<|end_file_name|><|fim▁begin|>/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the followi... | |
<|file_name|>rtconfig.py<|end_file_name|><|fim▁begin|>import os
# toolchains options
ARCH='arm'
CPU='cortex-m7'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
if os.getenv('RTT_ROOT'):
RTT_ROOT = os.getenv('RTT_ROOT')
# cross_tool provides ... | # toolchains
CC = 'armcc' |
<|file_name|>ScratchBuffer.cpp<|end_file_name|><|fim▁begin|>//===--- ScratchBuffer.cpp - Scratch space for forming tokens -------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
... | }
/// getToken - Splat the specified text into a temporary MemoryBuffer and |
<|file_name|>breadcrumbs.js<|end_file_name|><|fim▁begin|><|fim▁hole|>angular.module('breadcrumbs', []);<|fim▁end|> | |
<|file_name|>vote.ts<|end_file_name|><|fim▁begin|>import {Component, View} from 'angular2/angular2';
import {RouteParams} from 'angular2/router';
import {PlayerVote} from './PlayerVote';<|fim▁hole|>let template = require('./vote.html');
@Component({
selector: 'vote'
})
@View({
template: template,
directives: [P... | import {PlayerService} from '../../services/PlayerService';
|
<|file_name|>regions-early-bound-used-in-bound-method.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... | }
impl<'a> GetRef<'a> for Box<'a> {
fn get(&self) -> &'a isize { |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>function __processArg(obj, key) {
var arg = null;
if (obj) {
arg = obj[key] || null;
delete obj[key];
}
return arg;
}
function Controller() {
require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(argumen... | if (arguments[0]) {
{ |
<|file_name|>testlib.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright Martin Manns
# Distributed under the terms of the GNU General Public License<|fim▁hole|># --------------------------------------------------------------------
# pyspread is free software: you can redistribute... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::collections::HashSet;
use std::hash::Hash;
#[derive(Debug, PartialEq)]
pub struct CustomSet<T: Hash + Eq> {
store: HashSet<T>,
}
impl<T> CustomSet<T>
where
T: Hash + Eq,
{
pub fn new(list: Vec<T>) -> CustomSet<T>
where
T: Clone,
{
... |
pub fn difference(&self, set: &CustomSet<T>) -> CustomSet<T>
where
T: Clone, |
<|file_name|>debug.test.js<|end_file_name|><|fim▁begin|>var TestTime = require('logux-core').TestTime
var ServerSync = require('../server-sync')
var TestPair = require('../test-pair')
var sync
function createTest () {
var test = new TestPair()
sync = new ServerSync('server', TestTime.getLog(), test.left)
test.... | |
<|file_name|>ex_244.py<|end_file_name|><|fim▁begin|>class WordDistance(object):
def __init__(self, words):
"""
initialize your data structure here.
:type words: List[str]
"""
self.word_dict = {}
for idx, w in enumerate(words):
self.word_dict[w] = s... | |
<|file_name|>virtualmachineruncommands.go<|end_file_name|><|fim▁begin|>package compute
// Copyright (c) Microsoft and contributors. 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... |
resp, err := client.ListSender(req)
if err != nil { |
<|file_name|>homepage.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright(C) 2013 Mathieu Jourdan
#
# This file is part of weboob.<|fim▁hole|># it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opti... | #
# weboob is free software: you can redistribute it and/or modify |
<|file_name|>A.js<|end_file_name|><|fim▁begin|>/*
This file is part of Ext JS 4
Copyright (c) 2011 Sencha Inc
Contact: http://www.sencha.com/contact
Commercial Usage
Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software... | If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
<|file_name|>metrics.go<|end_file_name|><|fim▁begin|>// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package runtime
// Metrics implementation exported to runtime/metrics.
import (
"runtime/internal/atomic... | compute: func(in *statAggregate, out *metricValue) {
out.kind = metricKindUint64 |
<|file_name|>test_kubernetes_executor.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 this file
# to you ... |
@pytest.mark.skipif(EXECUTOR != 'KubernetesExecutor', reason="Only runs on KubernetesExecutor") |
<|file_name|>headerfooter.js<|end_file_name|><|fim▁begin|>/*-
* #%L
* ARROWHEAD::WP5::Market Manager
* %%
* Copyright (C) 2016 The ARROWHEAD Consortium
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to de... | * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: |
<|file_name|>response.js<|end_file_name|><|fim▁begin|>"use strict";
var Response = (function () {
function Response(result, childWork) {
this.result = result;
this.childWork = childWork;
}
return Response;<|fim▁hole|>exports.default = Response;
//# sourceMappingURL=response.js.map<|fim▁end|> | }());
Object.defineProperty(exports, "__esModule", { value: true }); |
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import Parser, Lexer
from DSL import _lexerParser, _lexerLexer
from DSL import _parserLexer, _parserParser
from DSL import makeParser, makeLexer
lexerLexerConfig = r"""#dsl
%keys ::= '%ignore' '%keys' '::='
comment ::= /#[^\n]*\n/
id... | realOutput = _lexerParser.parse(_lexerLexer.parse(lexerLexerConfig))
testOutput = lexerParser.parse(lexerLexer.parse(lexerLexerConfig)) |
<|file_name|>codeship-notifications.js<|end_file_name|><|fim▁begin|>'use babel';<|fim▁hole|>
const addError = ({ project, branch, build, endDate, commit }) => {
const relativeTime = moment(endDate).fromNow();
atom.notifications.addError(`Build #${build.id} has failed`, {
buttons: [
{
onDidClick()... |
import moment from 'moment';
import openUrl from 'opn'; |
<|file_name|>test.main.js<|end_file_name|><|fim▁begin|>/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib 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.a... | |
<|file_name|>peoplegui--frame.py<|end_file_name|><|fim▁begin|>"""
See peoplegui--old.py: the alternative here uses nedted row frames with fixed
widdth labels with pack() to acheive the same aligned layout as grid(), but it
takes two extra lines of code as is (though adding window resize support makes
the two techni... | lab = Label(row, text=label, width=6)
ent = Entry(row)
row.pack(side=TOP)
lab.pack(side=LEFT)
|
<|file_name|>Detay.java<|end_file_name|><|fim▁begin|>package org.ab.akademikbilisim;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
impor... | // Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId(); |
<|file_name|>ConfigurationFactory.java<|end_file_name|><|fim▁begin|>// Copyright 2014 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http... | public final class ConfigurationFactory {
private final List<ConfigurationFragmentFactory> configurationFragmentFactories; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.