prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>namespace_kluster_kite_1_1_large_objects_1_1_tests.js<|end_file_name|><|fim▁begin|><|fim▁hole|>];<|fim▁end|> | var namespace_kluster_kite_1_1_large_objects_1_1_tests =
[
[ "ParcelsTest", "class_kluster_kite_1_1_large_objects_1_1_tests_1_1_parcels_test.html", "class_kluster_kite_1_1_large_objects_1_1_tests_1_1_parcels_test" ] |
<|file_name|>CSVFileReader.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2007, 2018 Stefaan Van Cauwenberge
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0 (the "License"). If a copy of the... | SEPERATOR ("csvReader_seperator" ,"," ,DataType.STRING);
//@formatter:on
private Parameters(final String name, final String defaultValue, final DataType dataType) {
this.name = name; |
<|file_name|>WebSearchResourceTest.java<|end_file_name|><|fim▁begin|>package org.axway.grapes.server.webapp.resources;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.GenericType;
import com.sun.jersey.api.client.WebResource;
import com.yammer.dropwizard.auth.basic.BasicAuthProvider;
... | List<String> artifactIds = new ArrayList<>();
artifactIds.add("testSearch_artifact_id_1"); |
<|file_name|>ResourceCrawler.java<|end_file_name|><|fim▁begin|>package ecologylab.bigsemantics.service.crawler;
import java.io.IOException;
/**
* A general framework for crawling resources.
*
* @author quyin
*/
<|fim▁hole|>
/**
* Queue a resource with the given URI.
*
* @param uri
*/
... | public interface ResourceCrawler<T>
{
|
<|file_name|>analyze_color.py<|end_file_name|><|fim▁begin|># Analyze Color of Object
import os
import cv2
import numpy as np
from . import print_image
from . import plot_image
from . import fatal_error
from . import plot_colorbar
def _pseudocolored_image(device, histogram, bins, img, mask, background, channel, filen... | 'blue-yellow', |
<|file_name|>de-ch.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
<|fim▁hole|>CKEDITOR.plugins.setLang( 'save', 'de-ch', {
toolbar: 'Speichern'
} );<|fim▁end|> | For licensing, see LICENSE.md or http://ckeditor.com/license
*/
|
<|file_name|>DataContainer.js<|end_file_name|><|fim▁begin|>import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import _ from 'lodash';
import { api } from './Api';
import { formatJSON } from './utils';
export default createReactClass({
propTypes: {<|fim... | |
<|file_name|>elasticsearch_util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding=utf-8
import commands
import sys
from docopt import docopt
#from handler import LogFileClient
from sdutil.log_util import getLogger
from sdutil.date_util import *
reload(sys)
sys.setdefaultencoding('utf-8')
from elasticsearch... | |
<|file_name|>vrid_binding.go<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2021 Citrix Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... | * See the License for the specific language governing permissions and
* limitations under the License.
*/
|
<|file_name|>video.cc<|end_file_name|><|fim▁begin|>/*
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can b... | } // namespace jni |
<|file_name|>ipad.js<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as published by
* the Free Software Foundation.... | "/static-assets/components/cstudio-preview-tools/mods/agent-plugins/ipad/object-rotate-left.png')";
|
<|file_name|>bubble-chart.js<|end_file_name|><|fim▁begin|>import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("circle", {
cx: "7.2",
cy: "14.4",
r: "3.2"
}), h("circle", {
cx: "14.8",
cy: "18",<|fim▁hole|> r: "4.8"
})), 'BubbleChart');<|fim▁... | r: "2"
}), h("circle", {
cx: "15.2",
cy: "8.8", |
<|file_name|>npc_table.js<|end_file_name|><|fim▁begin|>/**
* Created by Akkadius on 2/10/2015.
*/
$(document).ready(function() {
var CalcDataTableHeight = function () {
return $(window).height() * 60 / 100;
};
var table = $("#npc_head_table").DataTable( {
scrollY: CalcDataTableHei... | DoModal("ajax.php?M=NPC&special_abilities_editor&val=" + input_data + "&npc_id=" + npc_id + "&db_field=" + db_field);
return; |
<|file_name|>cloud.tsx<|end_file_name|><|fim▁begin|>import * as ReactDOM from "react-dom";
import * as React from "react";
import axios from "axios";
import "babel-polyfill";
import { useState } from "react";
import { parse } from "query-string";
import {
AppBar,
Typography,
Toolbar,
Paper,
Button,
Theme,
... | > |
<|file_name|>client_test.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The etcd 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/LICENS... |
time.Sleep(10 * time.Millisecond) |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for webpack-sources 1.4
// Project: https://github.com/webpack/webpack-sources
// Definitions by: e-cloud <https://github.com/e-cloud>
// Chris Eppstein <https://github.com/chriseppstein>
// Piotr Błażejewicz <https... | |
<|file_name|>method-ambig-two-traits-from-impls2.rs<|end_file_name|><|fim▁begin|>trait A { fn foo(); }
trait B { fn foo(); }
struct AB {}
impl A for AB {<|fim▁hole|>
impl B for AB {
fn foo() {}
}
fn main() {
AB::foo(); //~ ERROR E0034
}<|fim▁end|> | fn foo() {}
} |
<|file_name|>ChainedComparison5.py<|end_file_name|><|fim▁begin|>mapsize = 35<|fim▁hole|> return 1<|fim▁end|> |
def test(x, y):
if <weak_warning descr="Simplify chained comparison">0 <= x < <caret>mapsize and y >= 0 and y < mapsize</weak_warning>: |
<|file_name|>Capitalize!.py<|end_file_name|><|fim▁begin|>def capitalize(string):
<|fim▁hole|> return string
if __name__ == '__main__':
string = input()
capitalized_string = capitalize(string)
print(capitalized_string)<|fim▁end|> | for s in string.split(" "):
string = string.replace(s, s.capitalize())
|
<|file_name|>closetag.js<|end_file_name|><|fim▁begin|>/**
* Tag-closer extension for CodeMirror.
*
* This extension adds an "autoCloseTags" option that can be set to
* either true to get the default behavior, or an object to further
* configure its behavior.
*
* These are supported options:
*
* `whenC... | var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
if (ch == ">" && state.tagName) {
|
<|file_name|>matrix-min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|> | oid sha256:2566f139073c240a090aee1fb4254ec2b799a9402dd6494447afbe4e12c97654
size 6184 |
<|file_name|>evaluation.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit} from '@angular/core';
import {EvaluationService} from '../service/evaluation.service';
@Component({
selector: 'app-evaluation',
templateUrl: './evaluation.component.html',
styleUrls: ['./evaluation.component.css']
})
exp... | }
|
<|file_name|>profiles.rs<|end_file_name|><|fim▁begin|>use crate::core::compiler::CompileMode;
use crate::core::resolver::features::FeaturesFor;
use crate::core::{Feature, Features, PackageId, PackageIdSpec, Resolve, Shell};
use crate::util::errors::CargoResultExt;
use crate::util::interning::InternedString;
use crate::... | |
<|file_name|>WorkspacesContactsPhoneNumbers.js<|end_file_name|><|fim▁begin|>/*
INPUT:
* workspaceId
* contactId
DESCRIPTION
An editable list of phone numbers (`workspacesContactsPhoneNumbers`) owned by contactId.
*/
define([
"dojo/_base/declare"
, "dijit/form/ValidationTextBox"
, "put-selector/put"
, "hotplate/... | }
|
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render
from django.conf.urls import patterns, url
from django.core.urlresolvers import reverse_lazy
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
from edamame import base, utils, ge... | self.wrap_view(self.test_page), name='test_page'),
)
return urlpatterns |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,)
__version__ = '.'.join(map(str, VERSION))
default_app_config = 'admin_sso.apps.AdminSSOConfig'
# Do not use Django settings at module level as recommended
try:
from django.utils.functional import LazyObject
except ImportError:
pass
els... | self._wrapped = Settings(default_settings)
class Settings(object): |
<|file_name|>mtwt.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/licen... | }
/// Extend a syntax context with a given rename and sctable (explicit memoization)
fn apply_rename_internal(id: Ident, |
<|file_name|>env.py<|end_file_name|><|fim▁begin|>from alembic import context
from sqlalchemy import create_engine, pool
from warehouse import db
def run_migrations_offline():
"""
Run migrations in 'offline' mode.
This configures the context with just a URL
and not an Engine, though an Engine is acce... | """
url = context.config.get_main_option("sqlalchemy.url") |
<|file_name|>gapi.user.factory.js<|end_file_name|><|fim▁begin|>;(function () {
'use strict';
angular.module('angularGAPI')
.factory('User', ['GAPI', userFact]);
<|fim▁hole|> function userFact(GAPI) {
var User = new GAPI('plus', 'v1', {});
User.getUserInfo = function(params) {
return User.get('pe... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>
pub use lapack::{c32, c64};
pub use std::{f32, f64};
/// Enum for symmetric matrix inputs.
#[repr(u8)]
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum Symmetric {
/// Read elements from the upper-triangular portion of the matrix
Upper = b'U',
//... | //! Globally-used traits, structs, and enums
#![deny(missing_docs)] |
<|file_name|>mapping.py<|end_file_name|><|fim▁begin|>#
# This file is protected by Copyright. Please refer to the COPYRIGHT file
# distributed with this source distribution.
#
# This file is part of REDHAWK core.
#
# REDHAWK core is free software: you can redistribute it and/or modify it under
# the terms of the GNU Le... | javaport['constructor'] = generator.constructor(port.name())
javaport['start'] = generator.start()
javaport['stop'] = generator.stop()
javaport['multiout'] = generator.supportsMultiOut() |
<|file_name|>tweets.js<|end_file_name|><|fim▁begin|>var boletesPinya = $.merge($.merge($.merge($("#cDB").find("path"), $("#cB4").find("path")), $("#cB3").find("path")), $("#cB2").find("path"));
var boletesTronc = $.merge($.merge($("#cB4").find("path"), $("#cB3").find("path")), $("#cB2").find("path"));
var usedTweets ... | contentAsHTML: true, |
<|file_name|>spinner.js<|end_file_name|><|fim▁begin|><|fim▁hole|>
angular.module('polaris.directives')
.directive('spinner', [function() {
function link(scope) {
scope.$watch('disappear', function() {
if (scope.disappear) {
scope.hideSpinner = true;
} else {
scope.hideSpi... | 'use strict'; |
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>import unittest
import os
from latexbuild.utils import (
random_str_uuid,
random_name_filepath,
list_filepathes_with_predicate,
read_file,
recursive_apply,<|fim▁hole|>
class TestRandomStrUuid(unittest.TestCase):
'''Test ... | )
PATH_FILE = os.path.abspath(__file__)
PATH_TEST = os.path.dirname(PATH_FILE) |
<|file_name|>workingSetTest.ts<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 François de Campredon
//
// 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.apa... | documentText: 'hello world' |
<|file_name|>SleepTimer.cpp<|end_file_name|><|fim▁begin|>/**
* @file SleepTimer.cpp
* @author Pere Tuset-Peiro (peretuset@openmote.com)
* @version v0.1
* @date May, 2015
* @brief
*
* @copyright Copyright 2015, OpenMote Technologies, S.L.
* This file is licensed under the GNU Gene... |
// Set future timeout
SleepModeTimerCompareSet(current + counts);
} |
<|file_name|>milestoneapplier_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2019 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/LICEN... | name: "closed (not merged) PR on non-default branch => do nothing", |
<|file_name|>AsciiSerial.py<|end_file_name|><|fim▁begin|>import serial
import serial.tools.list_ports
import copy
import numpy as np
import math
import random
class AsciiSerial:
def __init__(self):
self._graphsChannels = {'graph1': None, 'graph2': None, 'graph3': None, 'graph4': None}
self._enCha... |
# Structure definition:
# {'ChannelName': channelData('display', {'lineName': [lowLevelID, xFieldID, yFieldID(optional)], ... }), ... }
self._channelsDataStructure = { |
<|file_name|>Indicator.js<|end_file_name|><|fim▁begin|>Ext.define('Ext.rtl.scroll.Indicator', {
override: 'Ext.scroll.Indicator',
<|fim▁hole|> privates: {
translateX: function(value) {
if (this.getScroller().getRtl()) {
value = -value;
}
this.ca... | |
<|file_name|>comeau.hpp<|end_file_name|><|fim▁begin|>// (C) Copyright John Maddock 2001.
// (C) Copyright Douglas Gregor 2001.
// (C) Copyright Peter Dimov 2001.
// (C) Copyright Aleksey Gurtovoy 2003.
// (C) Copyright Beman Dawes 2003.
// (C) Copyright Jens Maurer 2003.
// Use, modification and distributi... | # if defined(_MSC_VER) && (_MSC_VER < 1300)
# define BOOST_NO_VOID_RETURNS
# endif |
<|file_name|>_Dialign.py<|end_file_name|><|fim▁begin|># Copyright 2009 by Cymon J. Cox. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Command line wrapper for the multiple a... | |
<|file_name|>variables.py<|end_file_name|><|fim▁begin|># #
# Copyright 2012-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (htt... | self.assertEqual(str(v['BAR']), "0 1 2 10 11 20")
v.nappend_el('BAR', 30, idx= -2)
self.assertEqual(str(v), "{'BAR': [[0, 1, 2], [10, 11, 30], [20]]}") |
<|file_name|>typogrify.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
<|fim▁hole|>from rstblog.programs import RSTProgram
import typogrify
class TypogrifyRSTProgram(RSTProgram):
def get_fragments(self):
if self._fragment_cache is not None:
return self._fragment_cache
... | from jinja2 import Markup |
<|file_name|>camlistored.go<|end_file_name|><|fim▁begin|>/*
Copyright 2011 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-2.0
Unless requir... | // 2) We still want our client (camput) to be able to |
<|file_name|>Region.java<|end_file_name|><|fim▁begin|>package com.eaw1805.data.model.map;
import com.eaw1805.data.constants.RegionConstants;
import com.eaw1805.data.model.Game;
import java.io.Serializable;
/**
* Represents a region of the world.
*/
public class Region implements Serializable {
/**
* Requ... |
} |
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin
#from .models import Tag
#import sys
#import importlib
#importlib.reload(sys)
#admin.site.register(Tag)
<|fim▁hole|># Register your models here.<|fim▁end|> | |
<|file_name|>BinaryTree.java<|end_file_name|><|fim▁begin|>package ru.job4j.collections.tree;
/**
* Бинарное дерево .
*
* @author Hincu Andrei (andreih1981@gmail.com) by 20.10.17;
* @version $Id$
* @since 0.1
* @param <E> тип данных.
*/
public class BinaryTree<E extends Comparable<E>> extends Tree<E> {
/**
... | * Узел дерева.
* @param <E> значение.
*/ |
<|file_name|>test_vec.C<|end_file_name|><|fim▁begin|>#include "async.h"
class my_resizer_t : public vec_resizer_t {
public:
my_resizer_t () : vec_resizer_t () {}
size_t resize (u_int nalloc, u_int nwanted, int objid);
};
size_t
my_resizer_t::resize (u_int nalloc, u_int nwanted, int objid)
{
int exponent = fls (... | } |
<|file_name|>functions.py<|end_file_name|><|fim▁begin|>from PyQRNative import *
from PIL.Image import BILINEAR, BICUBIC, ANTIALIAS, NEAREST
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import portrait, A4
from reportlab.lib.units import cm, mm
from StringIO import StringIO
from plant.tag import crea... | paired = LAYOUTS[layout]['paired']
x = pagesize[0] - (qr_size + qr_lxmargin) |
<|file_name|>FixedCollisionTypeAction.java<|end_file_name|><|fim▁begin|>package engine.actions;
import engine.gameObject.GameObject;
import authoring.model.collections.GameObjectsCollection;
public class FixedCollisionTypeAction extends PhysicsTypeAction {
public FixedCollisionTypeAction (String type, String sec... | }
} |
<|file_name|>placeholder.rs<|end_file_name|><|fim▁begin|>use std::rc;
use time;
use serialize::json;
use super::expression;
use super::sql;<|fim▁hole|> idx: u8
}
impl Placeholder {
pub fn new(idx: u8) -> Placeholder {
Placeholder { idx: idx }
}
pub fn get_idx(&self) -> u8 {
self.idx
... |
#[derive(Clone, Copy)]
pub struct Placeholder { |
<|file_name|>ec2_elb_lb.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# This file is part of Ansible
#
# Ansible 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 yo... |
if 'cookie' in self.stickiness and 'expiration' in self.stickiness: |
<|file_name|>wiki.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Fo... | """Return properties composed with the ones from part name in the wiki.
:param str name: The name of the part to query from the wiki
:param dict properties: The current set of properties |
<|file_name|>zip.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 Civic Knowledge. This file is licensed under the terms of the
# MIT, included in this distribution as LICENSE
""" """
from rowgenerators.appurl.file.file import FileUrl
from rowgenerators.exceptions import AppUrlError
class ZipUrlError(AppUrlErro... | return self.resource_file.replace('.zip', '')
# Want to return none, so get_files_from-zip can assume to use the first file in the archive.
return None |
<|file_name|>memory.rs<|end_file_name|><|fim▁begin|>use hal::{
device::{AllocationError, MapError, OutOfMemory},
memory::Segment,
MemoryTypeId,
};
use std::cell::UnsafeCell;
use std::convert::TryInto;
/// A memory allocation.
#[derive(Debug)]
pub struct Memory {
/// The type of memory this block was al... | |
<|file_name|>test_upgrade_data_release_update.py<|end_file_name|><|fim▁begin|>import pytest
pytestmark = [pytest.mark.setone, pytest.mark.working]
@pytest.fixture
def data_release_update_1(award, lab):
return{
"schema_version": '1',
"award": award['@id'],
"lab": lab['@id'],
"summar... | assert len(update_items) == 1
assert 'primary_id' in update_items[0] |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
(c) 2013 LinkedIn Corp. 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/LICENSE-2.0
Unl... | from .connection import ExchangeNTLMAuthConnection # noqa
from .connection import ExchangeHTTPBasicAuthConnection
# Silence notification of no default logging handler
log = logging.getLogger("pyexchange") |
<|file_name|>dom-class-debug.js<|end_file_name|><|fim▁begin|>/*
YUI 3.7.3 (build 5687)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('dom-class', function(Y) {
var addClass, hasClass, removeClass;
Y.mix(Y.DOM, {
/**
* Det... | /**
* Replace a class with another class for a given element.
|
<|file_name|>local.env.sample.js<|end_file_name|><|fim▁begin|>'use strict';
// Use local.env.js for environment variables that grunt will set when the server starts locally.
// Use for your api keys, secrets, etc. This file should not be tracked by git.
//<|fim▁hole|>
module.exports = {
DOMAIN: 'http://loc... | // You will need to set these on the server you deploy to. |
<|file_name|>commentActions.ts<|end_file_name|><|fim▁begin|>// - Import react components
import moment from 'moment/moment'
import _ from 'lodash'
import {Map} from 'immutable'
// - Import domain
import { Comment } from 'src/core/domain/comments'
import { Post } from 'src/core/domain/posts'
import { SocialError } from... | export const dbDeleteComment = (id?: string | null, postId?: string) => {
return (dispatch: any, getState: Function) => {
if (id === undefined || id === null) { |
<|file_name|>WeightInitEmbedding.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2015-2019 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is... | |
<|file_name|>0055_applicationform_requires_development.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-29 13:51
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app'... |
operations = [ |
<|file_name|>xmodule_django.py<|end_file_name|><|fim▁begin|>"""
Exposes Django utilities for consumption in the xmodule library
NOTE: This file should only be imported into 'django-safe' code, i.e. known that this code runs int the Django
runtime environment with the djangoapps in common configured to load
"""
import... | return hostname |
<|file_name|>rollbarLogger.js<|end_file_name|><|fim▁begin|>import omit from 'lodash/omit';
import get from 'lodash/get';
import isFunction from 'lodash/isFunction';
import { bunyanLevelToRollbarLevelName } from '../common/rollbar';<|fim▁hole|>
/**
* Custom rollbar stream that transports to logentries from a browser
... |
// Rollbar script exposes this global immediately, whether or not its already initialized
export const isGlobalRollbarConfigured = () => !!get(global, 'Rollbar'); |
<|file_name|>tabmanager.ts<|end_file_name|><|fim▁begin|><!DOCTYPE TS><TS>
<context>
<name>AppEdit</name>
<message>
<source>Application</source>
<translation>Aplicação</translation>
</message>
<message>
<source>Name:</source>
<translation>Nome:</translation>
</message>... | <name>Wait</name>
<message>
<source>Please Wait...</source>
<translation>Espere um Momento...</translation> |
<|file_name|>CreateHive.cpp<|end_file_name|><|fim▁begin|>#include "../ProtocolCommand.h"
//#include <sqlite3.h>
using namespace org::esb::net;
using namespace org::esb::hive;
using namespace std;
class CreateHive:public ProtocolCommand {
private:
Socket * socket;
public:
~CreateHive () {
} CreateHive (TcpS... | this->is = socket->getInputStream ();
this->os = socket->getOutputStream (); |
<|file_name|>labelmaker.py<|end_file_name|><|fim▁begin|>import argparse
import csv
import codecs
import configparser
import xml.etree.ElementTree as ET
import re
from SvgTemplate import SvgTemplate, TextFilter, ShowFilter, BarcodeFilter, StyleFilter, SvgFilter
from SvgTemplate import clean_units, units_to_pixels, stri... |
for elt in template.generate(row): |
<|file_name|>by-number.js<|end_file_name|><|fim▁begin|>import falcor from 'falcor';
import _ from 'lodash';
import * as db from 'lib/db';
import { has } from 'lib/utilities';
const $ref = falcor.Model.ref;
export default [
{
// get featured article
route: "issues['byNumber'][{integers:issueNumbers}]['featu... | });
results.push({
path: ['issues', 'latest'],
invalidated: true, |
<|file_name|>Pickable.cpp<|end_file_name|><|fim▁begin|>#include "main.hpp"
TargetSelector::TargetSelector(SelectorType type, float range)
: type(type), range(range) {
}
void TargetSelector::selectTargets(Actor *wearer, TCODList<Actor *> & list) {
switch(type) {
case CLOSEST_MONSTER :
{
Actor *closestMonster... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.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
## th... | ## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
<|file_name|>defaultClassConfigurationService.js<|end_file_name|><|fim▁begin|>/*
Nodics - Enterprice Micro-Services Management Framework
Copyright (c) 2017 Nodics All rights reserved.
This software is the confidential and proprietary information of Nodics ("Confidential Information").
You shall not di... | }
this.get({
tenant: 'default',
query: { |
<|file_name|>0058_source_public_source.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-03-05 09:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rules', '0057_auto_20180302_1312'),
]
operations =... | |
<|file_name|>address.js<|end_file_name|><|fim▁begin|>/*!
* address.js - Description
* Copyright © 2012 by Ingenesis Limited. All rights reserved.
* Licensed under the GPLv3 {@see license.txt}
*/
(function($) {
jQuery.fn.upstate = function () {
if ( typeof regions === 'undefined' ) return;
$(this).change(fun... | state.setDisabled(false).show().removeClass('_important');
|
<|file_name|>principal.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/victorgarric/Documents/INVENTAIRE/principal.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, ... | allconn=cursor.connection()
curs=allconn[0]
data=allconn[1]
curs.execute("""SELECT "storage" FROM "main"."chem" WHERE "id" > 0 """) |
<|file_name|>FetchManager.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>// found in the LICENSE file.
#include "config.h"
#include "modules/fetch/FetchManager.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings... | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be |
<|file_name|>Theme.py<|end_file_name|><|fim▁begin|>#####################################################################
# -*- coding: iso-8859-1 -*- #
# #
# Frets on Fire X (FoFiX) ... |
#Add support for lead and rhythm diff |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>module.exports = {
FIREBASE_URL: 'https://amber-heat-<your-app>.firebaseio.com/',<|fim▁hole|><|fim▁end|> | TWITTER_KEY: '',
TWITTER_SECRET: '',
TWITTER_CALLBACK: process.env.TWITTER_CALLBACK || 'Twitter Callback Url'
}; |
<|file_name|>JavassistBuildException.java<|end_file_name|><|fim▁begin|>package javassist.build;
/**
* A generic build exception when applying a transformer.
* Wraps the real cause of the (probably javassist) root exception.
* @author SNI
*/
@SuppressWarnings("serial")
public class JavassistBuildException extends E... | |
<|file_name|>demo_chan7.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"time"
)
func main() {
ch1 := make(chan int)
go func() {
for i := 0; i < 10; i++ {
ch1 <- i
time.Sleep(1 * time.Second)
}
}()
timeout := time.After(5 * time.Second)
overTag := make(chan bool)
go func() {
for {
s... | fmt.Println("Timeour.") |
<|file_name|>model.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
class DCGAN(object):
"""
Tensorflow implementation of DCGAN, with four CNN layers.
We assume the input images are... | bnorm_1 = _create_deconv_bnorm_block( |
<|file_name|>markdown.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licens... | |
<|file_name|>mapper_opendap_sentinel1.py<|end_file_name|><|fim▁begin|># Name: mapper_opendap_sentinel1.py
# Purpose: Nansat mapping for ESA Sentinel-1 data from the Norwegian ground segment
# Author: Morten W. Hansen
# Licence: This file is part of NANSAT. You can redistribute it or modify
# ... | filename: str
nn
Returns |
<|file_name|>binary_iterator.py<|end_file_name|><|fim▁begin|>class BinaryIterator(object):
def __init__(self, content):
self.body = content.raw_body
self._stop = False
@classmethod
def open_file(self, path):<|fim▁hole|> return open(path, 'rb')
def __next__(self):
if self... | |
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>import optparse
class CLI:
pass
CLI.parser = optparse.OptionParser()
CLI.parser.add_option("-q", "--queries", dest="queries", help="Queries csv file", metavar="FILE")
CLI.parser.add_option("-l", "--logs", dest="logs", help="Path to log files containing directory", m... | CLI.parser.add_option("-c", action="store_true", dest="use_combined_log_parser", help="Use combined log parser")
CLI.parser.add_option("-a", action="store_true", dest="use_alt_log_format", help="Use alternative log format")
CLI.parsedArgs = CLI.parser.parse_args() |
<|file_name|>TestsReactiveHBDAO.java<|end_file_name|><|fim▁begin|>package com.flipkart.hbaseobjectmapper.testcases;
import com.flipkart.hbaseobjectmapper.HBAdmin;
import com.flipkart.hbaseobjectmapper.Records;
import com.flipkart.hbaseobjectmapper.WrappedHBColumnTC;
import com.flipkart.hbaseobjectmapper.testcases.daos... | assertEquals(ePre, ePost, "Object got corrupted after persist and get");
} finally {
deleteTables(Employee.class);
} |
<|file_name|>thumbbar.py<|end_file_name|><|fim▁begin|>"""thumbbar.py - Thumbnail sidebar for main window."""
import urllib
import Queue
import gtk
import gobject
import threading
from mcomix.preferences import prefs
from mcomix import image_tools
from mcomix import tools
from mcomix import constants
from mcomix impor... | |
<|file_name|>yarrharr.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright © 2013, 2014, 2017, 2020 Tom Most <twm@freecog.net>
#
# 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, ei... | |
<|file_name|>LAFSelector.java<|end_file_name|><|fim▁begin|>/* This file is part of LiveCG.
*
* Copyright (C) 2013 Sebastian Kuerten
*
* 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, eithe... | |
<|file_name|>corebottom.js<|end_file_name|><|fim▁begin|><|fim▁hole|>})();
Clazz._coreLoaded = true;<|fim▁end|> | |
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|>"""pdbquery RAPD plugin"""
"""
This file is part of RAPD
c
Copyright (C) 2017, Cornell University
All rights reserved.
RAPD is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free S... | # Run through the pdbs
for pdb_code in self.cell_output.keys(): |
<|file_name|>state_defs.py<|end_file_name|><|fim▁begin|># Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
import apiutil
apiutil.CopyrightDef()
print """DESCRIPTION ""
EXPORTS
"""
keys = apiutil.GetDispatchedFu... | crStateLimitsInit
crStateMergeExtensions |
<|file_name|>plot_example.py<|end_file_name|><|fim▁begin|># coding: utf-8
from pathlib import Path
import pandas as pd
import lightgbm as lgb
if lgb.compat.MATPLOTLIB_INSTALLED:
import matplotlib.pyplot as plt
else:
raise ImportError('You need to install matplotlib and restart your session for plot_example.p... | plt.show() |
<|file_name|>test_check_topic_list_on_zk_restart.py<|end_file_name|><|fim▁begin|>import logging
import pytest
import sdk_cmd
import sdk_install
import sdk_plan
import sdk_security
import sdk_utils
from tests import config
from tests import test_utils
LOG = logging.getLogger(__name__)
@pytest.fixture(scope="module... | )
|
<|file_name|>test_recognize_linked_entities_async.py<|end_file_name|><|fim▁begin|># ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import pytest
import platform
import functools
from azure.core.exceptions im... | |
<|file_name|>auth-check.js<|end_file_name|><|fim▁begin|>const jwt = require('jsonwebtoken');
const User = require('../models/User');<|fim▁hole|>/**
* The Auth Checker middleware function.
*/
module.exports = (req, res, next) => {
if (!req.headers.authorization) {
return res.status(401).end();
}
// get the... | // import { port, auth } from '../../config';
|
<|file_name|>routing.rs<|end_file_name|><|fim▁begin|>// Evelyn: Your personal assistant, project manager and calendar
// Copyright (C) 2017 Gregory Jensen
//
// 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 Softwa... | None => {
let model: model::ErrorModel = From::from(error_messages::EvelynServiceError::ReqestForActionWhichEvelynDoesNotKnowHowToDo(error_messages::EvelynBaseError::NothingElse));
Some(RouterOutput { |
<|file_name|>passwords_test.py<|end_file_name|><|fim▁begin|>#
# Copyright 2015-2020 Red Hat, Inc.
#
# 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 2 of the License, or
# (at your... | } |
<|file_name|>issue-215.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import {createTestingConnections, closeTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
import {Connection} from "../../../src/connection/Connection";
import {Post} from "./entity/Post";
import {Author} from "./entity/Author";
... | import "reflect-metadata"; |
<|file_name|>base64.js<|end_file_name|><|fim▁begin|>(function(Juvia){
Base64 = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
encode: function(input) {
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
while (i < in... | })(Juvia); |
<|file_name|>kegg_taxonomy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
__author__ = "Jesse Zaneveld"
__copyright__ = "Copyright 2007-2012, The Cogent Project"
__credits__ = ["Jesse Zaneveld", "Rob Knight"]
__license__ = "GPL"
__version__ = "1.5.3"
__maintainer__ = "Jesse Zaneveld"
__email__ = "zaneveld@gmail.... | common_name = ''
output_taxon = taxonomy_stack + \
['']*(max_taxonomy_length-len(taxonomy_stack)) \
+ fields + [genus_name, species_name, common_name] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.