prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>refcounted.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/. */
//! A generic, safe mechanism by which DOM objects can be ... | } |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#-*-*- encoding: utf-8 -*-*-
from django.shortcuts import render
from django.template import RequestContext, loader, Context
from django.http import JsonResponse
from .models import Airburst
def index(request):
return render(request, 'NextGenThreat/index.html', {})... | ],
}
return render(request, 'NextGenThreat/credits.html', context) |
<|file_name|>rollforward.py<|end_file_name|><|fim▁begin|># This file is part of taxtastic.
#
# taxtastic 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... |
log = logging.getLogger(__name__)
|
<|file_name|>to_encrypt.py<|end_file_name|><|fim▁begin|>'''
This mission is the part of the set. Another one - Caesar cipher decriptor.
Your mission is to encrypt a secret message (text only, without special chars like "!", "&", "?" etc.) using Caesar cipher where each letter of input text is replaced by another that... | '''
def to_encrypt(text, delta): |
<|file_name|>serve.js<|end_file_name|><|fim▁begin|>var watchers = Object.create(null);
var wait = function (linkid, callback) {
watchers[linkid] = cross("options", "/:care-" + linkid).success(function (res) {
if (watchers[linkid]) wait(linkid, callback);
var a = JSAM.parse(res.responseText);
... | };
var block_size = 1024; |
<|file_name|>find_2g.py<|end_file_name|><|fim▁begin|>import sys
import pickle
##########################################################
# usage
# pypy find_2g.py xid_train.p ../../data/train
# xid_train.p is a list like ['loIP1tiwELF9YNZQjSUO',''....] to specify
# the order of samples in traing data
# ../../data/tr... | xid_name=sys.argv[1]
data_path=sys.argv[2]
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Models the moonlander problem using genetic programming.
//!
//! The crate contains the AST node, fitness calculations,
//! and reporting code (to interface with a web-based visualizer
//! in another crate).
//!
//! The code is exercised using the examples in the `ex... |
#[macro_use] pub mod run;
pub mod grammar;
pub mod sim; |
<|file_name|>generic-exterior-unique.rs<|end_file_name|><|fim▁begin|>// run-pass<|fim▁hole|>struct Recbox<T> {x: Box<T>}
fn reclift<T>(t: T) -> Recbox<T> { return Recbox { x: Box::new(t) }; }
pub fn main() {
let foo: isize = 17;
let rbfoo: Recbox<isize> = reclift::<isize>(foo);
assert_eq!(*rbfoo.x, foo);
... | |
<|file_name|>neg_binomial_log.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include <stan/math/prim/scal/meta/return_type.hpp>
#include <stan/math/prim/scal/prob/neg_binomial_lpmf.hpp>
namespace stan {
namespace math {
/**
* @deprecated use <code>neg_binomial_lpmf</code>
*/
template <bool propto,
... | #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_LOG_HPP
#define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_LOG_HPP
|
<|file_name|>AboutHigherOrderFunctions.js<|end_file_name|><|fim▁begin|>var _; //globals
/* This section uses a functional extension known as Underscore.js - http://documentcloud.github.com/underscore/
"Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support
... | }; |
<|file_name|>version.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | __version__ = "9.1.4" |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | from .item_status import * # noqa |
<|file_name|>predicates_test.go<|end_file_name|><|fim▁begin|>package predicates
import (
"reflect"
"testing"
)
func TestPredicatesArgs(t *testing.T) {
methods := map[string][]string{
"onA5": {"a"},
"onA9": {"b"},
"onA13": {"d"},
"onB9": {"innermost"},
"onB10": {"inner"},
"onB11": {"out"},
"onC1": ... | |
<|file_name|>slugs_spec.js<|end_file_name|><|fim▁begin|>var should = require('should'),
supertest = require('supertest'),
testUtils = require('../../../utils/index'),
localUtils = require('./utils'),
config = require('../../../../server/config/index'),
ghost = testUtils.startGhost,
request;
des... | })
.then(function (token) {
accesstoken = token;
}); |
<|file_name|>PluginBrowser.cpp<|end_file_name|><|fim▁begin|>/*
* PluginBrowser.cpp - implementation of the plugin-browser
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of LMMS - https://lmms.io
*
* This program is free software; you can redistribute it and/o... | desc->subPluginFeatures->listSubPluginKeys(desc, subPluginKeys);
std::sort(subPluginKeys.begin(), subPluginKeys.end(),
[](const auto& l, const auto& r) |
<|file_name|>ElasticS3ObjectDAO.java<|end_file_name|><|fim▁begin|>/*
The MIT License (MIT)
Copyright (c) 2016 EMC Corporation
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 restriction,... | .startObject( KEY_TAG + ANALYZED_TAG).field("type", "string")
.field("index", ANALYZED_INDEX).endObject() |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)]
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
mod primary_index;
mod secondary_index;
mod table;
mod find;
use std::fs::File;
use std::io::Read;
use serde_json::{Value, Error};
fn main() {
let db_pat... | |
<|file_name|>idirwatcher_test.py<|end_file_name|><|fim▁begin|>"""Unit test for directory watcher (inotify).
"""
import errno
import os
import shutil
import tempfile
import select
import unittest
# Disable W0611: Unused import
import tests.treadmill_test_deps # pylint: disable=W0611
import mock<|fim▁hole|>class DirW... |
from treadmill import idirwatch
|
<|file_name|>runauto.py<|end_file_name|><|fim▁begin|>import requests
import pytest
import subprocess
# ============================================================================
class TestAuto(object):
PREFIX = 'http://localhost:8089'
USER = 'testauto'
LIST_ID = ''
AUTO_ID = ''
NUM_BROWSERS = 2
... |
@pytest.mark.always
def test_create_user(self):
res = subprocess.run(['docker', 'exec', 'webrecorder_app_1', "python", "-m", "webrecorder.admin", |
<|file_name|>test_artificial_32_Logit_MovingMedian_0__100.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 = 32 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 0, transform = "Logit", sigma = 0.0, exog_count = 100, ar_order = 0); |
<|file_name|>register_map.cpp<|end_file_name|><|fim▁begin|>//---------------------------------------------------------------------------
#include "register_map.h"
//---------------------------------------------------------------------------
//Register map for Si5356A
Reg_Data Reg_Store[NUM_REGS_MAX] = {
{ 0,0x00,... | {162,0x00,0x00},
|
<|file_name|>skills.en.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export declare const skills_en: string; |
<|file_name|>tabmanager.ts<|end_file_name|><|fim▁begin|><!DOCTYPE TS><TS>
<context>
<name>AppEdit</name>
<message>
<source>Application</source>
<translation>Aplikācija</translation>
</message>
<message>
<source>Name:</source>
<translation>Nosaukums:</translation>
</me... | <translation>Nevaru izņemt.</translation>
</message> |
<|file_name|>nlp.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
# -*- coding: utf8 -*-
import tensorflow as tf
import os
from sys import platform as _platform
import collections
import random
import numpy as np
import warnings
from six.moves import xrange
from tensorflow.python.platform import gfile
import re
... | print(" start_id: %d" % self.start_id) |
<|file_name|>object_list.js<|end_file_name|><|fim▁begin|>//Here is all the code that builds the list of objects on the right-hand
//side of the Labelme tool.
//The styles for this tools are defined inside:
//annotationTools/css/object_list.css
var IsHidingAllPolygons = false;
var ProgressChecking = false;
//var IsH... | // Create "show all" button:
$('#poly_held').replaceWith('<a id="hold_poly" href="javascript:ShowAllPolygons();"><b>Press to hold outlines</b></a>');
$('#end_check_progress').replaceWith('<p style="font-size:12px;line-height:50%" id="check_progress" ><a href="javascript:CheckProgress();"><b>Check progress</b></a>... |
<|file_name|>snagfilms_scraper.py<|end_file_name|><|fim▁begin|>"""
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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... | stream_url = source + scraper_utils.append_headers({'User-Agent': scraper_utils.get_ua(), 'Referer': iframe_url})
hoster = {'multi-part': False, 'host': host, 'class': self, 'quality': quality, 'views': None, 'rating': None, 'url': stream_url, 'direct': True} |
<|file_name|>FContDef.java<|end_file_name|><|fim▁begin|>package org.opendaylight.opflex.genie.content.format.meta.mdl;
import java.util.TreeMap;
import org.opendaylight.opflex.genie.content.model.mclass.MClass;
import org.opendaylight.opflex.genie.content.model.mprop.MProp;
import org.opendaylight.opflex.genie.engine... | }
public void generate()
{ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from typing import Optional
from thinc.api import Model
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .lemmatizer import UkrainianLemmatizer
from ...language import Language
class ... | |
<|file_name|>ProductPropertyInput.js<|end_file_name|><|fim▁begin|>/**
* @flow
* @module ProductPropertyInput
* @extends React.PureComponent
*
* @author Oleg Nosov <olegnosov1@gmail.com>
* @license MIT
*
* @description
* React form for product property(options select only).
*
*/
import React, { PureComponent... | ...localizationScope,
...(isObject(options[index])
? { |
<|file_name|>stream.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/licenses... | assert_eq!(self.to_wake.load(Ordering::SeqCst), 0);
let ptr = unsafe { token.cast_to_usize() }; |
<|file_name|>ContextModuleFactory.js<|end_file_name|><|fim▁begin|>/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var async = require("async");
var path = require("path");
var Tapable = require("tapable");
var ContextModule = require("./ContextModule");
var ContextEl... | }
loaders = loaders.substr(i).replace(/!+$/, "").replace(/!!+/g, "!"); |
<|file_name|>slice.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/lice... |
#[unstable = "trait is experimental"]
impl<'a, T, U: ?Sized + AsSlice<T>> AsSlice<T> for &'a mut U {
#[inline(always)] |
<|file_name|>read.go<|end_file_name|><|fim▁begin|>package msgp
import (
"io"
"math"
"sync"
"time"
"github.com/philhofer/fwd"
)
// where we keep old *Readers
var readerPool = sync.Pool{New: func() interface{} { return &Reader{} }}
// Type is a MessagePack wire type,
// including this package's built-in
// exten... | f = math.Float32frombits(getMuint32(p))
_, err = m.R.Skip(5)
return
} |
<|file_name|>frequencyAnalysis.py<|end_file_name|><|fim▁begin|><|fim▁hole|>The encryption process in the story you read involves frequency analysis: it is known that letter 'e' is the
most frequent one in the English language, so it's pretty safe to assume that the most common character in the
encryptedText stands fo... | """ You've recently read "The Gold-Bug" by Edgar Allan Poe, and was so impressed by the cryptogram in it that
decided to try and decipher an encrypted text yourself. You asked your friend to encode a piece of text using
a substitution cipher, and now have an encryptedText that you'd like to decipher.
|
<|file_name|>test_meanstd.py<|end_file_name|><|fim▁begin|>import unittest2
from zounds.util import simple_in_memory_settings
from .preprocess import MeanStdNormalization, PreprocessingPipeline
import featureflow as ff
import numpy as np
class MeanStdTests(unittest2.TestCase):
def _forward_backward(self, shape):
... | |
<|file_name|>pprof_profiler_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 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://w... | #
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS, |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>"use strict";
let datafire = require('datafire');<|fim▁hole|><|fim▁end|> | let openapi = require('./openapi.json');
module.exports = datafire.Integration.fromOpenAPI(openapi, "azure_network_virtualrouter"); |
<|file_name|>PositionDefinition.java<|end_file_name|><|fim▁begin|>package fr.npellegrin.xebia.mower.parser.model;
/**
* Parsed position.
*/
public class PositionDefinition {
private int x;
private int y;<|fim▁hole|> return x;
}
public void setX(final int x) {
this.x = x;
}
public int getY() {
return y;
... | private OrientationDefinition orientation;
public int getX() { |
<|file_name|>driver.py<|end_file_name|><|fim▁begin|># Copyright 2012 NetApp
# Copyright 2015 Mirantis inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | LOG.error(_LE("Failed to mount temporary folder for "
"migration of share instance " |
<|file_name|>account_invoice.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from openerp import api, fields, models, _
from . import exceptions
class AccountInvoice(models.Model):<|fim▁hole|>
enable_datev_checks = fields.Boolean('Perform Datev Checks', default=True)
@api.multi
def is_datev_vali... | _inherit = 'account.invoice' |
<|file_name|>header-test.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012, Susumu Yata
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain ... | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
<|file_name|>ffi.rs<|end_file_name|><|fim▁begin|>#![allow(raw_pointer_derive)]
#![allow(non_camel_case_types)]
use std::mem;
use libc::{c_void, c_char, c_uchar, c_short, c_ushort, c_int, c_uint, c_long, c_ulong};
// APACHE PORTABLE RUNTIME
pub const APR_RFC822_DATE_LEN: apr_size_t = 30;
// run this hook first,... | e: *mut apr_bucket,
c: *mut *mut apr_bucket
) -> apr_status_t>,
} |
<|file_name|>fa_icon_definitions.py<|end_file_name|><|fim▁begin|>fa_icons = {
'fa-glass': u"\uf000",
'fa-music': u"\uf001",
'fa-search': u"\uf002",
'fa-envelope-o': u"\uf003",
'fa-heart': u"\uf004",
'fa-star': u"\uf005",
'fa-star-o': u"\uf006",
'fa-user': u"\uf007",
'fa-film': u"\uf0... | |
<|file_name|>empty-env.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the<|fim▁hole|># "Software"), to deal in the Software without restriction, including
# wi... | |
<|file_name|>max_prod_three.py<|end_file_name|><|fim▁begin|><|fim▁hole|>def solution(a):
l = len(a)
if l < 3: return reduce(lambda x, y: x * y, a)
products = []
for i in xrange(0, l):
for j in xrange(i+1, l):
for k in xrange (j+1, l):
products.append(a[i] * a[j] * a[k])
return max(product... | # correctness: 100%, performance: 0% |
<|file_name|>cytest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
from storer import Storer
import sys
s = Storer()
if s.get_value() != 0:
print('Initial value incorrect.')
sys.exit(1)
s.set_value(42)
<|fim▁hole|> sys.exit(1)
try:
s.set_value('not a number')
print('Using wrong argument ... | if s.get_value() != 42:
print('Setting value failed.') |
<|file_name|>unify.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/lice... | } |
<|file_name|>YesNoAgent.java<|end_file_name|><|fim▁begin|>package com.almende.dialog.example.agent;
import java.io.Serializable;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
impo... |
int questionNo=0; |
<|file_name|>all.go<|end_file_name|><|fim▁begin|>// Original: src/os/path.go
//
// Copyright 2009 The Go Authors. All rights reserved.
// Portions Copyright 2016 Hiroshi Ioka. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the f... | }
}
if err1 == io.EOF { |
<|file_name|>app.modules.js<|end_file_name|><|fim▁begin|>/*global require,module,console,angular */
require("angular/angular");
require("angular-route/angular-route");
angular.module("RegistrationApp", ["ngRoute"]);
angular.module("RegistrationApp").controller("RegistrationCtrl", require("./components/registration/co... | angular.module("MainApp").config(["$routeProvider", "$locationProvider", require("./app.routes")]); |
<|file_name|>player.js<|end_file_name|><|fim▁begin|>var m2pong = require('./m2pong');
Player = function(connection, name, nr){
this.connection = connection;
this.name = name;<|fim▁hole|>
this.x = 0;
this.y = 0;
this.height = 0;
this.width = 0;
this.score = 0;
this.move = function(x, y){
this.x = x;
thi... | this.nr = nr; |
<|file_name|>read_multifield_dataset.py<|end_file_name|><|fim▁begin|>import sys
if __name__ == "__main__":
# Parse command line arguments
if len(sys.argv) < 2:
sys.exit("python {} <datasetFilename> {{<maxPoints>}}".format(sys.argv[0]))
datasetFilename = sys.argv[1]
if len(sys.argv) >= 3:
maxPoints = int(sys.ar... | line = f.readline() |
<|file_name|>pyunit_bernoulli_synthetic_data_GBM_medium.py<|end_file_name|><|fim▁begin|>from builtins import range
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
import h2o
from tests import pyunit_utils
from h2o import H2OFrame
import numpy as np
import numpy.random
import scipy.stats
from sklearn imp... | test_cols = 10 |
<|file_name|>exposure.js<|end_file_name|><|fim▁begin|>/*
Copyright: © 2011 Thomas Stein, CodeLounge.de
<mailto:info@codelounge.de> <http://www.codelounge.de/>
Released under the terms of the GNU General Public License.
You should have received a copy of the GNU General Public License,
along with this software. In the ... | var next_url = $('.ui-page-active #next_post_link').attr('href');
var previous_url = $('.ui-page-active #previous_post_link').attr('href'); |
<|file_name|>attribute_test.js<|end_file_name|><|fim▁begin|>"use strict";
import chai from "chai";
import chaiAsPromised from "chai-as-promised";
import sinon from "sinon";
import BusinessElementsClient from "../src";
import uuid from "uuid";
import * as requests from "../src/requests";
chai.use(chaiAsPromised);<|fim... | chai.should();
chai.config.includeStack = true;
|
<|file_name|>CommandClassHumidityControlSetpointV1.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2016-2017 by the respective copyright holders.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies th... | } |
<|file_name|>Makefile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# @author Philip
import tarfile as tf
import zipfile as zf
import os, re, shutil, sys, platform
pyversion = platform.python_version()
islinux = platform.system().lower() == 'linux'
if pyversion[:3] in ['2.6', '2.7']:
i... | # Get PHP Array |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.openid import OpenID
from config import basedir
from flask_debugtoolbar import DebugToolbarExtension
app = Flask(__name__)
app.conf... | |
<|file_name|>terminalLinkHandler.ts<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
... | fragment: Uri.parse(normalizedPath).fragment
});
|
<|file_name|>test-case.ts<|end_file_name|><|fim▁begin|>import type {SpecDirectory, OptionKey} from '../spec-directory';
import {Compiler} from '../compiler';
import {
failures,
TestResult,
getExpectedFiles,
overwriteResults,
SassResult,
} from './util';
import {compareResults} from './compare';
import {getExp... | this.dir.readFile('warning') &&
actual.isSuccess &&
!actual.warning
) { |
<|file_name|>pseudo_element_definition.mako.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/. */
/// Gecko's pseudo-element definition... | } |
<|file_name|>structarm__pid__instance__q15.js<|end_file_name|><|fim▁begin|>var structarm__pid__instance__q15 =
[
<|fim▁hole|> [ "Ki", "structarm__pid__instance__q15.html#a0dcc19d5c8f7bc401acea9e8318cd777", null ],
[ "Kp", "structarm__pid__instance__q15.html#ad228aae24a1b6d855c93a8b9bbc1c4f1", null ],
[ "s... | [ "A0", "structarm__pid__instance__q15.html#ad77f3a2823c7f96de42c92a3fbf3246b", null ],
[ "A1", "structarm__pid__instance__q15.html#ad8ac5ff736c0e51180398c31f777f18a", null ],
[ "A2", "structarm__pid__instance__q15.html#a33e8b4c2d3e24b8b494f6edca6a89c1b", null ],
[ "Kd", "structarm__pid__instance__q1... |
<|file_name|>RadioGroupIntegrationTest.java<|end_file_name|><|fim▁begin|>package com.sdl.selenium.extjs6.form;
import com.sdl.selenium.InputData;
import com.sdl.selenium.TestBase;
import com.sdl.selenium.extjs6.panel.Panel;
import com.sdl.selenium.web.SearchType;
import org.testng.annotations.BeforeClass;
import org.t... | |
<|file_name|>javax.management.MBeanNotificationInfo.d.ts<|end_file_name|><|fim▁begin|>declare namespace javax {<|fim▁hole|>
class MBeanNotificationInfo extends javax.management.MBeanFeatureInfo implements java.lang.Cloneable {
static readonly serialVersionUID: long
static readonly NO_NOTIFICATIONS: java... | namespace management { |
<|file_name|>load_text_file.py<|end_file_name|><|fim▁begin|>def load_text_file(text_file: str) -> str:<|fim▁hole|><|fim▁end|> | with open(text_file, 'r') as f:
return f.read() |
<|file_name|>Frequent.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding: utf-8
class Frequent():
def __init__(self):
self.counters = {}
<|fim▁hole|> counters[item] = counters[item] + 1
elif len(self.counters) <= k:
self.counters[item] = 1
else:
... | def add(self, item, k, k2, t):
if item in self.counters: |
<|file_name|>ES5.js<|end_file_name|><|fim▁begin|>var topics = require('../data').topics;
console.log(topics);
var result = topics.filter(function (topic) { //filter renvoie les 'true'
return topic.user.name === 'Leonard'; //? true : false;
});
var result2 = topics.filter(topic=>topic.user.name === 'Leonard');
va... | console.log('_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_');
console.log(titles);
console.log('_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_/-\\\_'); |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.conf import settings
from django.db import models as django_models
from django.utils.translation import ugettext_lazy as _
from cms import models as cms_models
from djangocms_utils import fields as cms_fields
from shop import models as shop_models
from sh... | class Product(shop_models.Product):
placeholders = cms_fields.M2MPlaceholderField(actions=actions.SimpleTranslationPlaceholderActions(), placeholders=CMSPLUGIN_BLOG_PLACEHOLDERS)
|
<|file_name|>test_images_negative.py<|end_file_name|><|fim▁begin|># Copyright 2013 OpenStack Foundation
# All Rights Reserved.
# Copyright 2013 IBM Corp.
#
# 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 cop... | def test_get_non_existent_image(self):
# get the non-existent image
non_existent_id = str(uuid.uuid4())
self.assertRaises(lib_exc.NotFound, self.client.get_image, |
<|file_name|>testUtils.js<|end_file_name|><|fim▁begin|>// ./index.js contains imports to redisClient, which should be mocked in unit tests.
jest.mock('src/lib/redisClient');
// Avoid loading src/lib/queue, which really connects to redis
jest.mock('src/lib/queues', () => ({}));
import { graphql } from 'graphql';
import... |
/**
* Executes graphql query against the current GraphQL schema. |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from common import Constant
from common import utils
from main.logger_helper import L
__author__ = 'Dan Cristian <dan.cristian@gmail.com>'
# saves record to cloud database
def save_to_history_cloud(obj):
try:
L.l.debug('Trying to save historical recor... | # record_unique_id_name=graph_legend_field,
# record_unique_id_value=graph_legend_item_name) |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate log;
extern crate openssl;
extern crate serde;
#[macro_use] extern crate serde_derive;
extern crate serde_json;
extern crate rand;
extern crate url;
mod config;
mod connection;
mod errors;
mod message;
mod parse;
mod subscription;<|fim▁hole|>pu... |
pub use config::Config;
pub use connection::NatsConn;
pub use errors::Error; |
<|file_name|>NavDef.java<|end_file_name|><|fim▁begin|>package com.rotoplastyc.util;
public class NavDef {
private final String i[];
public final static NavDef ERRO = new NavDef("err","mood_bad","ERRO");
public final static NavDef ERRO2 = new NavDef("err","mood","ERRO");
public NavDef(String c... | |
<|file_name|>CardsPresenceTest.java<|end_file_name|><|fim▁begin|>/*
* Preferanser is a program to simulate and calculate Russian Preferans Card game deals.
*
* Copyright (C) 2013 Yuriy Lazarev <Yuriy.Lazarev@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it unde... | .canSeeCardsAt(SOUTH, Card.values())
.canSeeNoCardsAt(EAST, WEST);
}
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from enum import Enum
from typing import List, Any, cast
import yass
from tutorial.base_types_external import Integer
# shows how to use contract internal base types
class ExpirationHandler(yass.BaseTypeHandler):
def readBase(self, reader: yass.Reader) -> 'E... | return f"{self.year}"
class PriceKind(Enum): |
<|file_name|>service.py<|end_file_name|><|fim▁begin|>from spacyThrift import SpacyThrift
from spacyThrift.ttypes import Token
<|fim▁hole|>
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from thrift.server import TServer
import logging
class Han... | from spacy.en import English |
<|file_name|>AdvancedSettingsProto.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licen... | |
<|file_name|>cursor_pair.rs<|end_file_name|><|fim▁begin|>//! A generic cursor implementation merging pairs of different cursors.
use std::cmp::Ordering;
use super::Cursor;
/// A cursor over the combined updates of two different cursors.
///
/// A `CursorPair` wraps two cursors over the same types of updates, and pro... | fn rewind_keys(&mut self, storage: &Self::Storage) {
self.cursor1.rewind_keys(&storage.0);
self.cursor2.rewind_keys(&storage.1); |
<|file_name|>database.spec.ts<|end_file_name|><|fim▁begin|>import { file as tempfile } from 'tempy'
import { SourceModel } from '../src/models/source-model'
import { SourceLogModel } from '../src/models/source-log-model'
import { ItemModel } from '../src/models/item-model'
import { TypeModel } from '../src/models/type-... | import {
init,
sourceLogs, |
<|file_name|>FileAppender.java<|end_file_name|><|fim▁begin|>package SOLID.Exercise.Logger.model.appenders;
import SOLID.Exercise.Logger.api.File;
import SOLID.Exercise.Logger.api.Layout;
import SOLID.Exercise.Logger.model.files.LogFile;
public class FileAppender extends BaseAppender {
private File file;
pub... | |
<|file_name|>fan.py<|end_file_name|><|fim▁begin|>"""Support for Tasmota fans."""
from hatasmota import const as tasmota_const
from homeassistant.components import fan
from homeassistant.components.fan import FanEntity
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatche... | ORDERED_NAMED_FAN_SPEEDS = [ |
<|file_name|>ConstrutorTesteDrive.java<|end_file_name|><|fim▁begin|>package construtores;
public class ConstrutorTesteDrive {
public static void main(String[] args) {
// Construtor c1 = new Construtor();
// System.out.println("--c1\n" + c1.getNomeERg() + "\n\n");
Construtor c2 = new Construtor("Odai... |
System.out.println("--c2\n" + c2.getNomeERg() + "\n\n");
|
<|file_name|>gte.js<|end_file_name|><|fim▁begin|>Astro.createValidator({
name: 'gte',
validate: function(fieldValue, fieldName, compareValue) {
if (_.isFunction(compareValue)) {
compareValue = compareValue.call(this);
}
return fieldValue >= compareValue;
},
events: {
validationerror: func... |
e.data.message = 'The "' + fieldName +
'" field\'s value has to be greater than or equal "' + |
<|file_name|>file_codec.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# Copyright 2014 Google.
#
# 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... | result.update(self.ResultData(encodedfile)) |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node
require("babel/register")({
"stage": 1
});
var fs = require("fs");
GLOBAL.WALLACEVERSION = "Err";
GLOBAL.PLUGIN_CONTRIBUTORS = [];
try {
var p = JSON.parse(fs.readFileSync(__dirname+"/package.json"));
GLOBAL.WALLACEVERSION = p.versio... | GLOBAL.core = new Core(); |
<|file_name|>parseJavaScript.js<|end_file_name|><|fim▁begin|>'use strict';
var ok = require('assert').ok;
const esprima = require('esprima');
function parseExpression(src, builder, isExpression) {
ok(typeof src === 'string', '"src" should be a string expression');
ok(builder, '"builder" is required');
fu... | return null; |
<|file_name|>SitzzahlEinschraenkung.java<|end_file_name|><|fim▁begin|>package edu.kit.iti.formal.mandatsverteilung.generierer;
import edu.kit.iti.formal.mandatsverteilung.datenhaltung.Bundestagswahl;
/**
* Modelliert eine Einschränkung an das Ergebnis des Generierers, dass der
* Bundestag eine bestimmte Größe haben... | * @author Jan
* |
<|file_name|>search_index.js<|end_file_name|><|fim▁begin|>window.esdocSearchIndex = [
[
"./git/resourcecreator/src/utils/commonmanagers/advencedfilterargmanager/advencedfilterargmanagercategorygroupaddsampledatas.js~advencedfilterargmanagercategorygroupaddsampledatas",
"variable/index.html#static-variable-Adv... | "file/git/resourcecreator/src/Components/Widgets/Cores/Widget033TypeB/Widget033TypeBSampleDatas.js.html", |
<|file_name|>meta.js<|end_file_name|><|fim▁begin|>import { respond } from "theme/styles/mixins";
export default `
.resource-meta,
.resource-meta-mobile {
.resource-type {
margin-bottom: 14px;
${respond(`margin-bottom: 2px;`, 65)}
}
/* <ul> */<|fim▁hole|> margin-bottom: 22px;
&... | .meta-list-secondary { |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""The initialization file for the Pywikibot framework."""
#
# (C) Pywikibot team, 2008-2015
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
__release__ = '2.0b3'
__version__ = ... | For now its just being used for DataSite, but |
<|file_name|>sass.js<|end_file_name|><|fim▁begin|>var nodeSass = require('node-sass'),
fs = require('fs');
module.exports = class Sass {
constructor(config){
this.config = config;
if (this.config.compileAtBootup) {
this.compile();
}
if (this.config.watch) {
this.startWatch();
}
... | }
} |
<|file_name|>message_icon.ts<|end_file_name|><|fim▁begin|>/**
* This file is part of Threema Web.
*
* Threema Web 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, either version 3 of the License, or... | return 'ic_poll_24px.svg'; |
<|file_name|>FillGeneratorTool.java<|end_file_name|><|fim▁begin|>/* -*- tab-width: 4 -*-
*
* Electric(tm) VLSI Design System
*
* File: FillGeneratorTool.java
*
* Copyright (c) 2006 Sun Microsystems and Static Free Software
*
* Electric(tm) is free software; you can redistribute it and/or modify
* it under the ... | } |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include <QtGui/QApplication>
#include "xmlparser.h"
#include "myfiledialog.h"
#include <iostream>
#include <QMessageBox>
using namespace std;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);/*
MainWindow w;
w.show();*/
My... | return 0;
|
<|file_name|>shopping-list.commands.ts<|end_file_name|><|fim▁begin|>import { Aggregate } from '@resolve-js/core'
import {
SHOPPING_LIST_CREATED,
SHOPPING_LIST_RENAMED,
SHOPPING_LIST_REMOVED,
SHOPPING_ITEM_CREATED,
SHOPPING_ITEM_TOGGLED,
SHOPPING_ITEM_REMOVED,
} from '../event-types'
const aggregate: Aggreg... | if (!state.createdAt) { |
<|file_name|>EncodedGraph.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General... | |
<|file_name|>sslcontext.py<|end_file_name|><|fim▁begin|>from ctypes import *
import ctypes
from ctypes.wintypes import *
from _ssl import SSLError
import sys
CRYPT32 = windll.Crypt32
SCHANNEL = windll.SChannel
# Lots of "Magic" constants, mainly from schannel.h
SCH_CRED_NO_SYSTEM_MAPPER = 0x00000002
SCH_CRED_NO_DE... | |
<|file_name|>oauth2.py<|end_file_name|><|fim▁begin|>"""
The MIT License
Copyright (c) 2007 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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... | """ |
<|file_name|>dlist.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/lice... | |
<|file_name|>errors.generated.go<|end_file_name|><|fim▁begin|>package internal
import "v2ray.com/core/common/errors"<|fim▁hole|>
func newError(values ...interface{}) *errors.Error {
return errors.New(values...).Path("Transport", "Internet", "Internal")
}<|fim▁end|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.