prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>pam40.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 M. Rizky Luthfianto.
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
// This file may not be copied, modified, or distributed
// except according to those terms.
lazy_static! {
// taken from https://github.com/seqan/seqan/b... | -7, -2, -7, -8, -5, -14, -3, -12, -8, -15,
-3, 6, -12, 7, 3, -13, -3, -3, -6, -9, -4, -11, -9, 2, -5, -7, -2, |
<|file_name|>borrowck-reborrow-from-mut.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... | bar2: Bar
}
|
<|file_name|>agilentDSA91204A.py<|end_file_name|><|fim▁begin|>"""
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2014 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 ... | "Agilent Infiniium DSA91204A IVI oscilloscope driver"
def __init__(self, *args, **kwargs): |
<|file_name|>validate_unused_variables_test.rs<|end_file_name|><|fim▁begin|>// @generated SignedSource<<4eaf04058b087306afb51fea4898e193>>
mod validate_unused_variables;
use validate_unused_variables::transform_fixture;
use fixture_tests::test_fixture;
#[test]
fn fragment_with_root_arguments() {
let input = incl... | let expected = include_str!("validate_unused_variables/fixtures/query-with-unused-variable.invalid.expected");
test_fixture(transform_fixture, "query-with-unused-variable.invalid.graphql", "validate_unused_variables/fixtures/query-with-unused-variable.invalid.expected", input, expected);
} |
<|file_name|>CarbonDictionarySortIndexWriterImplTest.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF lice... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distrib... | // 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 |
<|file_name|>instance_actions.py<|end_file_name|><|fim▁begin|># Copyright 2013 Rackspace Hosting
# 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
#
# ht... | class InstanceActions(extensions.V21APIExtensionBase): |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from flask_wtf import Form
from flask_babel import gettext
from wtforms import StringField, validators
class ApplicationForm(Form):
name = StringField(gettext('Application name'), [
validators.DataRequired(message=gettext("Application name field is empty.... | validators.DataRequired(message=gettext("Client description field is empty.")), |
<|file_name|>isv_512g_u100.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import spear
# 1/ The tool
tool = spear.tools.ISVTool
# 2/ GMM Training
n_gaussians = 512
iterk = 25
iterg_train = 25
end_acc = 0.0001
var_thd = 0.0001
update_weights = True
update_means = True
update_variances = True
norm_KMeans = True... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
##
## Author: Adriano Monteiro Marques <adriano@umitproject.org>
##
## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA
##
## This program is free software: you can redistribute it and/or modify
## ... | ## You should have received a copy of the GNU Affero General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>. |
<|file_name|>audio.cpp<|end_file_name|><|fim▁begin|>/*
* This file is part of EasyRPG Player.
*
* EasyRPG Player 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 ... | * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# compute/__init__.py
"""
See |compute.subsystem|, |compute.network|, |compute.distance|, and
|compute.parallel| for documentation.
Attributes:
all_complexes: Alias for :func:`pyphi.compute.network.all_complexes`.... | from .subsystem import (
ConceptStyleSystem, |
<|file_name|>XFileSharingPro.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
###############################################################################
# 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 Fre... | __type__ = "hoster" |
<|file_name|>semver.go<|end_file_name|><|fim▁begin|>package semver
import (
"fmt"
"strings"
"github.com/blang/semver"
"github.com/pivotal-cf/go-pivnet/v7/logger"
)
type SemverConverter struct {
logger logger.Logger
}
func NewSemverConverter(logger logger.Logger) *SemverConverter {
return &SemverConverter{logg... | )) |
<|file_name|>expandable.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react';
import * as styles from './expandable.scss';
interface Props {
content: string;
maxLength: number;
}
interface State {
expanded: boolean;
}
export default class Expandable extends React.Component<Props, State> {
... | const { expanded } = this.state; |
<|file_name|>configs-attributes_on_same_line_as_variant-true.rs<|end_file_name|><|fim▁begin|>// rustfmt-attributes_on_same_line_as_variant: true
// Option to place attributes on the same line as variants where possible
enum Lorem {
#[ serde(skip_serializing) ]
Ipsum,<|fim▁hole|> #[ serde(skip_serializing) ]... | |
<|file_name|>test_cluster_gpsegstart.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os, sys
import unittest
from gppylib import gplog
from gpsegstart import GpSegStart
from mock import patch
logger = gplog.get_unittest_logger()
class GpSegStartTestCase(unittest.TestCase):
@patch('gpsegstart.GpSegS... | gpseg = GpSegStart([db], None, 'col1:col2:col3', 'quiescent', None, None, None, None, None, None, None)
result = gpseg.checkPostmasters(False) |
<|file_name|>primer12_7.cpp<|end_file_name|><|fim▁begin|>#include <vector>
#include <memory>
#include <iostream>
using namespace std;
shared_ptr<vector<int>> make() {
return make_shared<vector<int>>();
}
<|fim▁hole|> int x;
while (cin >> x) {
p->push_back(x);
}
return p;
}
void print(shared_ptr<vector<int>> ... | shared_ptr<vector<int>> read(shared_ptr<vector<int>> p) {
cout << "Enter values: " << endl; |
<|file_name|>table_wrapper.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/. */
//! CSS tables.
//!
//! This follows the "More Precise ... | SelectedAutoLayoutCandidateGuess::InterpolateBetweenMinimumGuessAndMinimumPercentageGuess(weight)
} else if assignable_inline_size < guess.minimum_specified_guess {
let weight = weight(guess.minimum_percentage_guess,
assignable_inline_size, |
<|file_name|>CWE762_Mismatched_Memory_Management_Routines__new_free_struct_54b.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>Template File: sources-sinks-54b.tmpl.cpp
*/
/*
* @description
* CWE: 762 Mismatched Memory Management Routines
* BadSource: Allocate data using new
* GoodSource: Allocate data using ma... | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE762_Mismatched_Memory_Management_Routines__new_free_struct_54b.cpp
Label Definition File: CWE762_Mismatched_Memory_Management_Routines__new_free.label.xml
|
<|file_name|>io.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 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... | pub struct DecodeError {
path: Vec<PathItem>,
#[source] |
<|file_name|>1.run_find_repos.py<|end_file_name|><|fim▁begin|>from glob import glob
import numpy
import pickle
import os
# Run iterations of "count" to count the number of terms in each folder of zipped up pubmed articles
home = os.environ["HOME"]
scripts = "%s/SCRIPT/repofish/analysis/methods" %(home)
base = "%s/dat... | filey.writelines("#SBATCH --job-name=%s\n" %i)
filey.writelines("#SBATCH --output=.out/%s.out\n" %i)
filey.writelines("#SBATCH --error=.out/%s.err\n" %i) |
<|file_name|>login.controller.js<|end_file_name|><|fim▁begin|><|fim▁hole|> .controller('LoginController', function ($rootScope, $scope, $state, $timeout, Auth) {
$scope.user = {};
$scope.errors = {};
$scope.rememberMe = true;
$timeout(function (){angular.element('[ng-model="username"... | 'use strict';
angular.module('moviefanApp') |
<|file_name|>connector.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
try:
import sqlite3
except ImportError:
pass
import logging
from lib.core.convert import utf8encode
from lib.c... | def select(self, query):
self.execute(query) |
<|file_name|>horizontal.js<|end_file_name|><|fim▁begin|>/**
* morningstar-base-charts
*
* Copyright © 2016 . All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import defaultClasses from "../config/classes.js";... | /**
*
*
* @param {any} data |
<|file_name|>hello.rs<|end_file_name|><|fim▁begin|>#[no_mangle]
pub extern fn hello() {
// The statements here will be executed when the compiled binary is called
// Print text to the console
println!("Hello World!");
}
// The Computer Language Benchmarks Game
// http://benchmarksgame.alioth.debian.org/
/... | |
<|file_name|>test_ConvertToCSV.py<|end_file_name|><|fim▁begin|>import unittest
<|fim▁hole|><|fim▁end|> | from PyFoam.Applications.ConvertToCSV import ConvertToCSV
theSuite=unittest.TestSuite() |
<|file_name|>mediactrl_qt.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////////
// Name: src/msw/mediactrl_qt.cpp
// Purpose: QuickTime Media Backend for Windows
// Author: Ryan Norton <wxprojects@comcast.net>
// Modified by: Robin Dunn (moved QT ... | struct Point |
<|file_name|>priority.js<|end_file_name|><|fim▁begin|>require("../mapper").define("priority", "priority-view-model", {
"id": "_id",
name: "name",
order: "order",
colour: "colour"
});
require("../mapper").define("priority-view-model", "priority", {
"_id": "id",
name: "name",
order: "order",<|fim▁hole|> colour: "... | |
<|file_name|>MaximumAverageLevenshtein.java<|end_file_name|><|fim▁begin|>package eu.monnetproject.sim.entity;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import eu.monnetproject.util.Logger;
import eu.... | import eu.monnetproject.util.Logging;
|
<|file_name|>user_auth_app.py<|end_file_name|><|fim▁begin|>import os
from flask import Flask, render_template_string, request
from flask_mail import Mail
from flask_sqlalchemy import SQLAlchemy
from flask_user import login_required, SQLAlchemyAdapter, UserManager, UserMixin
from flask_user import roles_required
# Use... | <p><a href={{ url_for('special_page') }}>Special page</a> (login with username 'user007' and password 'Password1')</p>
{% endblock %}
""")
|
<|file_name|>coord_transform.rs<|end_file_name|><|fim▁begin|>use crate::coordinates::{ConversionTo, CoordinateSystem, Point};
use crate::tensors::Vector;
use crate::typenum::consts::U3;
use generic_array::arr;
struct Cartesian;
struct Spherical;
impl CoordinateSystem for Cartesian {
type Dimension = U3;
}
impl C... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from flask_admin import expose
from listenbrainz.webserver.admin import AdminIndexView
class HomeView(AdminIndexView):
@expose('/')
def index(self):
return self.render('admin/home.html')<|fim▁end|> | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use]
extern crate ispc;
ispc_module!(simple_tasks);
fn main() {
unsafe {
simple_tasks::run_tasks();
}<|fim▁hole|>}<|fim▁end|> | |
<|file_name|>scripts.js<|end_file_name|><|fim▁begin|>parent.jQuery(window).load(function() {
parent.jQuery('div.container select', document).change(function () {
change();
});
parent.jQuery('div.container input', document).keyup(function () {
change();
});
});
function change() {
fsi=parseInt(parent... | ss=font_size[fsi][2];
lh=parseInt(parent.jQuery('#lineheight', document).val(),10);
|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::env;
use std::io::{self, Write};
use std::process;
use std::borrow::Cow;
#[cfg(not(unix))]
mod platform {
use std::ffi::OsString;
pub const BUFFER_CAPACITY: usize = 16 * 1024;
pub fn to_bytes(os_str: OsString) -> Vec<u8> {
os_str.into_stri... | } |
<|file_name|>compute_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | self.client._build_paged_result = mock.MagicMock() |
<|file_name|>linear_regression.rs<|end_file_name|><|fim▁begin|>extern crate machinelearning;
use machinelearning::{LinearRegression,Vector};
fn main() {
let xs = [Vector::from_slice(&[1.0]),<|fim▁hole|> Vector::from_slice(&[4.0]),
Vector::from_slice(&[0.0])];
let ys = Vector::from_s... | Vector::from_slice(&[2.0]), |
<|file_name|>mid-path-type-params.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.apach... | S {
contents: x,
}
} |
<|file_name|>store.go<|end_file_name|><|fim▁begin|>// package store provides typed, centralized access to the event-sourced workflow and invocation models
package store
import (
"errors"
"fmt"
"github.com/fission/fission-workflows/pkg/fes"
"github.com/fission/fission-workflows/pkg/types"
"github.com/fission/fiss... | |
<|file_name|>tasks.client.controller.js<|end_file_name|><|fim▁begin|>'use strict';
// Tasks controller
angular.module('tasks').controller('TasksController', ['$scope', '$stateParams', '$location', 'Authentication', 'Tasks',
function($scope, $stateParams, $location, Authentication, Tasks) {
$scope.authentication = A... |
for (var i in $scope.tasks) {
if ($scope.tasks [i] === task) { |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import time
import RPi.GPIO as GPIO
from flask import Flask, render_template
# GPIO and Sensors ============================================================
# Objects to represent sensors used to get water level
class WaterLevelSensor:
# how high the sensor is abo... |
# gets the time it took for the sound to return, in microseconds
def pulse_in(self): |
<|file_name|>unwind-lambda.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... | fn main() {
let cheese = ~"roquefort";
let carrots = @~"crunchy";
|
<|file_name|>numbers.pipes.ts<|end_file_name|><|fim▁begin|>/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
<|fim▁hole|> pure: true,
})
export class KNumberPipe implements PipeTransform {
public transform(value: number) {
if (value > 100... | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'sqxKNumber', |
<|file_name|>SaveableObjectPropertySet.java<|end_file_name|><|fim▁begin|>/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... | if (!Saveable.class.isAssignableFrom(objectClass)) {
throw new IllegalArgumentException("Class "+objectClass+ |
<|file_name|>XmlStorageHelper.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
*
* Unless required ... | public static void clearAndInit(Class<?> projectLocalClass) { |
<|file_name|>node.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
use std::fmt::{Debug, Display};
use std::hash::Hash;
use boxfuture::BoxFuture;
use hashing::Digest;
use futures01::future::Future;
use... | fn spawn<F>(&self, future: F) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa 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 Software... | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License |
<|file_name|>rbd.py<|end_file_name|><|fim▁begin|># Copyright 2013 OpenStack Foundation
#
# 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/L... | self._rbd_meta.image.flush()
except AttributeError:
LOG.warning(_LW("flush() not supported in " |
<|file_name|>algo.js<|end_file_name|><|fim▁begin|>function initBtnStartAlgo(){
$('#btn_startDispatch').bind('click', function(event) {
event.preventDefault();
initAlgo();
createResultPanel("div_resultPanel");
doRound();
printRound("resultRegion");
printResultPersonal("resultPersonal");
cre... | }
// Step 1: 將學生加入其第N志願的 queue (N depend on round)
var regionDatasLength = regionDatas.length; |
<|file_name|>alexnet_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | |
<|file_name|>overlapping.cpp<|end_file_name|><|fim▁begin|>/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*... | |
<|file_name|>LdapServerType.java<|end_file_name|><|fim▁begin|>package org.openzal.zal.ldap;
<|fim▁hole|>
public class LdapServerType
{
@Nonnull
private final com.zimbra.cs.ldap.LdapServerType mLdapServerType;
public final static LdapServerType MASTER = new LdapServerType(com.zimbra.cs.ldap.LdapServerType.MASTER)... | import javax.annotation.Nonnull; |
<|file_name|>IComparablePane.java<|end_file_name|><|fim▁begin|>/*
* jStorybook: すべての小説家・作者のためのオープンソース・ソフトウェア
* Copyright (C) 2008 - 2012 Martin Mustun
* (このソースの製作者) KMY
*
* このプログラムはフリーソフトです。
* あなたは、自由に修正し、再配布することが出来ます。
* あなたの権利は、the Free Software Foundationによって発表されたGPL ver.2以降によって保護されています。<|fim▁hole|> * あなたがこ... | *
* このプログラムは、小説・ストーリーの制作がよりよくなるようにという願いを込めて再配布されています。 |
<|file_name|>seamly2d_id_ID.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="id">
<context>
<name>AddGroup</name>
<message>
<source>add group</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>... | <translation type="unfinished"></translation>
</message> |
<|file_name|>common.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache L... | except Exception as e:
exceptionOccured = True
exceptionMessage = e |
<|file_name|>CombatConfig.java<|end_file_name|><|fim▁begin|><|fim▁hole|>public class CombatConfig {
private int cpsLimit;
private long cpsCounterInterval;
private boolean noCooldown;
private double maxReach;
private boolean sweepEnabled;
private CombatSoundConfig combatSounds;
private double horizontalKb;
priv... | package com.github.maxopoly.finale.combat;
|
<|file_name|>dftreg.py<|end_file_name|><|fim▁begin|>"""
Motion correction of image sequences by 'efficient subpixel image registration
by cross correlation'. A reference image is iteratively computed by aligning
and averaging a subset of images/frames.
2015 Lloyd Russell, Christoph Schmidt-Hieber
*********************... | verbose : bool, optional
enable verbose mode. Default: False. |
<|file_name|>package_managers.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
... | return ['run-script']
def _get_installation_args(self, install_optional, production_only, force):
return_args = ['install'] |
<|file_name|>qt.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of weboob.
#
# weboob 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 Software Foundation... | import re
from threading import Event
from copy import copy |
<|file_name|>doc_test_lints.rs<|end_file_name|><|fim▁begin|>//! This pass is overloaded and runs two different lints.
//!
//! - MISSING_DOC_CODE_EXAMPLES: this lint is **UNSTABLE** and looks for public items missing doctests
//! - PRIVATE_DOC_TESTS: this lint is **STABLE** and looks for private items with doctests.
us... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from os.path import abspath
import wptools
from mycroft.messagebus.message import Message
from mycroft.skills.LILACS_knowledge.services import KnowledgeBackend
from mycroft.util.log import getLogger
__author__ = 'jarbas'
logger = getLogger(abspath(__file__).spli... | |
<|file_name|>LookDetail.js<|end_file_name|><|fim▁begin|>import React from 'react';
import {
ActivityIndicator,
StyleSheet,
Image,
Text,
View,
ListView,
TouchableOpacity
} from 'react-native';
import Dimensions from 'Dimensions';
const {width, height} = Dimensions.get('window');
import globalVariables fro... | getInitialState() { |
<|file_name|>97.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | print 28433 * 2**7830457 + 1 |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Scrapy settings for helloscrapy project<|fim▁hole|># For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
BOT_NAME = 'helloscra... | # |
<|file_name|>test_artificial_1024_Anscombe_PolyTrend_0_12_20.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
<|fim▁hole|><|fim▁end|> |
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 0, transform = "Anscombe", sigma = 0.0, exog_count = 20, ar_order = 12); |
<|file_name|>test_gfx.py<|end_file_name|><|fim▁begin|>"core.Pixmap tests"
from unittest import SkipTest
from testutils import *
from gfxprim.core import Pixmap
from gfxprim import gfx, core
def test_gfx_submodule_loads():
"gfx is present in a Pixmap"
c = Pixmap(1, 1, core.C.PIXEL_RGB888)
assert c.gfx
def te... | elif t == 'F': |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.db import transaction
from django.db.models import C... | messages.info(request, 'Group successfully deleted')
return HttpResponseRedirect(reverse('list-groups'))
return render(request, 'groups/groups/delete.html', { |
<|file_name|>brain_scipy_signal.py<|end_file_name|><|fim▁begin|># Copyright (c) 2019 Valentin Valls <valentin.valls@esrf.fr>
# Copyright (c) 2020-2021 hippo91 <guillaume.peillex@gmail.com>
# Copyright (c) 2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>
# Li... | |
<|file_name|>createTree.ts<|end_file_name|><|fim▁begin|>export interface Task {
id: number
name: string
parent?: number
}
export interface TaskNode extends Task {
children?: TaskNode[]
}
type TaskRepository = { [id: string]: TaskNode }
const createTreeInternal = (tree: TaskRepository, task: Task) => {<|fim▁... | |
<|file_name|>hint.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap;
pub type FieldIndex = usize;
/// Hints given when reading parcels.
#[derive(Clone, Debug, PartialEq)]
pub struct Hints {
pub current_field_index: Option<FieldIndex>,
/// The fields for which a length prefix
/// was already pr... | |
<|file_name|>patternexperiment.py<|end_file_name|><|fim▁begin|>from classifier import Classifier
from itertools import combinations
from datetime import datetime
import sys
import os
open_path = "PatternDumps/open"
closed_path = "PatternDumps/closed"
monitored_sites = ["cbsnews.com", "google.com", "nrk.no", "vimeo.com... | marked_site = sys.argv[i]
marked.append(marked_site)
i += 1
except: |
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>import os.path
from django.conf import settings
from django.test.utils import override_settings
import mock
from celery.result import AsyncResult
from olympia import amo
from olympia.amo.tests import TestCase, addon_factory, version_factory
from olympia.devhub... | 'message': '/permissions: Unknown permissions ...',
'description': 'See https://mzl.la/1R1n1t0 ....', |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/************************************
* AUTHOR: Divyansh Gaba *
* INSTITUTION: ASET, BIJWASAN *
************************************/
#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0); cin.tie(0);
#define F first
#define S second
#define PB push_b... | ll a[n];
for(int i = 0;i<n;i++) cin>>a[i]; |
<|file_name|>RollbackFunction.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under ... | * To execute this function, it is recommended to use the {@link Execution} obtained by using
* TransactionFunctionService. <br /> |
<|file_name|>query.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# 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
# option) any later versio... | # but for common opts it's better to use build_query
query["status"] = "CLOSED"
# query() is what actually performs the query. it's a wrapper around Bug.search |
<|file_name|>runner.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>#
# This file is part of Pootle.
#
# 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 Li... | # -*- coding: utf-8 -*-
#
# Copyright 2012 Zuza Software Foundation |
<|file_name|>API.java<|end_file_name|><|fim▁begin|>// Copyright 2014 The Serviced Authors.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.<|fim▁hole|>//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | // You may obtain a copy of the License at |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | // Package stats provides statistic utilities for Plan 9.
package stats |
<|file_name|>exe1.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
#include <string>
using namespace std;
int main()
{
cout<<"**************************************************"<<endl;
cout<<"»¶ÓʹÓöþÑõ»¯Ì¼ÅÅ·ÅÁ¿¼ÆËãÆ÷"<<endl;
cout<<"¶þÑõ»¯Ì¼ÅÅ·ÅÁ¿¼ÆË㹫ʽ £º"<<endl;
cout<<"¼ÒÍ¥ÓõçµÄ¶þÑõ»¯Ì¼ÅÅ... | cout<<0<<endl; |
<|file_name|>gl_context.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Gtk-rs Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
use glib::translate::*;
use display::... | unsafe { ffi::gdk_gl_context_clear_current() }
}
} |
<|file_name|>unit2game_source.js.js<|end_file_name|><|fim▁begin|>var game = new Phaser.Game(450, 350, Phaser.CANVAS, '', { preload: preload, create: create, update: update });
function preload(){
game.stage.backgroundColor='#000066';
game.load.image('correct','assets/correct.png');
game.load.image('incorre... | |
<|file_name|>item.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Syn Developers
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be cop... | TokenStreamHelper(&self.body).hash(state); |
<|file_name|>step.py<|end_file_name|><|fim▁begin|>#add by sq.luo
import andbug.command, andbug.screed
import andbug.vm
def stepComplete(t):
t = t[0]
with andbug.screed.section("Single step complete in %s, suspended." % t):
showCallStack(t, 1)
def showCallStack(t, count = 0):
if count >= le... | t.singleStep(func = stepComplete, stepdepth = 2)
else : |
<|file_name|>general.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
from smserver import models
from smserver import smutils
from smserver.chathelper import with_color
from smserver.chatplugin import ChatPlugin
from smserver.models import ranked_chart
from smserver.models.ranked_chart import Diffs
class ChatHelp(ChatP... | #!/usr/bin/env python3
# -*- coding: utf8 -*- |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod redis;<|fim▁hole|><|fim▁end|> | pub mod todos; |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var markdown = window.markdownit();
$(document).ready(function() {
var $wish = $('#wish');
var todoNotificationArea = $('#todos .notification-area');
var todoNotificationIcon = $('#todos .notification-area > i');
var todoNotificationText = $('#todos... | context: 'html',
observeChanges: true,
onVisible: function () {
$webcomicmodal.modal("refresh"); |
<|file_name|>GameOwnerCommandAction.java<|end_file_name|><|fim▁begin|>package org.emulinker.kaillera.controller.v086.action;
import java.util.*;
import org.apache.commons.logging.*;
import org.emulinker.kaillera.access.AccessManager;
import org.emulinker.kaillera.controller.messaging.MessageFormatException;
import or... | {
log.warn("GameOwner Command Denied: Not game owner: " + game + ": " + user + ": " + chat); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return; |
<|file_name|>search-filters.js<|end_file_name|><|fim▁begin|>'use strict';
describe('Directive: searchFilters', function () {
// load the directive's module
beforeEach(module('searchApp'));
var element,
scope;
beforeEach(inject(function ($rootScope) {
scope = $rootScope.$new();
}));
it('should m... | expect(element.text()).toBe('this is the searchFilters directive');
}));
}); |
<|file_name|>comp_ufilterbankheapint.cc<|end_file_name|><|fim▁begin|>#define TYPEDEPARGS 0, 1, 2, 3
#define SINGLEARGS
#define REALARGS
#define OCTFILENAME comp_ufilterbankheapint // change to filename
#define OCTFILEHELP "This function calls the C-library\n\
phase=comp_ufilterbankheapint(s,tgrad,fg... | static inline void
fwd_ufilterbankheapint(
const double s[], const double tgrad[], const double fgrad[], const double cfreq[],
ltfat_int a, ltfat_int M, ltfat_int L, ltfat_int W, |
<|file_name|>ssl_error_options_mask_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be<|fim▁hole|>
#include "net/base/net_errors.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace secur... | // found in the LICENSE file.
#include "components/security_interstitials/core/ssl_error_options_mask.h" |
<|file_name|>netsuite-test.js<|end_file_name|><|fim▁begin|>/* eslint-env mocha */
'use strict'
const path = require('path')
const cwd = process.cwd()
const NetSuite = require(path.join(cwd, 'netsuite'))
const chai = require('chai')
const expect = chai.expect
const config = require('config')
describe('NetSuite class',... |
it('should search folders', async function () { |
<|file_name|>htmltablesectionelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::dom::bindings::codegen::Bindings:... | use crate::dom::bindings::error::{ErrorResult, Fallible};
use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::root::{DomRoot, LayoutDom, RootedReference}; |
<|file_name|>zdt1.rs<|end_file_name|><|fim▁begin|>/// ZDT1 bi-objective test function
///
/// Evaluates solution parameters using the ZDT1 [1] synthetic test
/// test function to produce two objective values.
///
/// [1 ]E. Zitzler, K. Deb, and L. Thiele. Comparison of Multiobjective
/// Evolutionary Algorithms: Empiri... | let mut g = 1_f32;
|
<|file_name|>.eslintrc.js<|end_file_name|><|fim▁begin|>module.exports = {
rules: {<|fim▁hole|><|fim▁end|> | 'max-nested-callbacks': 0
}
}; |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import announcements from './announcements'
import delegates from './delegates'
import fees from './fees'
import ledger from './ledger'
import market from './market'
import peer from './peer'
import wallets from './wallets'
export {
announcements,
delegates,
fee... | wallets
} |
<|file_name|>cloudsearchdomain.py<|end_file_name|><|fim▁begin|># Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# ht... | |
<|file_name|>exam.py<|end_file_name|><|fim▁begin|>import os
import pickle
import random
import re
from datetime import datetime
from data_processing import (InteractiveAnswer, _in_list, colorit, space_fill,
split_wrd)
BOARDER_LENGTH = 40
class Quest():
def __init__(self, q, sel=None... | selitem = None if selitem is None else ([selitem] if isinstance( |
<|file_name|>ChartQueryParameters.js<|end_file_name|><|fim▁begin|>/* COPYRIGHT 2012 SUPERMAP
* 本程序只能在有效的授权许可下使用。
* 未经许可,不得以任何手段擅自使用或传播。*/
/**
* @requires SuperMap/Util.js
* @requires SuperMap/REST.js
*/
/**
* Class: SuperMap.REST.ChartQueryParameters
* 海图查询参数类,该类用于设置海图查询时的相关参数,海图查询分为海图属性
* 查询和海图范围查询两类... |
/**
* APIProperty: queryMode |
<|file_name|>netatmo.py<|end_file_name|><|fim▁begin|>"""
homeassistant.components.sensor.netatmo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NetAtmo Weather Service service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.netatmo/
"""
import logging
fr... | self._state = data['CO2']
elif self.type == 'pressure': |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.