prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>overridden.py<|end_file_name|><|fim▁begin|>class A:<|fim▁hole|> def fooBar(self): pass<|fim▁end|> | def <weak_warning descr="Function name should be lowercase">fooBar</weak_warning>(self): pass
class B(A): |
<|file_name|>Hook.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Jonathan Vasquez <jon@xyinn.org>
#
# 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... |
@classmethod
def PrintFiles(cls):
"""Prints the required files in this hook.""" |
<|file_name|>StorageUnitBlock.java<|end_file_name|><|fim▁begin|>/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2020 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the ... |
public final TRContent.StorageUnit unitType;
public StorageUnitBlock(TRContent.StorageUnit unitType) { |
<|file_name|>generate-data-key.rs<|end_file_name|><|fim▁begin|>/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
use aws_config::meta::region::RegionProviderChain;
use aws_sdk_kms::model::DataKeySpec;
use aws_sdk_kms::{Client, Error, Region, PKG_VERSIO... | #[structopt(short, long)]
verbose: bool, |
<|file_name|>agilentMSOX92804A.py<|end_file_name|><|fim▁begin|>"""
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2017 Alex Forencich
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... |
from .agilent90000 import * |
<|file_name|>s3profile.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" S3 Profile
@copyright: 2009-2013 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "S... | width = widget.get("width", 568) # span6 * 99.7%
bbox = widget.get("bbox", {}) |
<|file_name|>test_login.py<|end_file_name|><|fim▁begin|># coding: utf-8
from app.api_client.error import HTTPError
from app.helpers.login_helpers import generate_buyer_creation_token
from dmapiclient.audit import AuditTypes
from dmutils.email import generate_token, EmailError
from dmutils.forms import FakeCsrf
from ..... | assert res.status_code == 302, address
def test_invalid_email_formats(self):
cases = [ |
<|file_name|>0003_auto_20151107_1415.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
<|fim▁hole|> operations = [
migrations.AlterField(
model_name='goodreadsdata',
... | dependencies = [
('caudexer', '0002_auto_20151107_1409'),
]
|
<|file_name|>loaderpickle.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
from pathlib import Path
import pickle
from .loaderbase import LoaderBase
from .model import ReferenceManual
class LoaderPickle(LoaderBase):
def __init__(self, in_file: Path) -> None:
super().__init__()
self.in_file = in_file
... | # SPDX-License-Identifer: Apache-2.0
# Copyright 2021 The Meson development team |
<|file_name|>usbscapy.py<|end_file_name|><|fim▁begin|>"""
vUSBf: A KVM/QEMU based USB-fuzzing framework.
Copyright (C) 2015 Sergej Schumilo, OpenSource Security Ralf Spenneberg
This file is part of vUSBf.
See the file LICENSE for copying permission.
"""
__author__ = 'Sergej Schumilo'
from scapy.all i... |
# Redir Packet No. 1 (redir connect)
class connect_redir_header(Packet): |
<|file_name|>liveness-dead.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/l... | // option. This file may not be copied, modified, or distributed
// except according to those terms. |
<|file_name|>player.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restr... | |
<|file_name|>parameter_grouping_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license informati... | |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
import json
im... | "speech": output,
"data": playerName,
"contextOut": [{"name":"context-player", "lifespan":1, "parameters":{"player-id": playerId}},{"name":"context-player", "lifespan":1, "parameters":{"player-name": playerName}}], |
<|file_name|>XpTag.java<|end_file_name|><|fim▁begin|>package org.anodyneos.xp.tagext;
import javax.servlet.jsp.el.ELException;
import org.anodyneos.xp.XpContext;
import org.anodyneos.xp.XpException;
import org.anodyneos.xp.XpOutput;
import org.xml.sax.SAXException;
/**<|fim▁hole|>
void doTag(XpOutput out) throws... | * @author jvas
*/
public interface XpTag { |
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from member.models import Person, Family, Handphone, KeluargaGangguan, JenisDifable, StatusRumah
from member.models import Lantai, Dinding, Atap, JamsosDiterima, SumberAirMinum, StatusListrik
from member.models import DayaListrik, JadwalRonda, ProgramKB, Agama, S... | fields = '__all__' |
<|file_name|>SqlToRowExpressionTranslator.java<|end_file_name|><|fim▁begin|>/*
* 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
*
* Unle... | |
<|file_name|>apply.js<|end_file_name|><|fim▁begin|><|fim▁hole|>Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (fn /*, ...args*/) {
var args = (0, _slice2.default)(arguments, 1);
return function () /*callArgs*/{
var callArgs = (0, _slice2.default)(ar... | 'use strict';
|
<|file_name|>panel.py<|end_file_name|><|fim▁begin|>from django.utils.translation import ugettext_lazy as _
import horizon
from openstack_dashboard.dashboards.admin import dashboard
from openstack_dashboard.openstack.common.log import policy_is
class CheckHost(horizon.Panel):
name = _("Instance")
slug = 'check... | img = '/static/dashboard/img/nav/checkhost1.png' |
<|file_name|>log_test.go<|end_file_name|><|fim▁begin|>// Copyright 2014 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package v5_test
import (
"bytes"
"encoding/json"
"net/http"
"time"
jc "github.com/juju/testing/checkers"
"github.com/juju/testing/httptesting"
gc "gopkg.in/check.v... | c.Check(string(docs[1].Data), gc.Equals, string(warningData))
c.Check(docs[1].Level, gc.Equals, mongodoc.WarningLevel)
} |
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import os
from functools import lru_cache, wraps
from itertools import chain
import uglipyjs
from flask import current_app, request
def read_param(request, param, default=None, type=str):
try:
value = request.args.get(param, request.form.get(param, defaul... | |
<|file_name|>completions_dev.py<|end_file_name|><|fim▁begin|>import sys
import sublime_plugin
if sys.version_info < (3,):
<|fim▁hole|> from .sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
COMPLETIONS_SYNTAX_DEF = ("Packages/%s/Syntax Definitions/Sublime Comple... | from sublime_lib.path import root_at_packages, get_package_name
else:
|
<|file_name|>RDDSampleUtilsTest.java<|end_file_name|><|fim▁begin|>/*
* FILE: RDDSampleUtilsTest
* Copyright (c) 2015 - 2018 GeoSpark Development Team
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwa... | |
<|file_name|>test_writer.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
import nsq
import unittest
class WriterUnitTest(unittest.TestCase):
def setUp(self):
super(WriterUnitTest, self).setUp()
def test_constructor(self):
name = 'test'
reconnect_interval = 10.... | nsqd_tcp_addresses=['127.0.0.1:4150'], |
<|file_name|>primitiveMeshGeometry.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held b... | return mesh_;
} |
<|file_name|>urlProviderFactory.js<|end_file_name|><|fim▁begin|><|fim▁hole|>'use strict';
const fetchUrl = require('./fetchUrl');
/**
* @param {Function} fetch - fetch API compatible function
* @param {string} source
* @param {Object} [fetchOptions={}]
* @returns {Promise.<DefinitionProvider>}
*/
function urlPr... | |
<|file_name|>ceph.py<|end_file_name|><|fim▁begin|># 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 required by applicable law or agre... | journal block align = false
|
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import os
import boto3
from chalice import Chalice
from chalicelib import db
from chalicelib import rekognition
app = Chalice(app_name='media-query')
_MEDIA_DB = None
_REKOGNITION_CLIENT = None
_SUPPORTED_IMAGE_EXTENSIONS = (
'.jpg',
'.png',
)
def get_media_... |
def _is_image(key): |
<|file_name|>login.js<|end_file_name|><|fim▁begin|>define([
'jquery',
'underscore',
'backbone',
'text!template/login.html',<|fim▁hole|> var LoginView = Backbone.View.extend({
tagName: 'section',
className: 'container',
template: _.template(LoginTemplate),
events: {
... | 'models/campus'
], function ($, _, Backbone, LoginTemplate, CampusModel) { |
<|file_name|>get_markets_region_id_orders_unprocessable_entity.go<|end_file_name|><|fim▁begin|>/*
* EVE Swagger Interface
*
* An OpenAPI for EVE Online
*
* OpenAPI spec version: 0.5.5
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "L... | */ |
<|file_name|>images.go<|end_file_name|><|fim▁begin|>package handlers
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"strings"
"github.com/docker/distribution"
ctxu "github.com/docker/distribution/context"
"github.com/docker/distribution/digest"
"github.com/docker/distribution/manifest/schema1"
"github.co... | } |
<|file_name|>porousBafflePressureFvPatchField.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
... | :
fixedJumpFvPatchField<scalar>(p, iF),
phiName_("phi"),
rhoName_("rho"), |
<|file_name|>VisualizarTransportadoraView.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, ... | |
<|file_name|>fsck.go<|end_file_name|><|fim▁begin|>package action
import (
"os"
"path/filepath"
"github.com/gopasspw/gopass/internal/tree"
"github.com/gopasspw/gopass/internal/config"
"github.com/gopasspw/gopass/internal/out"
"github.com/gopasspw/gopass/internal/store/leaf"
"github.com/gopasspw/gopass/pkg/ctxu... | if err := os.Remove(oldCfg); err != nil {
out.Errorf(ctx, "Failed to remove old gopass config %s: %s", oldCfg, err) |
<|file_name|>astypes.py<|end_file_name|><|fim▁begin|>import os
import calendar
import datetime<|fim▁hole|>from helpers import OrderedAttrDict, utc
"""
The AS types and their FLV representations.
"""
log = logging.getLogger('flvlib.astypes')
class MalformedFLV(Exception):
pass
# Number
def get_number(f, max_o... | import logging
from primitives import *
from constants import * |
<|file_name|>allegroglyphkeeperfont.hpp<|end_file_name|><|fim▁begin|>/* _______ __ __ __ ______ __ __ _______ __ __
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
* / / /__ / / // / // / // / / ... | #define GCN_CONTRIB_ALLEGROTRUETYPEFONT_HPP
#include "guichan/font.hpp"
|
<|file_name|>async-iterator-iteration.js<|end_file_name|><|fim▁begin|>'use strict';
// https://github.com/tc39/proposal-iterator-helpers
var aCallable = require('../internals/a-callable');
var anObject = require('../internals/an-object');
var getBuiltIn = require('../internals/get-built-in');
var getMethod = require('.... | |
<|file_name|>issue-5062.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file ma... | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
<|file_name|>stl_slicing_parser.py<|end_file_name|><|fim▁begin|>import subprocess
import logging
import os, sys, traceback
import urllib
from fluxclient import check_platform
from .misc import BinaryUploadHelper, BinaryHelperMixin, OnTextMessageMixin
logger = logging.getLogger("API.SLICING")
StlSlicer = None
StlSlice... | if StlSlicer is None:
from fluxclient.printer.stl_slicer import (
StlSlicer as _StlSlicer,
StlSlicerCura as _StlSlicerCura) |
<|file_name|>sauce-labs.js<|end_file_name|><|fim▁begin|>'use strict';
var digdugAdapter = require('../digdug.js');<|fim▁hole|>
module.exports = function(options) {
return digdugAdapter('SauceLabs', DigdugSauceLabsTunnel, options);
};<|fim▁end|> | var DigdugSauceLabsTunnel = require('digdug/SauceLabsTunnel'); |
<|file_name|>CloudServicesUtil.java<|end_file_name|><|fim▁begin|>package org.wso2.carbon.stratos.common.util;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.stratos.common.config.CloudServiceConfig;
import org.ws... | |
<|file_name|>ramsAndSheeps.js<|end_file_name|><|fim▁begin|>$(document).ready(function () {
$('#userData').hide();
$('#topScores').show();
// enchanced method addEventListener
function addEventListener(selector, eventType, listener) {
$(selector).on(eventType, listener);
}
function tr... | if (isNaN(number) || (number < 1000 || number > 10000)) {
throw new Error("This is not a 4 digit number!");
} |
<|file_name|>X86ELFObjectWriter.cpp<|end_file_name|><|fim▁begin|>//===-- X86ELFObjectWriter.cpp - X86 ELF Writer ---------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details... | }
}
} else |
<|file_name|>dircolors.rs<|end_file_name|><|fim▁begin|>// This file is part of the uutils coreutils package.
//
// (c) Jian Zeng <anonymousknight96@gmail.com>
// (c) Mitchell Mebane <mitchell.mebane@gmail.com>
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed wit... | use std::fs::File; |
<|file_name|>convmixer.py<|end_file_name|><|fim▁begin|>import torch.nn as nn
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
from timm.models.registry import register_model
from .helpers import build_model_with_cfg
def _cfg(url='', **kwargs):
return {
'url': url,
'num_classes': 1... | |
<|file_name|>mkl_concat_op.cc<|end_file_name|><|fim▁begin|>/* Copyright 2015 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.apache.org/l... | |
<|file_name|>signal-factory.ts<|end_file_name|><|fim▁begin|>// Copyright (c) 2015-2018 Robert Rypuła - https://audio-network.rypula.pl
import { staticImplements } from 'rr-tsdi';
import { LIST_FACTORY } from './../../common';
import { COMPLEX_FACTORY } from './../complex/di-token';
import { GenericException, IList, ... | }
}
const RAW_IQ_ARRAY_LENGTH_NEEDS_TO_BE_EVEN = 'Raw IQ array length needs to be even'; |
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from django.apps import AppConfig
class CalendarFeedConfig(AppConfig):<|fim▁hole|><|fim▁end|> | name = 'info_display.screens.event_schedule'
verbose_name = 'Event Schedule' |
<|file_name|>DeviceControlActivity.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2013 The Android Open Source Project
*
* 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
*
* ht... | intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED); |
<|file_name|>module_common.py<|end_file_name|><|fim▁begin|># (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com>
#
# 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 Lic... | pass |
<|file_name|>build_android.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# build_native.py
# Build native codes
import sys
import os, os.path
import shutil
from optparse import OptionParser
import cocos
from MultiLanguage import MultiLanguage
import cocos_project
import json
import re
from xml.dom import minidom
... |
special_platforms_info = {
"android-4.2" : "android-17"
} |
<|file_name|>plugin_params_tests.py<|end_file_name|><|fim▁begin|>from tests.testing_framework.base_test_cases import BaseTestCase
from flexmock import flexmock
from hamcrest import *
from framework.plugin.plugin_params import PluginParams
import re
from hamcrest.library.text.stringmatches import matches_regexp
class ... | result = self.plugin_params.GetArgList(arg_list, plugin)
|
<|file_name|>base_types.py<|end_file_name|><|fim▁begin|>"""
Contains base data structures for defining graph constrained group testing problem,
and interfaces to operate on them.
Basic structure to exchange graph constrained group testing problem definition is :class:`Problem`.
It consists of enumeration of faulty ele... | self.variable_dict = {}
|
<|file_name|>framemanager.cpp<|end_file_name|><|fim▁begin|>///////////////////////////////////////////////////////////////////////////////
// Name: src/aui/framemanager.cpp
// Purpose: wxaui: wx advanced user interface - docking window manager
// Author: Benjamin I. Williams
// Modified by:
// Created: ... | |
<|file_name|>BenchmarkTest18518.java<|end_file_name|><|fim▁begin|>/**
* OWASP Benchmark Project v1.1
*
* This file is part of the Open Web Application Security Project (OWASP)
* Benchmark Project. For details, please see
* <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>... | * @created 2015
*/
package org.owasp.benchmark.testcode; |
<|file_name|>test_events.py<|end_file_name|><|fim▁begin|>"""This module tests events that are invoked by Cloud/Infra VMs."""
import fauxfactory
import pytest
from cfme import test_requirements
from cfme.cloud.provider import CloudProvider
from cfme.cloud.provider.gce import GCEProvider
from cfme.control.explorer.polic... | @pytest.fixture(scope="function") |
<|file_name|>storage.go<|end_file_name|><|fim▁begin|>// Copyright © 2014 Terry Mao, LiuDing All rights reserved.
// This file is part of gopush-cluster.
<|fim▁hole|>// gopush-cluster is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Fr... | |
<|file_name|>solve_rk12.go<|end_file_name|><|fim▁begin|>// This file is part of MuMax, a high-performance micromagnetic simulator.
// Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele.
// Use of this source code is governed by the GNU General Public License version 3
// (as published by the Free Software Foun... | gpu.Madd(y.Array(), y.Array(), dy.Array(), dt*dyMul[0])
y.Invalidate()
} |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>//Express, Mongo & Environment specific imports
var express = require('express');
var morgan = require('morgan');
var serveStatic = require('serve-static');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var compression = require('c... | // Route definitions
app.get('/api/books', BookController.list);
app.get('/api/books/:id', BookController.show);
app.post('api/books', BookController.create); |
<|file_name|>OctoObject.java<|end_file_name|><|fim▁begin|>package com.dreamteam.octodrive.model;
import com.parse.ParseObject;
public abstract class OctoObject {
protected String _objectId;
protected ParseObject _parseObject;
public ParseObject parseObject() {
return _parseObject;
}
pu... | return _objectId;
}
} |
<|file_name|>SchemaParsingException.java<|end_file_name|><|fim▁begin|>package org.cagrid.gme.common.exceptions;
import java.io.IOException;
@SuppressWarnings("serial")
public class SchemaParsingException extends IOException {
public SchemaParsingException() {
super();
}
public SchemaParsingExc... | } |
<|file_name|>AdrenalineDart.java<|end_file_name|><|fim▁begin|>/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2019 Evan Debenham<|fim▁hole|> *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Pu... | |
<|file_name|>interface.py<|end_file_name|><|fim▁begin|>import magic
from pytag.structures import PytagDict
from pytag.constants import FIELD_NAMES
from pytag.formats import OggVorbisReader, OggVorbis, Mp3Reader, Mp3
MIMETYPE = {'application/ogg': (OggVorbisReader, OggVorbis),
'audio/mpeg': (Mp3Reader, Mp... | |
<|file_name|>CourseInteractor.ts<|end_file_name|><|fim▁begin|>/* tslint:disable:max-classes-per-file */
import { forEach } from 'ramda';
import Interactor from '../CourseInteractor';
import InteractorLoader from '../CourseInteractorLoader';
import { ICourseStorage } from '../ICourseStorage';
import { IProgressStorage }... | let interactorLoader: InteractorLoader;
let interactor: Interactor; |
<|file_name|>candidates.hh<|end_file_name|><|fim▁begin|>// Copyright (C) 2003 salvatore orlando <salvatore.orlando@unive.it>
// University of Venice, Ca' Foscari, Dipartimento di Informatica, (VE) Italy
// Istituto di Scienza e Tecnologia dell'Informazione, ISTI - CNR, (PI) Italy
//
// This program is free software; ... |
for (int j=from; j<=to; j++) {
item = this->suffixes[j];
if (t.direct_access[item] != 0) { |
<|file_name|>symmetric.rs<|end_file_name|><|fim▁begin|>use lapack::c::{ssysv, dsysv, chesv, zhesv};
use super::types::SolveError;
use impl_prelude::*;
/// Implements `compute_*` methods to solve systems of linear
/// equations A*X = B, where A is symmetric (for real-valued matrices)
/// or hermitian (for complex-value... | let info = { |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import time
from matrix_client.client import MatrixClient
from matrix_client.api import MatrixRequestError
from requests.exceptions import ConnectionError, Timeout
import argparse
import random
from configparser import ConfigParser
import re
impor... | try:
bot = Bot(config, backend)
bot.login() |
<|file_name|>create_page.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
from django.core.management.base import BaseCommand, CommandError
from alapage.models import Page
class Command(BaseCommand):
help = 'Creates a page'
def add_arguments(self, parser):
parser.add_argument('nam... | #~ create page
if not exists:
Page.objects.create(url=url, title=name)
print("Page "+name+" created") |
<|file_name|>arc.rs<|end_file_name|><|fim▁begin|>//! This test is a more subtle one. It is one which can hit thread destructors
//! unexpectedly.
extern crate ralloc;
#[global_allocator]
static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
use std::sync::Arc;
use std::thread;
#[test]
fn test_arc() {
let num... |
thread::spawn(move || { |
<|file_name|>gluesemantics_malt_fixt.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import
def setup_module(module):<|fim▁hole|> from nltk.parse.malt import MaltParser
try:
depparser = MaltParser('maltparser-1.7.2')
except LookupError:
raise SkipTest... | from nose import SkipTest |
<|file_name|>user_utils.py<|end_file_name|><|fim▁begin|># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|>#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BA... | # 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 |
<|file_name|>FutureDone.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2013 Thomas Bocek
*
* 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.... | */ |
<|file_name|>test_mlt.py<|end_file_name|><|fim▁begin|>from nose.tools import eq_
from elasticutils import MLT
from elasticutils.tests import ESTestCase
class MoreLikeThisTest(ESTestCase):
data = [
{'id': 1, 'foo': 'bar', 'tag': 'awesome'},
{'id': 2, 'foo': 'bar', 'tag': 'boring'},
{'id': ... | |
<|file_name|>it.js<|end_file_name|><|fim▁begin|>FullCalendar.globalLocales.push(function () {
'use strict';
var it = {
code: 'it',<|fim▁hole|> },
buttonText: {
prev: 'Prec',
next: 'Succ',
today: 'Oggi',
month: 'Mese',
week: 'Settimana',
day: 'Giorno',
list: 'Age... | week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year. |
<|file_name|>feed_parse_extractSecretchateauWordpressCom.py<|end_file_name|><|fim▁begin|>def extractSecretchateauWordpressCom(item):<|fim▁hole|> vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
titlemap = [
('GRMHCD '... | '''
Parser for 'secretchateau.wordpress.com'
'''
|
<|file_name|>Module.ts<|end_file_name|><|fim▁begin|>export const ModuleMidd = {<|fim▁hole|>};<|fim▁end|> | parseMaskContent (mix: string | any, path: string): PromiseLike<{ [key: string]: any }> {
throw new Error('Not set');
} |
<|file_name|>facade.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from gaegraph.business_base import NodeSearch, DeleteNode
from classificacaodtm_app.commands import ListClassificacaodtmCommand, SaveClassificacaodtmCommand, UpdateClassificacaodtmCommand... | :param classificacaodtm_id: classificacaodtm's id
:return: Command |
<|file_name|>environment.js<|end_file_name|><|fim▁begin|>/* jshint node: true */
<|fim▁hole|> modulePrefix: 'addressbook-app',
environment: environment,
baseURL: '/',
locationType: 'auto',
emberPouch: {
localDb: 'dentone-addressbook',
remoteDb: 'https://wasilleptichandfurningio:6c01f93f26... | module.exports = function(environment) {
var ENV = { |
<|file_name|>unit_tests.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Daniel Garcia
#
# See the file LICENSE.txt for copying permission.
import unittest
import random
from gameboard.gameboard import Gameboard, Direction
from gameboard.coordinate import Coordinate
class TestBoard(unittest.TestCase):
def se... | |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import "fmt"
<|fim▁hole|> x, y := 10, 4
fmt.Println("Original x, y: ", x, y)
swap(&x, &y)
fmt.Println("After swap x, y: ", x, y)
}
func swap(x, y *int) {
temp := *x
*x = *y
*y = temp
}<|fim▁end|> | func main() { |
<|file_name|>driver.cpp<|end_file_name|><|fim▁begin|>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "Linked_List.h"
#include "List.h"
#include "Lhash.h"
#include "crs.h"
#include "winslow.h"
#include "linear_elastic.h"
#include "trimesh.h"
#include "Point.h"
#include "Vector.h"
#i... | exit(0);
}
|
<|file_name|>s0132.go<|end_file_name|><|fim▁begin|>/*
A number consisting entirely of ones is called a repunit. We shall define R(k)
to be a repunit of length k.
For example, R(10) = 1111111111 = 11×41×271×9091, and the sum of these prime
factors is 9414.
Find the sum of the first forty prime factors of R(10^9).
*/... | |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | ),
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string, |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2011 Piston Cloud Computing, Inc
# C... | """ |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[cfg(feature = "hyper")]
pub mod adapter;
use crate::message::Result;
pub trait Builder<R> {
fn header(&mut self, key: &str, value: http::header::HeaderValue);
fn body(&mut self, bytes: Vec<u8>) -> Result<R>;
fn finish(&mut self) -> Result<R>;<|fim▁hole|><... | } |
<|file_name|>child-outlives-parent.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apac... | fn child2(_s: String) { } |
<|file_name|>test_external_process.py<|end_file_name|><|fim▁begin|># Copyright 2012 New Dream Network, LLC (DreamHost)
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# htt... | def test_active(self): |
<|file_name|>datasource-get-debug.js<|end_file_name|><|fim▁begin|>/*
YUI 3.13.0 (build 508226d)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('datasource-get', function (Y, NAME) {
/**
* Provides a DataSource implementation which c... | * @static
* @final
|
<|file_name|>manual_admin_registration.py<|end_file_name|><|fim▁begin|>'''
This file contains the manually chosen admin forms, as needed for an easy-to-use
editor.
'''
from django.contrib import admin
from django.conf import settings
from metashare.repository.editor import admin_site as editor_site
from metashare.repo... | admin.site.register(modelclass, adminclass)
# And finally, make sure that our editor has the exact same model/admin pairs registered: |
<|file_name|>worklog.js<|end_file_name|><|fim▁begin|><|fim▁hole|> startedAt: {
type: Date,
required: true,
default: Date.now
},
timeSpent: {
type: Number,
required: true,
validate: [ function (value) {
return value > 0;
}, 'Time spent must be greater than zero.' ]
},
task: {
... | var mongoose = require('mongoose');
var workLogSchema = mongoose.Schema({ |
<|file_name|>newsworthy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at http... | password = request.authorization.get("password")
lookup = {'feeding_service': NewsworthyFeedingService.NAME}
# if at least one provider match this request, we return True |
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
ctags: {
files: ['ctags'],
tasks: ['shell:ctags'],
options: {
... | },
options:{
stdout:true
} |
<|file_name|>entry.rs<|end_file_name|><|fim▁begin|>// run-rustfix
#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)]
#![warn(clippy::map_entry)]
#![feature(asm)]
use std::collections::HashMap;
use std::hash::Hash;
macro_rules! m {
($e:expr) => {{ $e }};
}
macro_rules! insert {
($map:e... | |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># Generated by Django 3.0.7 on 2020-09-27 13:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('edegal', '0025_photographer_flickr_handle'),
... | operations = [ |
<|file_name|>player.py<|end_file_name|><|fim▁begin|>from data import formats
class Player():
def __init__(self, name, position, team, champion=''):
self.name = name
self.position = position<|fim▁hole|> self.team = team
self.champion = champion
def __str__(self):
return ... | |
<|file_name|>resp.go<|end_file_name|><|fim▁begin|>// Copyright 2016 DeepFabric, 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
/... | package redis
|
<|file_name|>recipes.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) SAS Institute 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
#
... | |
<|file_name|>gecko.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/. */
//! Specified types for legacy Gecko-only properties.
use cra... | |
<|file_name|>plot_from_pp_geop_height_by_day_dkbhu.py<|end_file_name|><|fim▁begin|>"""
Load pp, plot and save
8km difference
"""
import os, sys
#%matplotlib inline
#%pylab inline
import matplotlib
matplotlib.use('Agg')
# Must be before importing matplotlib.pyplot or pylab!
from matplotlib import rc
from matplot... | #p_cube_difference = iris.analysis.maths.subtract(pcube, cube_diff, dim='hour')
#height_cube_difference = iris.analysis.maths.subtract(height_cube, height_cube_diff, dim='hour')
#pdb.set_trace() |
<|file_name|>user.py<|end_file_name|><|fim▁begin|>import bcrypt
from hashlib import sha512
from helptux import db, login_manager
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
role = db.Column(db.String(255), index=True, unique=True)
def __repr__(self):
... | primaryjoin=(users_roles.c.user_id == id), |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.