prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>pkg.installspace.context.pc.py<|end_file_name|><|fim▁begin|># generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') ... | PROJECT_SPACE_DIR = "/home/computing/catkin_ws/install"
PROJECT_VERSION = "0.0.0" |
<|file_name|>test_format.py<|end_file_name|><|fim▁begin|>from __future__ import division, absolute_import, print_function
r''' Test the .npy file format.
Set up:
>>> import sys
>>> from io import BytesIO
>>> from numpy.lib import format
>>>
>>> scalars = [
... np.uint8,
... np.int... | ... np.complex64,
... np.complex128,
... object,
... ] |
<|file_name|>bitcoin_sv.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Fastcoin</source>
... | |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>// Use this file to change prototype configuration.
// Note: prototype config can be overridden using environment variables (eg on heroku)
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
serviceName: "Publish data",
// Default po... | useHttps: 'true',
// Cookie warning - update link to service's cookie page.
cookieText: 'GOV.UK uses cookies to make the site simpler. <a href="#" title="Find out more about cookies">Find out more about cookies</a>' |
<|file_name|>plugins-utils.ts<|end_file_name|><|fim▁begin|>import { MediaManagerPluginEntry, MediaPluginEnvType } from 'mmir-lib';
import { PluginExportConfigInfo , RuntimeConfiguration, SettingsBuildEntry , SpeechConfigField , AppConfig , PluginExportInfo , DirectoriesInfo , ResourceConfig , PluginOptions , PluginCon... | return;
|
<|file_name|>BibTeXTechReport.java<|end_file_name|><|fim▁begin|>package ecologylab.serialization.deserializers.parsers.bibtex.entrytypes;
import ecologylab.serialization.annotations.bibtex_tag;
import ecologylab.serialization.annotations.bibtex_type;
import ecologylab.serialization.annotations.simpl_inherit;
impo... | return institution;
}
|
<|file_name|>definitions.cpp<|end_file_name|><|fim▁begin|>/*
SPDX-FileCopyrightText: 2007 Jean-Baptiste Mardelle <jb@kdenlive.org>
SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "definitions.h"
#include <klocalizedstring.h>
#include <QColor>
#include <utility>
#ifdef CRASH_AUTO... | |
<|file_name|>base.py<|end_file_name|><|fim▁begin|># emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The freesurfer module provides basic functions for interfacing with
freesurfer tools.
Currently these tools are supported:
* Dicom2Nifti: using mr... | |
<|file_name|>a00278.js<|end_file_name|><|fim▁begin|>var a00278 =
[<|fim▁hole|><|fim▁end|> | [ "c_blob_comparator", "a00278.html#adf90dfe481e3980859ab92739b51caa6", null ]
]; |
<|file_name|>GrTraitField.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.lang.psi.impl.synthetic;
import com.intellij.openapi.diagnostic.Logger;
import co... | } |
<|file_name|>optionsdialog.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "optionsdialog.h"
#include "ui_optionsdialog.h"<|fim▁hole... |
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h" |
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.pajato.android.gamechat;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.FloatingActionButton;
import android.support.design.... | return true;
}
}
|
<|file_name|>test_list.py<|end_file_name|><|fim▁begin|>tests=[
("python","UnitTestBuildComposite.py",{}),
("python","UnitTestScreenComposite.py",{}),
("python","UnitTestAnalyzeComposite.py",{}),
]
for dir in ['Cluster','Composite','Data','DecTree','Descriptors','FeatureSelect','InfoTheory','KNN','ModelPackage'... | |
<|file_name|>setup-no-deprecations.js<|end_file_name|><|fim▁begin|>import QUnit from 'qunit';
import { registerDeprecationHandler } from '@ember/debug';
let isRegistered = false;
let deprecations = new Set();
let expectedDeprecations = new Set();
// Ignore deprecations that are not caused by our own code, and which w... |
afterEach(function (assert) {
// guard in if instead of using assert.equal(), to not make assert.expect() fail |
<|file_name|>MissingDeprecatedAnnotationInspection.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2003-2019 Dave Griffith, Bas Leijdekkers
*
* 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 ... | return; |
<|file_name|>cookie.py<|end_file_name|><|fim▁begin|><|fim▁hole|>cookie = ''<|fim▁end|> | # Log into the site with your browser, obtain the "Cookie" header,
# and put it here |
<|file_name|>row_data.py<|end_file_name|><|fim▁begin|># Copyright 2016 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.org/licenses/... | """ |
<|file_name|>bitcoin_tr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Mojocoin</source>
<translation>Mojocoin Hakkınd... | This label turns red, if the priority is smaller than "medium". |
<|file_name|>ABTreeSceneNode.cpp<|end_file_name|><|fim▁begin|>/*-------------------------------------------------------------------------
This source file is a part of Whisperwind.(GameEngine + GamePlay + GameTools)
For the latest info, see http://lisuyong.com
Copyright (c) 2012 Suyong Li (79481268@qq.com)
Permission... | copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in |
<|file_name|>tweetService.ts<|end_file_name|><|fim▁begin|>import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import {Events, Platform} from 'ionic-angular';
@Injectable()
export class TweetService {
tweets: any;
timer: any;
error: any;
errorCount: number;
constructor(pu... | this.http.get(url)
.map(res => res.json()).subscribe( |
<|file_name|>inflate.go<|end_file_name|><|fim▁begin|>// Copyright 2009 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.
//go:generate go run gen.go -output fixedhuff.go
// Package flate implements the DEFLATE compressed data f... | // bits to read and guarantee we never read past the end of the stream. |
<|file_name|>hash_matcher.py<|end_file_name|><|fim▁begin|>import hashlib
import re
import os
import pickle
from functools import partial
from externals.lib.misc import file_scan, update_dict
import logging
log = logging.getLogger(__name__)
VERSION = "0.0"
# Constants ------------------------------------------------... | f.hash: f |
<|file_name|>items.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/. */
//! Servo heavily uses display lists, which are retained-mode ... | DisplayItem::Image(ref item) => item.item.bounds,
DisplayItem::RepeatingImage(ref item) => item.item.bounds,
DisplayItem::Border(ref item) => item.item.bounds, |
<|file_name|>serial_pyboard_to_python.py<|end_file_name|><|fim▁begin|>#HV Control &
#Read and Plot from the PMT
#This code is to record the data that is received into the Teensy's ADC.
#Includes the HV control and replotting the results at the end.
#See CSV Dataplot notebook to plot old experiment data.
from __futu... | pmtData.append(numData)
stringToWrite = stringToWrite + str(numData) + '\n'
#f.write(stringToWrite)
graphCount = graphCount + 1 |
<|file_name|>test-gauge.ts<|end_file_name|><|fim▁begin|>/**
* Copyright 2018, OpenCensus Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses... | METRIC_DESCRIPTION,
UNIT, |
<|file_name|>jsonp.py<|end_file_name|><|fim▁begin|>import urllib
from cyclone.web import asynchronous
from twisted.python import log
from sockjs.cyclone import proto
from sockjs.cyclone.transports import pollingbase
class JSONPTransport(pollingbase.PollingTransportBase):
name = 'jsonp'
@asynchronous
d... | self.handle_session_cookie()
self.disable_cache() |
<|file_name|>TypeCheckProtocolInference.cpp<|end_file_name|><|fim▁begin|>//===--- TypeCheckProtocolInference.cpp - Associated Type Inference -------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache ... | defaultType = proto->mapTypeIntoContext(defaultType);
if (!defaultType) return Type();
} |
<|file_name|>ParticleSystemEmitters.hpp<|end_file_name|><|fim▁begin|>/*
Copyright (C) 2013-2014 by Kristina Simpson <sweet.kristas@gmail.com>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this softwar... | |
<|file_name|>bitcoin_el_GR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Lolcockscoin</... | <source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>Διεύθυνση αποστολής της πληρωμής (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation>
</message>
<message> |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity 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... | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License |
<|file_name|>dataset.py<|end_file_name|><|fim▁begin|>import functools
import warnings
from collections import Mapping, Sequence
from numbers import Number
import numpy as np
import pandas as pd
from . import ops
from . import utils
from . import common
from . import groupby
from . import indexing
from . import alignm... | return None
return dict((d, dict_[d]) for d in keys if d in dict_)
|
<|file_name|>geojson_test.py<|end_file_name|><|fim▁begin|>"""Example process file."""
from mapchete.errors import MapcheteNodataTile
from shapely.geometry import shape<|fim▁hole|> # Reading and writing data works like this:
with mp.open("file1") as vector_file:
if vector_file.is_empty():
rai... |
def execute(mp):
"""User defined process.""" |
<|file_name|>broadcast.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
import os
import zmq
import uuid as uuid_pkg
import time
import binascii
import random
import socket
import struct
import marshal
import mmap
from multiprocessing import Manager, Condition
from mmap import ACCESS_WRITE, ACCESS... | def _report_bad(addr): |
<|file_name|>SectionSelectInput.js<|end_file_name|><|fim▁begin|>import React from 'react'
import { connect } from 'react-redux'
import ItemSelectInput from './ItemSelectInput'
import sectionsActions from '../../../actions/SectionsActions'
class SectionSelectInputComponent extends React.Component {
listSections(qu... | |
<|file_name|>ESConstants.java<|end_file_name|><|fim▁begin|>package nikita.common.config;
/**
* Constants used for ElasticSearch queries
*/<|fim▁hole|>public class ESConstants {
public static final String QUERY_SIZE = "size";
public static final String QUERY_FROM = "from";
public static final String QUER... | |
<|file_name|>gateway-s3.go<|end_file_name|><|fim▁begin|>/*
* Minio Cloud Storage, (C) 2017 Minio, 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/lic... | Client: client,
anonClient: anonClient,
}, nil
} |
<|file_name|>download_era-interim.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import os
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
time=["06"]
year=["2013"]
param=["129.128","130.128","131.128","132.128","157.128","151.128"]
nam=["hgt","air","uwnd","vwnd","rhum","psl"]
#month=["01","02","... | 'date' : date,
'time' : t ,
'origin' : "all",
'type' : "an", |
<|file_name|>env.py<|end_file_name|><|fim▁begin|>from operator import itemgetter
import gym
from gym import spaces
from gym.utils import seeding
from .game import Game
from .card import Card
from .player import PlayerAction, PlayerTools
from .agents.random import AgentRandom
class LoveLetterEnv(gym.Env):
"""Lov... | return [seed]
def _step(self, action):
assert self.action_space.contains(action) |
<|file_name|>backend.py<|end_file_name|><|fim▁begin|>"""Base material for signature backends."""
from django.urls import reverse
class SignatureBackend(object):
"""Encapsulate signature workflow and integration with vendor backend.
Here is a typical workflow:
* :class:`~django_anysign.models.SignatureTy... | document(s) and then the signature service redirects the signer to
(this) `Django` website.
Raise ``NotImplementedError`` in case the backend does not support |
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>from django.conf import settings
from django.template import (Template, Context, TemplateDoesNotExist,
TemplateSyntaxError)
from django.utils.encoding import smart_unicode
from django.utils.hashcompat import md5_constructor
from django.views.debug import Exceptio... | self.frames = frames
|
<|file_name|>FileExporterImplTest.java<|end_file_name|><|fim▁begin|>// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package com.go... | // note that FileExporter throws an explicit RuntimeException
} |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate futures;
extern crate rpassword;
extern crate ethcore_util as util;
extern crate bigint;
extern crate parity_rpc as rpc;
extern crate parity_rpc_client as client;
use rpc::signer::{U256, ConfirmationRequest};
use client::signer_client::SignerRpc;
use std:... | signer.confirm_request(id, None, None, None, password).map(|res| {
match res {
Ok(u) => Ok(format!("Signed transaction id: {:#x}", u)),
Err(e) => Err(format!("{:?}", e)), |
<|file_name|>parentElement.test.ts<|end_file_name|><|fim▁begin|>import { remote } from '../../../src'
describe('parent element test', () => {
it('should return parent element of an element', async () => {
const browser = await remote({
capabilities: {
browserName: 'foobar'
... | const elem = await browser.$('#foo')
const parentElem = await elem.parentElement() |
<|file_name|>missingCode.test.js<|end_file_name|><|fim▁begin|>describe('A Feature', function() {
it('A Scenario', function() {
// ### Given missing code
});
<|fim▁hole|><|fim▁end|> | }); |
<|file_name|>submissions.js<|end_file_name|><|fim▁begin|>app.controller('submissions', ['$scope', '$http', '$rootScope', 'globalHelpers', function ($scope, $http, $rootScope, globalHelpers) {
$scope.stats = {};
$scope.getUrlLanguages = function(gitUrlId){
globalHelpers.getUrlLanguagesPromise(gitUrlId)... | };
}]); |
<|file_name|>issue-43692.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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... | assert_eq!('\u{10__FFFF}', '\u{10FFFF}');
assert_eq!("\u{10_F0FF__}foo\u{1_0_0_0__}", "\u{10F0FF}foo\u{1000}"); |
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|># Calliope
# Copyright (C) 2017, 2018 Sam Thursfield <sam@afuera.me.uk><|fim▁hole|># 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 version.
#
# T... | #
# This program is free software: you can redistribute it and/or modify |
<|file_name|>cne.d.ts<|end_file_name|><|fim▁begin|>export function cne(t: string): CurriedCNE;
/**<|fim▁hole|> * Curried element creation.
*/
export type CurriedCNE = (P?: HTMLElement) => HTMLElement[];<|fim▁end|> | |
<|file_name|>test_embedded_ansible_actions.py<|end_file_name|><|fim▁begin|>import fauxfactory
import pytest
from cfme import test_requirements
from cfme.control.explorer.policies import VMControlPolicy
from cfme.infrastructure.provider.virtualcenter import VMwareProvider
from cfme.markers.env_markers.provider import O... | yield repository |
<|file_name|>results.py<|end_file_name|><|fim▁begin|>#
# results.py - Result widget for Yabsc
#
# Copyright (C) 2008 James Oakley <jfunk@opensuse.org>
# 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 Found... | return len(self.visiblepackages) |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>//= require active_admin/base<|fim▁hole|>//= require bootstrap
//= require bootstrap-wysihtml5
//= require ./active_tweaker<|fim▁end|> | //= require jquery.nested-fields
//= require chosen-jquery |
<|file_name|>formatting_helper.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the output module field formatting helper."""
import unittest
from dfdatetime import semantic_time as dfdatetime_semantic_time
from dfvfs.path import fake_path_spec
from plaso.containers import ... | event, event_data, event_data_stream = (
containers_test_lib.CreateEventFromValues(self._TEST_EVENTS[0]))
zone_string = test_helper.GetFormattedField( |
<|file_name|>UnknownStrategyRepository.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in co... | * or implied. See the License for the specific language governing permissions and limitations under
* the License.
*******************************************************************************/
package com.github.lothar.security.acl.elasticsearch.repository; |
<|file_name|>before.js<|end_file_name|><|fim▁begin|>/**
* before : before(el, newEl)<|fim▁hole|> * var before = require('dom101/before');
* var newNode = document.createElement('div');
* var button = document.querySelector('#submit');
*
* before(button, newNode);
*/
function before (el, newEl) {
... | * Inserts a new element `newEl` just before `el`.
* |
<|file_name|>EmailFilter.java<|end_file_name|><|fim▁begin|>package com.example.aperture.core.contacts;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract;
import java.util.List;
import java.util.ArrayList;
im... | };
private final static class EmailComparer implements java.util.Comparator<Intent> { |
<|file_name|>ListComprehension-after.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | records = [select.query.decode(r) for r in records] |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup
setup(
name = 'moretext',
packages = ['moretext'],
version = '0.1',<|fim▁hole|> description = 'Get dummy Chinese text (lorem ipsum) with Handlino serivce.',
author = 'Pomin Wu',
author_email = 'pomin5@gmail.com',
... | |
<|file_name|>074_First_Bad_Version.py<|end_file_name|><|fim▁begin|>#class SVNRepo:
# @classmethod
# def isBadVersion(cls, id)
# # Run unit tests to check whether verison `id` is a bad version<|fim▁hole|>class Solution:
"""
@param n: An integers.
@return: An integer which is the first bad versi... | # # return true if unit tests passed else false.
# You can use SVNRepo.isBadVersion(10) to check whether version 10 is a
# bad version. |
<|file_name|>hobbies.js<|end_file_name|><|fim▁begin|>var changeSpan;<|fim▁hole|>
var hobbies = [
'Music',
'HTML5',
'Learning',
'Exploring',
'Art',
'Teaching',
'Virtual Reality',
'The Cosmos',
'Unity3D',
'Tilemaps',
'Reading',
'Butterscotch',
'Drawing',
'Taking Photos',
'Smiles',
'The Poetics of ... | var i = 0; |
<|file_name|>test_tag.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import fauxfactory
import pytest
from cfme.configure.configuration import Category, Tag
from cfme.rest.gen_data import a_provider as _a_provider
from cfme.rest.gen_data import categories as _categories
from cfme.rest.gen_data import dialog a... | tags_data_edited.append({
"href": tag.href, |
<|file_name|>TechDraw.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>Cmd2LineCenterLine</name>
<message>
<source>Add Centerline between 2 Lines</source>
<translation type="unfinished"></translation>
</message>
</context... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import redis
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from pyramid.config import Configurator
<|fim▁hole|> authorization_policy = ACLAuthorizationPolicy()
authentication_policy = ... | def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
|
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import * as restify from 'restify';
import logger from './logger';
import settings from './settings';<|fim▁hole|>try {
settings.initialize();
} catch (ex) {
logger.error(ex);
process.exit(1);
}
const server = restify.createServer();
server.get('/', (req, re... |
// Initialize settings. |
<|file_name|>move-nodetest.js<|end_file_name|><|fim▁begin|>'use strict';
var expect = require('chai').expect;
var ember = require('ember-cli/tests/helpers/ember');
var MockUI = require('ember-cli/tests/helpers/mock-ui');
var MockAnalytics = require('ember-cli/tests/helpers/mock-analytics');
var C... | expect(ui.output).to.include('nope.js'); |
<|file_name|>networkpolicy.go<|end_file_name|><|fim▁begin|>/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
... | See the License for the specific language governing permissions and
limitations under the License. |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Generators for file formats that can be derived from the intercom
//! libraries.
use std::collections::HashMap;
use intercom::type_system::TypeSystemName;
use intercom::typelib::{Interface, TypeInfo, TypeLib};
/// A common error type for all the generators.
#[deri... | |
<|file_name|>thaig2p.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Thai Grapheme-to-Phoneme (Thai G2P)
GitHub : https://github.com/wannaphong/thai-g2p
"""
import random
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from pythainlp.corpus import get_corpus_path
dev... | |
<|file_name|>issue-17718-const-naming.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.a... | // option. This file may not be copied, modified, or distributed
// except according to those terms. |
<|file_name|>run_tests_py.py<|end_file_name|><|fim▁begin|>#
# run all the regression tests
#
# [or, you can request specific ones by giving their names on the command line]
#
import sys
import compile
import os
import subprocess
import context
def run_test (cmd, *args):
cmd = PJ ('tests', cmd)
p = subprocess.... | # the chars are too hard to tests for, and unlikely to be wrong.
# should really make a separate char test.
|
<|file_name|>ruutu.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_urllib_parse_urlparse
from ..utils import (
determine_ext,
int_or_none,
xpath_attr,
xpath_text,
)
class RuutuIE(InfoExtractor):
... | elif child.tag.endswith('File'):
video_url = child.text |
<|file_name|>continuous.py<|end_file_name|><|fim▁begin|><|fim▁hole|> unicode_literals)
import os
import six
import argparse
from . import Command
from .run import Run
from .compare import Compare
from ..repo import get_repo, NoSuchNameError
from ..console import color_print, log
from .. import... | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function, |
<|file_name|>dedicatedworkerglobalscope.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 devtools;
use devtools_traits::Devtool... | Some(closing)),
receiver: receiver,
own_sender: own_sender, |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># Copyright 2013 Kylin, 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-2.0
... | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
<|file_name|>log.py<|end_file_name|><|fim▁begin|>import logging
import terminal
INFO = logging.INFO
# between info and debug
VERBOSE = (logging.INFO + logging.DEBUG) / 2
DEBUG = logging.DEBUG
log = logging.getLogger('rdopkg')
log.setLevel(logging.INFO)
if len(log.handlers) < 1:
formatter = logging.Formatter(fmt... | def good(self):
return self.green |
<|file_name|>Everwing_data.py<|end_file_name|><|fim▁begin|>from ast import literal_eval
from json import dumps, loads
from urllib2 import Request, urlopen
from requests import post, get
from p3lzstring import LZString
def user_input(data):
i = 0
while i < len(data):
if 'xp' in data[i]['dra... | except KeyError:
|
<|file_name|>test_grocerylist.py<|end_file_name|><|fim▁begin|>from classes import wunderpy_wrapper
from classes import grocerylist
from classes import grocerystore
wp = wunderpy_wrapper.wunderpy_wrapper('../data/tokens.csv')
obj = wp.get_task_positions_obj(wp.WUNDERLIST_GROCERY)
grocery_store = grocerystore.grocerySt... | # TODO check reloading of a list when you enter the right sheet
# TODO sort by cat order value, not cat id.
print('done') |
<|file_name|>updater.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import re
import json
import tempfile
import toml
import os
class RequirementsTXTUpdater(object):
SUB_REGEX = r"^{}(?=\s*\r?\n?$)"
@classmethod
def update... | return data
|
<|file_name|>entity.py<|end_file_name|><|fim▁begin|>"""Base class for Tado entity."""
from homeassistant.helpers.entity import Entity
from .const import DEFAULT_NAME, DOMAIN, TADO_ZONE
class TadoDeviceEntity(Entity):
"""Base implementation for Tado device."""
def __init__(self, device_info):
"""Init... | """Base implementation for Tado zone."""
def __init__(self, zone_name, home_id, zone_id):
"""Initialize a Tado zone.""" |
<|file_name|>track_metadata.hpp<|end_file_name|><|fim▁begin|>/*
* Turbo Sliders++
* Copyright (C) 2013-2014 Martin Newhouse
*
* 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... | |
<|file_name|>static-mut-reference-across-yield.rs<|end_file_name|><|fim▁begin|>// build-pass
// revisions: mir thir
// [thir]compile-flags: -Zthir-unsafeck
#![feature(generators)]<|fim▁hole|>
static mut A: [i32; 5] = [1, 2, 3, 4, 5];
fn is_send_sync<T: Send + Sync>(_: T) {}
fn main() {
unsafe {
let gen_i... | |
<|file_name|>elasticache.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "elasticache")]
extern crate rusoto;
use rusoto::elasticache::{ElastiCacheClient, DescribeCacheClustersMessage};
use rusoto::{DefaultCredentialsProvider, Region};<|fim▁hole|>
#[test]
fn should_describe_cache_clusters() {
let credentials = D... | use rusoto::default_tls_client; |
<|file_name|>medlemsinput.py<|end_file_name|><|fim▁begin|># Graphical paste and save GUI for adding members
from Tkinter import *
import os
import pdb
import datetime
lday = 04
lmonth = 10
class myDate:
def __init__(self, year, month, day):
self.date = datetime.datetime(year, month, day)
self.upd... | first = first + 1
fstr = format(first, '02')
return fstr
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from ajenti.api import *
from ajenti.plugins import *
info = PluginInfo(
title='Hosts',
icon='sitemap',
dependencies=[
PluginDependency('main'),
],
)
def init():
import main<|fim▁end|> | |
<|file_name|>getargs_dict.py<|end_file_name|><|fim▁begin|>def task_compute():<|fim▁hole|> def comp():
return {'x':5,'y':10, 'z': 20}
return {'actions': [(comp,)]}
def show_getargs(values):
print(values)
def task_args_dict():
return {'actions': [show_getargs],
'getargs': {'values': ('comput... | |
<|file_name|>valorchat.server.socket.config.js<|end_file_name|><|fim▁begin|>'use strict';
// Create the valorchat configuration
module.exports = function (io, socket) {
// Emit the status event when a new socket client is connected
io.emit('ValorchatMessage', {
type: 'status',
text: 'Is now connected',
... | message.username = socket.request.user.username;
// Emit the 'ValorchatMessage' event |
<|file_name|>CModuleNode.java<|end_file_name|><|fim▁begin|>/*
Copyright 2015 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.org/licenses/LICE... | |
<|file_name|>migration.py<|end_file_name|><|fim▁begin|># coding: utf-8
#
# Copyright (c) 2013 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 at
#
# ... | If None - database will update to the latest
available version. |
<|file_name|>position_history_update.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-
# !/usr/bin/env python
#import easytrader
import easyhistory
import pdSql_common as pds
from pdSql import StockSQL
import sys
import datetime
from pytrade_api import *
from multiprocessing import Pool
import os, ti... | df['code'] = df['code'].apply(lambda x: pds.format_code(x))
df['name'] = df['code'].apply(lambda x: pds.format_name_by_code(x,CHINESE_DICT))
df = df.set_index('code')
"""
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Code for finding content."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import abc
import collections
import os
<|fim▁hole|>from ... import types as t
from ...util import (
ANSIBLE_SOURCE_ROOT,
)
from .. import ... | |
<|file_name|>studentnew.js<|end_file_name|><|fim▁begin|>define([
'jquery',
'underscore',
'backbone',
'collections/users/students',
'collections/users/classes',
'collections/users/streams',
'text!templates/students/studentnew.html',
'text!templates/students/classes.html',
'text!templates/students/streams.html',... |
classesTpl: _.template(classesTpl),
streamsTpl: _.template(streamsTpl), |
<|file_name|>multi_loader.go<|end_file_name|><|fim▁begin|>package url
import (
"github.com/dpb587/metalink"<|fim▁hole|> "github.com/dpb587/metalink/file"
)
type MultiLoader struct {
loaders []Loader
}
var _ Loader = &MultiLoader{}
func NewMultiLoader(loaders ...Loader) *MultiLoader {
return &MultiLoader{
loade... | |
<|file_name|>TestTemporalColorTracker.py<|end_file_name|><|fim▁begin|>from SimpleCV import Camera, Image, Color, TemporalColorTracker, ROI, Display
import matplotlib.pyplot as plt
cam = Camera(1)
tct = TemporalColorTracker()
img = cam.getImage()
roi = ROI(img.width*0.45,img.height*0.45,img.width*0.1,img.height*0.1,img... | plt.plot(tct._rtData,'r-')
plt.grid()
plt.savefig('temp.png')
plt.clf() |
<|file_name|>extern-crate-used.rs<|end_file_name|><|fim▁begin|>// Extern crate items are marked as used if they are used
// through extern prelude entries introduced by them.
// edition:2018
#![deny(unused_extern_crates)]
// Shouldn't suggest changing to `use`, as new name
// would no longer be added to the prelude ... |
use core::any as are_you_okay3;
use ::core::any as are_you_okay4; |
<|file_name|>test_insert.py<|end_file_name|><|fim▁begin|>import time
import psycopg2
import os
import sys
if __name__ == "__main__":
try:
conn = psycopg2.connect("dbname='master' user='postgres' host='localhost' password='postgres'")
except Exception, e:
print "unable to connect"
sys.exit()
cur = conn.cur... | print x
cur.execute("INSERT INTO reptable166 (name) VALUES(%s)", ("test" + str(x),))
conn.commit()
time.sleep(1) |
<|file_name|>qaudiooutput_mac_p.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the ... | |
<|file_name|>model_control_one_enabled_Fisher_Lag1Trend_Seasonal_Hour_LSTM.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Fisher'] , ['Lag1Trend'] , ['Seasonal_Hour'] , ['LSTM'] );<|fim▁end|> | |
<|file_name|>package.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, t... | |
<|file_name|>resolve-type-param-in-item-in-trait.rs<|end_file_name|><|fim▁begin|>// Issue #14603: Check for references to type parameters from the
// outer scope (in this case, the trait) used on items in an inner
// scope (in this case, the enum).
trait TraitA<A> {
fn outer(&self) {
enum Foo<B> {
... | trait TraitB<A> {
fn outer(&self) { |
<|file_name|>EvaLayout.java<|end_file_name|><|fim▁begin|>/*
package de.elxala.langutil
(c) Copyright 2006 Alejandro Xalabarder Aulet
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 o... | * @param parent the component to be laid out
*/
public Dimension minimumLayoutSize(Container parent) |
<|file_name|>haptic.rs<|end_file_name|><|fim▁begin|>use joystick::SDL_Joystick;
#[cfg(feature = "no_std")]
use core::prelude::*;
use libc::{c_int, c_uint, c_char, c_float, c_void, int16_t, int32_t, uint8_t, uint16_t, uint32_t};
pub const SDL_HAPTIC_CONSTANT: uint16_t = 1 << 0;
pub const SDL_HAPTIC_SINE: uint16_t = 1 <... | pub const SDL_HAPTIC_FRICTION: uint16_t = 1 << 10;
pub const SDL_HAPTIC_CUSTOM: uint16_t = 1 << 11;
pub const SDL_HAPTIC_GAIN: uint16_t = 1 << 12;
pub const SDL_HAPTIC_AUTOCENTER: uint16_t = 1 << 13; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.